If/Else Router

The If/Else Router node enables your flow to branch based on different conditions. You can string together multiple conditions to handle various scenarios, with each condition creating a new path in the conversation.

Setting up conditional routing:

  1. Select condition type (Signal, Language, or other available types)

  2. Configure the value to check for that condition

  3. Combine multiple conditions using "+ Add condition" (by If or And operator)

  4. Create specific cases for each scenario

  5. Set up an "Else" path for when no conditions match

Example:

Example of If/Else Router use

Common use cases:

  • Check conversation state signals (start, interrupt, end)

  • Route based on user's language

  • Handle different user inputs

  • Process system events

  • Manage conversation flow based on multiple conditions

Important considerations:

  • Each condition creates a new path - keep them organized (e.g. by moving them to separate flows)

  • Conditions are checked in order, from top to bottom

  • The Else path handles any case not covered by specific conditions

  • You can remove individual conditions using "Remove case"

  • Multiple conditions can be combined for complex routing

  • Test all paths to ensure proper handling

Last updated

Was this helpful?