Switch
The Switch action node evaluates an expression once and runs the first Case whose value matches. Switch is available in flows.
Usage
A Switch is a chain of linked Case nodes that share a single expression. The first node in the chain holds the expression and is also the first Case. Each following node adds another Case.
When the Switch runs, the expression is evaluated once and compared against each Case in order. The first Case whose value equals the expression runs its block of action nodes. The remaining Cases are skipped.
A Case with no Value configured is the Default. The Default runs when none of the other Cases match. A Switch chain does not need a Default — if no Case matches and there is no Default, the Switch does nothing and execution continues with the next action node after the chain.
Each block in the chain has controls to move it up or down, or add a new Case after it. The first node in the chain is pinned at the top and cannot be moved.
A flow updates orders received from an integration. Each order arrives with a Status enum that can be New, Paid, Shipped, or Cancelled. The flow uses Switch on the Status property to run a different block for each status, with a Default block that logs unknown values.

Matching
Cases are matched using strict equality. The data type of the Case value must match the data type of the expression — "1" does not match 1.
The expression must be a data binding to a property of one of these types:
String
Integer
Float
Boolean
Constants, functions, conditions, null, and value processors are not available on the expression.
Each Case value is entered as a constant, and its data type is locked to the data type of the expression. For an Enum expression, the value picker on each Case shows the options of the referenced enum.
Good to know
Case values are matched against the expression with strict equality, and the data type of each Case value is locked to the data type of the expression. This means a Case configured for an Integer expression cannot be set to the string "1" — the value picker enforces the type.
Exception handling
A Catch Exception action node placed inside a Case behaves the same way as in any other block. It catches exceptions thrown by action nodes inside that Case.
Properties
The Expression property is set on the first node in the chain. The Value property is set on each following Case.
Expression
Set on the first node in the chain only. A data binding to the property whose value is compared against each Case. The property must be one of: Enum, String, Integer, Float, Boolean.
Value
The value the Case is matched against. The data type is locked to the data type of the Expression. Leave Value unset to make the Case the Default.
Last updated
Was this helpful?