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
Defaultif none match - Output handles are dynamic — one handle per case plus a
Defaulthandle
Configuration
| Parameter | Type | Default | Options | Description |
|---|---|---|---|---|
variable | string | "" | — | Variable name to evaluate |
matchType | enum | "exact" | exact, contains, regex | How to compare variable value against cases |
caseSensitive | boolean | false | — | Enable case-sensitive matching |
cases | string[] | [] | — | List of case values to match against. Each case generates an output handle. |
Match types
| Type | Description |
|---|---|
exact | Variable value must exactly equal the case value |
contains | Variable value must contain the case value as a substring |
regex | Case value is treated as a regular expression pattern |
Output handles
Switch output handles are dynamic — each case generates a handle, plus aDefault handle for the fallback:
| Handle | Description |
|---|---|
| [Case Value] | Flow follows this path when the variable matches this case |
| Default | Flow follows this path when no case matches |
Use cases
Language routing
Language routing
Switch on
{{language}} with cases en, es, fr, and a Default fallback. Route each to a language-specific TTS greeting.Department selection
Department selection
After an IVR Menu collects a department name via speech input, switch on the transcript to route to Sales, Support, or Billing queues.
API response routing
API response routing
After an API Call, switch on
{{status_code}} with cases 200, 404, 500 to handle different response scenarios.