The Condition step splits the workflow into multiple branches. Execution routes down the first branch whose expression matches — or down the default branch if none match.Documentation Index
Fetch the complete documentation index at: https://docs.anyreach.ai/llms.txt
Use this file to discover all available pages before exploring further.
How it works
The Condition step evaluates each branch’s expression in order against the workflow context (ctx). The first expression that evaluates to true determines which branch executes next. If no expression matches, execution follows the default condition branch.


When to use it
| Use Condition when | Don’t use it when |
|---|---|
| Routing based on a data value (status code, field value, tier) | The logic is computational — use a Code step |
| Classifying free-text with AI judgment | You already have structured data — use JSONata, not AI |
| Implementing a switch over an enum |
Inspector
Clicking on a condition branch in the workflow opens an editor in the inspector. Here, you can set a custom name for the branch and define its associated condition expression.
Expression Types
Each branch in a Condition step uses an expression to determine when that branch should be followed. There are two supported types: JSONata expressions — These are evaluated at runtime against the current workflow context (ctx). Use JSONata when you want to perform checks on structured data.
Examples:

