How it works
This page will show you how the approval workflow works in real time. We still recommends you to read the code in approvalProcess()
function.
How the script works
- Script will runs from Row n+1 (n = number of header row)
- Checks the
Step 1 Approver Status
of the current row- If it is
blank
, it will identifies asNew Request
and start theNew Request
process. Then repeats (2) with next row. - If it is
Waiting
, it will checks theInbound
sheet data that holds the same Request ID and updates the corresponding status when there is a response. Then repeats (2) with next row. - If the Status is
Approved
, the process repeats (2). But withStep 2 Approver Status
andRequest Step 2 Approval
. - Otherwise (as in case of
Reject
orSkipped
), script will repeats (2) with next row.
- If it is
- When the status has reached to the last approver, (2) will starts again. But this time for
Approved
, it will sends an email to responder to do what the approver wants to do. Then the status will be updated asFinished
.
System Process
New Request
Script will do as following to requests that has been tagged as New Request
.
- Send email to requester to notifies that the request is being processed.
- Send email to
Step 1 Approver
, as determined by the requester.
Checking the inbounds
Script will do as following to request that has been tagged as Check for inbounds
.
- Retrives the
Reqest ID
from the request. - Match
Request ID
withRequest ID
in inbounds. First response (order by Time) that contains the sameRequest ID
will be chosen. - Chosen Response status are applied to the request.