About SetApprovers
This API sets approvers to a specific Bill or Vendor Credit. The approvers review and approve or disapprove Bills or Vendor Credits before payments are made. Users who are assigned as approvers need to have the approval permissions assigned to them.
The SetApprovers request creates a BillApprover or VendorCreditApprover object.
Note: The sequence that approvers are assigned dictates the order that each approver is allowed to approve.
Use SetApprovers in the following scenarios:
- When a business wants to assign one or more approvers to review any bill or vendor credit prior to payment.
- When an ApprovalPolicy requires one or more approvers; particularly, if an ApprovalPolicyApprover is specified for the approval policy.
Important: Behavior changes occur when one or more approvers have acted on the Bill or Vendor Credit.
- If an approver specified in this API has already approved the Bill or Vendor Credit, that approver is ignored in the new approver sequence.
- Approver list of those not acted is replaced with the updated approvers.
- If no approver has approved the bill, the new sequence replaces the previous sequence.
Example: "Approver_1 approved, Approver_2 denied"
- Bill was assigned this sequence: Approver_1, Approver_2, Approver_3.
- Approver_1 approved, Approver_2 denied.
- After the denial reason is fixed, ClearApprovers call removes all users.
- SetApprovers reapplies the new user approval sequence: Approver_1, Approver_3, Approver_2.
- Approver_1 already approved. Therefore, the Bill goes directly to the next approver (Approver_3 and then Approver_2).
- Even through the sequence changed, Approver_1 has already approved and does not repeat the review/approval action.
Note: A user with permission to pay unapproved bills can directly pay the bill, regardless of the Bill's Approval Status.
Example
Request
<API_URL_EndPoint>/SetApprovers.json
data={
"objectId" : "00n01TUPMWVLJHJUR1mg",
"entity" : "Bill",
"approvers" : [ "00601EZZHEBLMBCGUU5m", "00601ERPGJVSMNGCQXgq" ]
}
Response
{
"response_status" : 0,
"response_message" : "Success",
"response_data" : { }
}
Resources
Parameters
Field Name | Description | Required? |
---|---|---|
objectId | The ID of the Bill/Vendor Credit that the Approvers are assigned.. | Yes |
entity | Name of the entity (Bill, VendCredit). | Yes |
approvers | List of approvers to be applied to the entity. For example, Approver1_Id, Approver2_Id, Approver3_Id |
Yes |