Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.colossal.sh/llms.txt

Use this file to discover all available pages before exploring further.

A choice step evaluates conditions and routes execution to different branches based on the result.

Configuration

FieldTypeDescription
conditionsarrayList of condition objects, evaluated in order
defaultNextstringStep ID to execute if no conditions match
Each condition has:
FieldTypeDescription
fieldstringValue to evaluate (supports template variables)
operatorstringComparison operator
valueanyValue to compare against
nextstringStep ID to execute if this condition is true

Operators

OperatorDescription
equalsExact match
not_equalsDoes not match
greater_thanNumeric greater than
less_thanNumeric less than
containsString contains substring
not_containsString does not contain substring

Example

{
  "id": "check-order-value",
  "type": "choice",
  "conditions": [
    {
      "field": "{{payload.total_amount}}",
      "operator": "greater_than",
      "value": 10000,
      "next": "high-value-flow"
    },
    {
      "field": "{{payload.total_amount}}",
      "operator": "greater_than",
      "value": 5000,
      "next": "medium-value-flow"
    }
  ],
  "defaultNext": "standard-flow"
}
Conditions are evaluated top to bottom. The first matching condition determines the branch. If none match, defaultNext is used.

Next steps