Applies to version: 2022.1.3 and above; author: Grzegorz Straś
The SWITCH operator allows more outcomes and conditions to be handled within the automation, when compared to the standard Condition operator.
The condition within the SWITCH operator is a business rule, whose result will point to the case that will be used. The case can be designated in two ways:
Variable referencing the case
As with the Workflow control step, the result of the rule can be a variable that references one of the available cases.
If the rule does not identify any case, the ELSE case will be used.
SWITCH Operator Value assigned to case
For example, the Current user variable returns the current users language code:
Based on this, the SWITCH operator will choose the correct case that will send a custom e-mail in the user’s language:
Configuration
Any number of cases may be created, and their names and order may be changed. The ELSE case is always at the end.
The operator must have at least 2 cases (including the ELSE case).
The SWITCH operator may be changed to the Vertical layout from the context menu.