Skip to main content
The switch node provides multi-way branching. It evaluates an expression and matches against cases using exact values, numeric ranges, or regex patterns.

Configuration

Config Fields

Case Object

Each case can use one of three match types:

Match Types

Exact Match

Match against a specific value:
Match against multiple values:

Range Match

Match numeric values within a range:

Pattern Match

Match using regular expressions:

Output

Examples

Route by HTTP Status

Categorize by Score

Route by URL Pattern

Boolean Switch

Evaluation Order

  1. Cases are evaluated in order
  2. Pattern match is checked first (if pattern is set)
  3. Range match is checked next (if min or max is set)
  4. Exact match is checked last (if value is set)
  5. First matching case wins
  6. If no case matches, default branch executes

Type Coercion

The switch node performs smart type coercion:
  • String "true"/"false" are converted to booleans
  • Numeric strings are parsed as numbers for range comparisons
  • Array values allow matching against any element