Skip to main content

Overview

Router nodes perform pure conditional logic routing without having any conversation. They instantly evaluate conditions based on variables and data, then transition to the appropriate next node. Think of router nodes as the “if/else” or “switch/case” statements of your flow. Key characteristic: Router nodes execute instantly—no conversation, no waiting for user input, just logic evaluation and immediate transition.

When to Use

Use router nodes to:
  • Route based on extracted data: Direct flow based on account status, tier, location
  • Implement business logic: Different paths for different customer segments
  • Create decision trees: Multi-branch routing based on multiple conditions
  • Handle tool responses: Route based on API results
  • A/B test flows: Split traffic between different conversation paths
  • Time-based routing: Different flows for business hours vs after hours
  • Priority routing: High-value leads to different paths
Use Router Node when:
  • Decision is based on variables/data, not conversation
  • You need multiple conditional branches
  • Logic is deterministic (not LLM-based)
  • Instant routing without user interaction
Use Conversation Node instead when:
  • Need to ask questions to determine next step
  • Decision requires conversation context
  • Want natural language understanding

Core Configuration

Router nodes have minimal configuration—they’re pure routing logic.
The power of router nodes is entirely in their transitions. All logic is defined through transition conditions.

Transition Types

Router nodes support structured equation and always transitions. Natural language transitions are not typically used (no conversation to evaluate).

Structured Equation Transitions

Define logical conditions using variables and operators.

Simple Condition

Multiple Conditions (AND Logic)

All conditions must be true.

Multiple Conditions (OR Logic)

Any condition can be true.

Always Transition

Fallback when no other conditions match.
Always include an “always” transition as a fallback. Router nodes without a matching transition will cause flow errors.

Operators

Use these operators in equation conditions:

Comparison Examples

String comparison:
Numeric comparison:
Boolean comparison:
Contains:

Use Cases & Examples

Example 1: Account Status Routing

Scenario: Different flows for different account statuses.

Example 2: Budget-Based Lead Qualification

Scenario: Route leads to different sales tiers based on budget.

Example 3: Time-Based Routing

Scenario: Different flows for business hours vs after hours.

Example 4: Geographic Routing

Scenario: Route to region-specific agents.

Example 5: Customer Tier & Purchase History

Scenario: VIP treatment for premium customers with purchase history.

Example 6: Multi-Factor Lead Scoring

Scenario: Complex lead scoring with multiple factors.

Example 7: Inventory-Based Routing

Scenario: Different flows based on product availability.

Example 8: Payment Status Routing

Scenario: Handle different payment outcomes.

Advanced Patterns

Nested Routers

Chain multiple routers for complex decision trees.

Router + Conversation Hybrid

Use routers to branch, then personalize with conversation.

A/B Testing

Split traffic randomly or by criteria for testing.

Priority Escalation

Route urgent cases immediately.

Flow Examples

Example Flow 1: Customer Service Routing

Example Flow 2: Lead Qualification

Example Flow 3: Nested Decision Tree


Troubleshooting

Issue: Router always takes the same path

Possible causes:
  • Variable not being set correctly
  • Variable value is different than expected
  • Always transition is first (catches everything)
Solution:
  1. Check variable extraction in previous nodes
  2. Debug variable values using test calls
  3. Verify transition order (always should be last)
  4. Add logging to see actual variable values

Issue: Flow gets stuck at router

Possible causes:
  • No transition matches and no always fallback
  • Variable doesn’t exist
  • Condition syntax error
Solution:
  1. Always add an “always” transition
  2. Verify variables exist before router
  3. Check condition syntax
  4. Test with various input values

Issue: Wrong path being taken

Possible causes:
  • Variable type mismatch (string vs number)
  • Unexpected variable value
  • Condition logic error
Solution:
  1. Check variable data types
  2. Use correct comparison operators
  3. Test conditions independently
  4. Review extracted variable values

Issue: Cannot reference variable in router

Possible causes:
  • Variable not extracted yet
  • Variable name typo
  • Wrong variable scope
Solution:
  1. Ensure variable is extracted before router
  2. Check variable name spelling: {{exact_name}}
  3. Verify variable is in scope
  4. Review flow order

Performance Considerations

Router nodes are extremely fast:
  • No LLM calls: Pure logic evaluation
  • No API requests: Local computation
  • Instant transitions: Sub-millisecond routing
  • Efficient: Minimal resource usage
Best practices for performance:
  • Use routers for high-volume routing
  • Prefer routers over conversation nodes for data-based decisions
  • Keep condition logic simple for fastest evaluation
  • Order transitions with most likely first

Schema Reference


Next Steps

Transitions

Master all transition types and conditions

Variables

Learn about variable extraction and usage

Tool Node

Extract data to use in router conditions

Conversation Node

Collect data before routing

Best Practices

Build better flows