Concepts

Approval Policies

API Reference

Approval Policies enable your users to set up an approval process for managing and paying any invoice they receive.

Creating Approval Policies

To create an Approval Policy:

  1. Create users within an entity and optionally assign them roles.
  2. Create the Approval Policy rule

Creating Approval Policy rules

Approval Policies can be created using the API or through the admin dashboard by clicking on the Approval Policy tab within an entity.

Approval Policies consist a trigger for the policy and a list of users that need to approve the invoice. You can stack multiple Approval Policies on top of each other.

Approval Policy Triggers

The "Trigger" field allows you to select what conditions will trigger this approval policy.

You can select the following to trigger an approval policy:

  • Invoice Amounts (greater than)
  • Invoice Metadata
  • Invoice Vendors

Number of Approvers

Each approval policy can have a different number of approvers. You can set the number of approvers needed for each approval policy by using the "Number of Approvers" field.

Approval Policy Rules

The "Approval Policy Rules" field allows you to select which users will be the approvers for this approval policy. You can select users based on their roles or by their userIDs. Roles are useful when you want any user with a specific role to be able to approve an invoice. UserIDs are useful when you want to specify exactly which users can approve an invoice.

Example Approval Policy

In this example, we will create an approval policy that will trigger when an invoice is received and the invoice amount is greater than $100. We will set the number of approvers to 2 and we will let anyone with the "Controller" role or "Admin" role approve the invoice.

curl -X POST \
--url "https://api.mercoa.com/entity/:entityId/approval-policy" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--header "Accept: application/json" \
--data '
{
"trigger": [
{
"type": "amount",
"amount": 100,
"currency": "USD"
}
],
"rule": {
"type": "approver",
"numApprovers": 2,
"identifierList": {
"type": "rolesList",
"value": [
"Controller",
"Admin"
]
}
},
"upstreamPolicyId": "root"
}
'

Auto-Assign Approvers

Approval policies can be set to automatically assign approvers when a user submits an invoice for approval. If the approval rule is set to userList and the number of approvers needed is equal to the number of users that are available to approve will automatically assign those users.

Example

curl -X POST \
--url "https://api.mercoa.com/entity/:entityId/approval-policy" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--header "Accept: application/json" \
--data '
{
"trigger": [],
"rule": {
"type": "approver",
"numApprovers": 2,
"identifierList": {
"type": "userList",
"value": [
"user_123456",
"user_098787"
]
}
},
"upstreamPolicyId": "root"
}
'