Route Flow

Overview

The Route Flow stage evaluates conditions and directs your workflow down different paths based on whether the conditions are true or false. Use it to make decisions, implement business logic, validate data, and create branching workflows.

Configuration

Required Fields

FieldDescriptionExample
Field 1First value to compare (often a variable){{Amount}}, {{PreviousBalance}}
ComparatorComparison operation to performEqual, GreaterThan, Contains, etc.
Field 2Second value to compare against1000, verified, {{FinalBalance}}

Optional Fields

  • Operator: How to combine multiple conditions
    • AND: All conditions must be true for Pass (default)
    • OR: Any condition being true triggers Pass
  • Filter Groups: Nest conditions for complex logic like (A AND B) OR (C AND D)

Comparators

String Comparators

ComparatorDescriptionExample
EqualField 1 exactly equals Field 2{{status}} equals active
NotEqualField 1 does not equal Field 2{{status}} not equal pending
ContainsField 1 contains Field 2 as substring{{email}} contains @company.com
DoesNotContainField 1 does not contain Field 2{{message}} does not contain error
StartsWithField 1 starts with Field 2{{message}} starts with +1
EndsWithField 1 ends with Field 2{{file}} ends with .pdf
IsInCSVField 1 matches a value in comma-separated Field 2{{message}} in admin,manager,supervisor
IsNotInCSVField 1 not in comma-separated Field 2{{message}} not in guest,viewer

Numeric Comparators

ComparatorDescriptionExample
EqualField 1 == Field 2{{Amount}} equals 10
NotEqualField 1 != Field 2{{Amount}} not equal 0
GreaterThanField 1 > Field 2{{order}} > 1000
GreaterThanEqualField 1 ≥ Field 2{{age}}18
LessThanField 1 < Field 2{{price}} < 100
LessThanEqualField 1 ≤ Field 2{{price}}50

Exit Points

ExitWhen
PassAll conditions true (AND) or at least one condition true (OR)
FailConditions evaluated to false

Note: This stage has NO Error exit. Invalid comparators return false and route to Fail.

How It Works

When executed, the stage:

  1. Resolves Values - Processes Field 1 and Field 2 from variables
  2. Performs Comparisons - Evaluates each condition based on comparator
  3. Combines Results - Applies AND/OR logic:
    • AND: Short-circuits on first false, all must be true for Pass
    • OR: Short-circuits on first true, any true triggers Pass
  4. Routes to Exit - Pass if true, Fail if false

Common Use Cases

1. Simple Value Check

  • Field 1: {{Amount}}
  • Comparator: GreaterThan
  • Field 2: 1000
  • Pass: High-value orders to premium processing
  • Fail: Standard processing

2. Multiple Conditions (AND)

  • Operator: AND
  • Condition 1: {{customerStatus}} equals verified
  • Condition 2: {{isRegistration}} equals confirmed
  • Pass: Both true, approve order
  • Fail: Either false, hold for review

3. Multiple Conditions (OR)

  • Operator: OR
  • Condition 1: {{Priority}} equals urgent
  • Condition 2: {{DepositAmount}} greater than 5000
  • Pass: Either urgent OR high-value, send notification
  • Fail: Neither condition true

4. Range Check

  • Operator: AND
  • Condition 1: {{DepositAmount}}100
  • Condition 2: {{DepositAmount}}500
  • Pass: Order in range $100-$500, apply discount
  • Fail: Outside range

Key Behaviours

FeatureBehaviour
Case SensitivityString comparisons are case-sensitive (Adminadmin)
Short-CircuitAND stops at first false, OR stops at first true (performance optimization)
WhitespaceIsInCSV removes spaces around commas, other comparators preserve whitespace
Nested Logic✓ Supports complex conditions via filter groups
No Error ExitInvalid comparators return false, route to Fail (not Error)

Troubleshooting

IssueCommon CauseFix
Always routes to FailWrong comparator or operatorVerify comparator type and AND/OR logic
Case mismatchComparing "Admin" to "admin"Normalize case with Change Data first
Whitespace issues"hello " doesn't equal "hello"Trim values before comparison
Wrong data typeString "100" vs number 100Set filter type to STRING_DATA or DOUBLE_DATA correctly
Inverted logicExpected Pass got FailCheck comparator and field order

Best Practices

  • ✓ Use descriptive stage names (e.g., "Check Order Value")
  • ✓ Keep conditions simple - avoid deeply nested logic
  • ✓ Connect both Pass and Fail exits
  • ✓ Test boundary values and edge cases
  • ✓ Use variables for flexibility instead of hardcoded values
  • ✓ Document complex business rules
  • ✓ Normalize data (case, whitespace) before comparison
  • ✓ Remember AND = all conditions, OR = any condition

Common Mistakes

MistakeSymptomFix
Wrong operator (AND vs OR)Unexpected routingRemember AND = all must be true, OR = any can be true
Not connecting Fail exitWorkflow breaks when falseAlways connect both exits
Comparing wrong data typesAlways routes to FailMatch filter type (STRING/DOUBLE) to data
Missing variableComparison failsEnsure variables exist before Route Flow
Overly complex conditionsHard to debugBreak into multiple Route Flow stages

Related Stages

  • Loop: Use Route Flow inside loops for conditional processing
  • Change Data: Prepare data before routing decisions
  • Fetch Data: Retrieve data needed for routing decisions
  • Call API: Route based on API response values
  • Set Default Value: Ensure variables have values before comparison

Was this article helpful?