NodesLogic
Switch
Routes the flow based on one evaluated value and a list of cases.
Logic
Use this when you want to branch based on one field such as region, event type, or mode.
When to use it
- Send different event types to different paths.
- Route one field into many cases.
Routing behavior
Routes the flow to the first matching case id. If no case matches, the default branch runs.
Properties
| Property | Type | Required | Details |
|---|---|---|---|
switchValue switchValue | expression | Optional | Value to evaluate in the switch expression. |
cases cases | switch_cases | Optional | Each case maps to one output route. First matching case wins. |
Common mistakes
- Only the first matching case runs.
- Use If when you need multiple separate comparisons.