Conditional routing (v1)
Stable / GA
This is the current stable version of this step type.
A decision step represents a conditional branching point in the flow
A decision step represents a conditional branching point in the flow. Decision steps evaluate conditions and route execution to different paths based on the result. This can include one or more routes (branches).
Key features
- Outgoing Transitions: Must have at least one outgoing transition
- Routing: Transitions should specify routes to indicate the condition result.
- No Data block I/O: Does not consume or produce data blocks directly.
- Sequential Evaluation: Evaluates choices sequentially until one matches.
- AND Logic: Each choice can have multiple conditions that must ALL be true (AND logic).
- Default Fallback: Falls back to default route if no choices match.
Configuration
| Option | Type | Required | Description |
|---|---|---|---|
choices | object[] | Yes | Array of choice objects defining conditional branches. Evaluated sequentially in order until one matches. |
default | string | Yes | Default route name used when no choices match. |
Choice object
| Option | Type | Required | Description |
|---|---|---|---|
conditions | object[] | Yes | Array of condition objects that must ALL be true (AND logic). |
then | string | Yes | Route name to use when all conditions in this choice are satisfied. |
Condition object
Condition object — Single value condition
| Option | Type | Required | Description |
|---|---|---|---|
left_operand | string | Yes | References the last data block of this type from upstream steps. Use dot-notation to reference a specific field, e.g. datablock.property or datablock.nested.field. Field names are case-sensitive. |
operator | string | Yes | Comparison operator to apply. Accepted values: gt, lt, gte, lte, eq, ne. |
value | any | No | Single value for comparison. Required for eq, ne, gt, lt, gte, lte operators. |
Condition object — Range condition
| Option | Type | Required | Description |
|---|---|---|---|
left_operand | string | Yes | References the last data block of this type from upstream steps. Use dot-notation to reference a specific field, e.g. datablock.property or datablock.nested.field. Field names are case-sensitive. |
operator | string | Yes | Comparison operator to apply. Accepted values: between, not_between. |
range | tuple | Yes | Array of two values [lower, upper] for range operations. Required for between and not_between operators. |
Condition operators
| Operator | Description | Requires |
|---|---|---|
| eq | Equal | value |
| ne | Not equal | value |
| gt | Greater than | value |
| lt | Less than | value |
| gte | Greater than or equal | value |
| lte | Less than or equal | value |
| between | Between range (inclusive) | range |
| not_between | Not between range | range |
Example configuration
{
"choices": [
{
"conditions": [
{
"left_operand": "documentVerification.verdict",
"operator": "eq",
"value": "success"
}
],
"then": "success"
},
{
"conditions": [
{
"left_operand": "documentVerification.verdict",
"operator": "eq",
"value": "failure"
}
],
"then": "failure"
},
{
"conditions": [
{
"left_operand": "basicIdentity.birthDate",
"operator": "between",
"range": ["2024-06-01", "2024-06-30"]
}
],
"then": "success"
}
],
"default": "error"
}