Make a decision
Add a decision step that sends the workflow down one path or another, for example when an amount is over your approval limit or a status changes.
A decision step checks a value and sends the workflow one way if the answer is yes, and another way if it is no. It is how you write an approval limit or a status check into a workflow.
- StepRead the billThe total is found.
- DecisionTotal over $10,000?The Condition block checks it.
- ApprovalIf yes: controller approvesThe If path.
- OutputIf no: bill is createdThe Else path.
Before you start
- The value you want to check must come from an earlier step or from what started the run. See Use results from earlier steps.
Add a decision
Add the Condition block
Drag Condition from Core Blocks onto the canvas, after the step that finds the value.
Write the check
Choose the block. Under Conditions, each row has three parts:
- Field: the value to check, such as the bill total from the earlier step.
- The comparison, such as
>(greater than) or contains. - Value: what to compare against, such as 10000.
Add more checks, if needed
Add more rows to check several things. Under Combine With, choose AND — all must be true or OR — any must be true.
Join the two paths
The block has two ways out. Join If to the steps for "yes" and Else to the steps for "no".
Comparisons you can use
| Comparison | Means | Example |
|---|---|---|
=, != | is, is not | Status is "paid" |
>, <, >=, <= | more than, less than | Total is more than 10000 |
| contains, starts with, ends with | the text includes | Vendor name contains "Ltd" |
| exists, is empty | has a value, or has none | PO number is empty |
| matches | follows a text pattern your developer writes | Invoice number follows your format |
Good to know
- For number comparisons, Loopfour ignores $, €, £, ¥ signs and thousands commas, so $10,000 and 10000 compare the same.
- A missing or unreadable amount counts as 0 in a number comparison. So "less than 10000" comes out as yes when the amount is missing. To keep missing amounts on the safer path, check "amount exists" AND "amount
<10000" on If, and send Else to approval. - Each path can lead to as many steps as you need.
Check it worked
Run the workflow with one case for each path, such as a small bill and a large bill. Open each run under Runs and check which path it took.
If something goes wrong
If the wrong path runs, compare the value received with your condition, including missing values and number formats. See Read a run step by step. For a failed step, see Error messages explained.
Related
Steps: what a workflow can do
Browse the types of step a workflow can use, grouped by the job they do, from reading documents to asking for approval and sending messages.
Repeat for each item or run steps side by side
Process each invoice in a list one at a time, or run independent steps at the same time, using the loop and parallel steps in a workflow.
Loopfour