Send approvals a different way by amount, days or type
One screen can have several approval chains, each with a condition. The request takes the first chain whose condition it matches. A chain with no condition catches everything else.
Before you start
- Conditions test the fields on the top part of the request, such as Number of Days, Amount or Leave Type. They cannot test a field on the request's lines.
- Write the ranges so that they do not overlap and leave no gap: "3 or less" and "more than 3", not "less than 3" and "more than 3", which loses exactly 3.
- There is no "between" comparison. Build a range from two lines joined with And.
Steps
- Build the first chain as in Build an approval chain, with its stages.
- Add its condition on the Trigger Condition tab. First line: Trigger Rule When, the field, the comparison, the value, for example Number of Days, less than or equal to, 3.
- For a range, add a second line with Trigger Rule And: Amount, greater than, 50000 on the first line and Amount, less than or equal to, 200000 on the second.
- For either of two values, join the lines with OR: Leave Type, is, Annual OR Leave Type, is, Sick.
- Save, then build the next chain on the same screen with its own condition, for example Number of Days, greater than, 3.
- Add a catch-all chain with no condition if any request might fall outside every range. Without one, an unmatched request approves itself.
- Test each range with one request at the edge, such as exactly 3 days.
Worked example
| Short leave | Long leave | |
|---|---|---|
| Condition | Number of Days, less than or equal to, 3 | Number of Days, greater than, 3 |
| Stage 1 | Reporting To, 100 | Reporting To, 100 |
| Stage 2 | none | Head of department, 100 |
Check it worked
- A 3-day request goes to the supervisor only; a 4-day request goes on to the head of department.
- A request at each boundary lands in the chain you meant.
If it goes wrong
- A request approved itself. It matched no chain's condition and no catch-all exists. Look for a gap between the ranges, or add a chain with no condition.
- The wrong chain was used. Two chains both match, and the first one found wins. Make the ranges exclusive.
- "Use OR" when saving two is conditions on one field joined by And. A field cannot hold two values at once. Use OR.
- "An object cannot be empty". A condition line has no field picked.
- I need "between". Not supported. Use two lines, greater than or equal to and less than or equal to, joined with And.
- I need to route by a field on the lines (for example one item's cost). Not supported; conditions read the top of the request only. Put the deciding value on the header, or use one chain for all.