Skip to main content
The Switch node evaluates a variable against multiple cases and routes the flow to the matching branch. It works like a switch/case statement — if no case matches, the flow takes the Default path.

Behavior

  • Reads the specified variable’s value
  • Compares against each case using the configured match type
  • Routes to the first matching case, or Default if none match
  • Output handles are dynamic — one handle per case plus a Default handle

Configuration

ParameterTypeDefaultOptionsDescription
variablestring""Variable name to evaluate
matchTypeenum"exact"exact, contains, regexHow to compare variable value against cases
caseSensitivebooleanfalseEnable case-sensitive matching
casesstring[][]List of case values to match against. Each case generates an output handle.

Match types

TypeDescription
exactVariable value must exactly equal the case value
containsVariable value must contain the case value as a substring
regexCase value is treated as a regular expression pattern

Output handles

Switch output handles are dynamic — each case generates a handle, plus a Default handle for the fallback:
HandleDescription
[Case Value]Flow follows this path when the variable matches this case
DefaultFlow follows this path when no case matches

Use cases

Switch on {{language}} with cases en, es, fr, and a Default fallback. Route each to a language-specific TTS greeting.
After an IVR Menu collects a department name via speech input, switch on the transcript to route to Sales, Support, or Billing queues.
After an API Call, switch on {{status_code}} with cases 200, 404, 500 to handle different response scenarios.