Approve purchases by their amount
A purchase request that goes to one manager or to two people of the management, by its amount.
This recipe builds a purchase request: a request up to 1000 EUR needs the approval of any one manager, a bigger one the approval of two people of the management. Approved and rejected requests are closed with their result.
1. Create the process and the forms
1. Open Processes, select Create, enter the Name Purchase request and select SUBMIT. Open its designer.
2. Create a form Purchase request (see Forms) with a Form with two fields, Item (path item, required) and Amount (EUR) (path amount, type number, required), the button SEND, and a Flow Output Send for the submit of the form.
3. Create a form Approval with two Form components:
- one with the field Comment (path
comment) and the buttonAPPROVE, with a Flow OutputApprovefor its submit, - one with the field Reason (path
comment) and the buttonREJECT, with a Flow OutputRejectfor its submit.
4. Install the Switch component. See Conditions.
2. Draw the process
Drag these nodes onto the canvas and connect them. The form Approval is on the canvas twice.
| From | Output | To | Input |
|---|---|---|---|
| Start | Start | Purchase request | No data |
| Purchase request | Send | Switch | Input |
| Switch | Over 1000 | Approval (management) | No data |
| Switch | Up to 1000 | Approval (manager) | No data |
| both Approval nodes | Approve | Close Approved | Payload |
| both Approval nodes | Reject | Close Rejected | Payload |

3. Configure the nodes
| Node | Settings |
|---|---|
| Start | Name Purchase request, Permissions staff |
| Purchase request | Workflow action Create, Workflow name Request, Permissions staff, Template name Purchase: {{ value.item }}, Template subject {{ value.amount }} EUR |
| Switch | Message data, path amount; conditions > Number 1000 named Over 1000, and <= Number 1000 named Up to 1000 |
| Approval (management) | Workflow action Step, Workflow name Management approval, Approval by several people All of them, Approvers mark@example.com, paul@example.com, Approve with the button Approve, Reject with the button Reject, Path of the comment comment |
| Approval (manager) | Workflow action Step, Workflow name Manager approval, Approval by several people Any one of them, Approvers managers, the same buttons and path |
| Close | Name Approved, Template result Approved |
| Close | Name Rejected, Template result Rejected |
Use the e-mails of your own people and your own permissions. Select APPLY in each settings window and in the toolbar. Then select Publish in the toolbar, write First version and select PUBLISH. See Approvals by several people and Process versions.
4. Try it
- In the Inbox, select Create > Purchase request, enter
Laptops for the new teamand2400, and select SEND. - The task waits at Management approval in the Inbox of both approvers. The first one assigns it, writes a comment and selects APPROVE. The task leaves their Inbox and waits for the second one.
- The second approver approves it too. The task is closed with the result Approved, and its history shows both decisions with their comments.
- A request of
300goes to Manager approval, where one decision of any manager is enough.