Branch on a Value
Sometimes a run should do one thing when a value looks a certain way and something else otherwise, such as only enrolling approved leads or routing high scores to a different step. You evaluate the condition, then route on it.
Nodes involved
- Check evaluates conditions in order and returns one label: the outcome of the first match, or the default outcome.
- Conditional sends the run down one path or another by comparing that label.
How to build it
Evaluate the condition
Add a Check step. Pair each condition with the label it should return. For
example, when an earlier step reported an approved status, return APPROVED,
and set the default outcome to DECLINED.
The condition reads an earlier step’s output. The value Check returns is the label, not a boolean.
Keep the condition simple and readable. If you find yourself testing several things at once, it is often clearer to use more than one Check.