Skip to main content

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 check conditions and send the session down a different route depending on the result. This can include one or more routes (branches).


Key features​

  • Routes: Must have at least one route connected to a next step. Route names are the values you set in each choice's then and in default.
  • 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). A choice with an empty conditions array never matches, so evaluation moves on to the next choice or the default route.
  • Default Fallback: Falls back to default route if no choices match.

Configuration​

OptionTypeRequiredDescription
choicesobject[]YesArray of choice objects defining conditional branches. Evaluated sequentially in order until one matches.
defaultstringYesDefault route name used when no choices match.

Choice object

OptionTypeRequiredDefaultDescription
conditionsobject[]No[]Array of condition objects that must ALL be true (AND logic).
thenstringYes—Route name to use when all conditions in this choice are satisfied.
Condition object
Condition object — Single value condition
OptionTypeRequiredDescription
left_operandstringYesReferences the last data block of this type from upstream steps. Use one of its top-level fields, e.g. datablock.property; a whole-block reference never compares meaningfully at runtime. Field names are case-sensitive.
operatorstringYesComparison operator to apply. Accepted values: gt, lt, gte, lte, eq, ne.
valueanyNoSingle value for comparison. Required for eq, ne, gt, lt, gte, lte operators.
Condition object — Range condition
OptionTypeRequiredDescription
left_operandstringYesReferences the last data block of this type from upstream steps. Use one of its top-level fields, e.g. datablock.property; a whole-block reference never compares meaningfully at runtime. Field names are case-sensitive.
operatorstringYesComparison operator to apply. Accepted values: between, not_between.
rangetupleYesArray of two values [lower, upper] for range operations. Required for between and not_between operators.

Condition operators

OperatorDescriptionRequires
eqEqualvalue
neNot equalvalue
gtGreater thanvalue
ltLess thanvalue
gteGreater than or equalvalue
lteLess than or equalvalue
betweenBetween range (inclusive)range
not_betweenNot between rangerange
note

Always set left_operand to a field of the data block, e.g. pepAndSanctionsResults.isPEP. A left_operand that references the whole data block never compares meaningfully — an eq condition on it never matches, and the session falls through to the next choice or the default route.


Example configuration​

{
"choices": [
{
"conditions": [
{
"left_operand": "pepAndSanctionsResults.isPEP",
"operator": "eq",
"value": false
}
],
"then": "success"
},
{
"conditions": [
{
"left_operand": "pepAndSanctionsResults.isPEP",
"operator": "eq",
"value": true
}
],
"then": "failure"
},
{
"conditions": [
{
"left_operand": "basicIdentity.birthDate",
"operator": "between",
"range": ["2024-06-01", "2024-06-30"]
}
],
"then": "success"
}
],
"default": "error"
}