Sign In

Switch

Route workflow execution to one of many named cases based on conditions evaluated in order, with a configurable fallback.

The Switch node evaluates a list of named cases in order and routes execution to the first case whose condition matches. If no case matches, execution routes to a configurable fallback. Use it when you need more than two branches -- for example, routing by department, status code, or plan tier.

Each case is a single flat condition (not a group), evaluated top to bottom. The first match wins.

Configuration

Cases

Each case defines a named route with a single condition. Add as many cases as you need.

FieldTypeRequiredDescription
Route nametextYesIdentifier for this case, used as the output handle name (e.g. sales, support, billing). Must be unique across cases.
Fieldtemplate stringYesVariable path to the value being tested, e.g. nodes.form1.department
Data typeselectNoType hint: String, Number, Boolean, Date, Array, Object, or Any. Defaults to Any.
OperatorselectYesComparison operator. The list updates based on the selected data type.
Valuetemplate stringConditionalExpected value. Hidden for unary operators like "is empty".
Ignore casetoggleNoCase-insensitive comparison for String and Any types. Defaults to off.

Click Add Case to append a new case. Click the trash icon on any case card to remove it.

Fallback Route

FieldTypeRequiredDescription
Fallback RoutetextNoRoute name used when no case matches. Defaults to default.

Output Handles

The Switch node creates a dynamic output handle for each case name, plus one for the fallback route. Connect downstream nodes to the handle matching the route name you defined.

For example, if you define cases named sales, support, and billing with a fallback of default, the node will have four output handles.

Output

FieldTypeDescription
routestringThe name of the matched case, or the fallback route name if no case matched

Example

A contact form asks users to select their department. You want each department routed to a different integration:

  1. Add a Switch node after the form.
  2. Add three cases:
    • Route name = sales, Field = nodes.contactForm.department, Operator = Equals, Value = sales
    • Route name = support, Field = nodes.contactForm.department, Operator = Equals, Value = support
    • Route name = billing, Field = nodes.contactForm.department, Operator = Equals, Value = billing
  3. Set Fallback Route to other.
  4. Connect each output handle to the appropriate downstream node.

The first matching case determines the route. If the user selects a department not covered by any case, the other fallback fires.

See the Logic Nodes overview for a full list of available nodes.

On this page

Switch | Buildorado