Inputs
Outputs
None. The Switch block controls which path runs. It does not produce a data variable. To use outputs, reference the blocks inside the case path you took, not the Switch block itself. For example, a record created on the high-value path is available downstream as{{ steps.create_record.record_id }}.
Behavior
Cases evaluate in order, from the first case to the last. The workflow runs the first case whose conditions are true, then stops checking the rest. So a record that satisfies two cases only ever takes the earlier one. Order your cases from most specific to most general. This stops a broad case from swallowing a narrower one. When no case matches, the run takes the default path if you connected one. If you did not connect a default path, the run ends quietly at the Switch block. This is a normal stop, not an error. The default path is your catch-all. Connect it to handle the records you did not anticipate, or leave it unconnected to stop those runs on purpose. Each case is an independent branch. Only the blocks on the case that runs execute. Blocks on the paths you did not take consume no credits and produce no outputs.Gotchas
- A later case never runs when an earlier case is too broad. Evaluation stops at the first true case. So a general case placed before a specific one captures records meant for the specific case. Order cases from most specific to most general, and reserve broad catch-all logic for the default path.
- Records vanish when no case matches and no default is connected. With no matching case and no default path, the run stops silently at the Switch block. Connect a default path whenever you need to know which records fell through. Or confirm that a silent stop is the behavior you want.
- Case names like
Case 1make run history unreadable. Generic names give the run viewer no business meaning, so you cannot tell at a glance which path a record took. Rename each case for what it represents, such asEnterprise,Mid-market, andSMB.
Examples
Routing leads by deal size
A Switch block sends each new opportunity down a path sized to its value. A default path catches everything that does not fit a band.
An opportunity with an
amount of 150000 matches the Enterprise case first and never reaches Mid-market. So it takes the high-touch onboarding path.
Branching a lead score into explainable bands
A Switch block turns a numeric score into named tiers. The run history then reads as the business logic rather than as raw thresholds.lead_score of 64 matches the Warm case and enrolls in the nurture sequence. A lead scored 88 matches Hot first and triggers the Slack alert.