Branch by value
The Branch by value action A tool for building the processes, logic, and direction within workflows. directs your workflow to perform different actions, depending on the value of a text variable. At the Branch by value action, the workflow splits into two or more paths, or branches. When the workflow runs, it chooses which branch to use according to the value of the variable you configure:
- If the value exactly matches the name of a branch, the workflow chooses that branch.
- If the value matches no branch names, it chooses the default branch.
For example, using the “Inquiry type” field of a customer contact form to decide whether to contact Sales or Support.”
You can add as many branches as you need.
If you want to choose the branch based on a more complex condition, see Branch by condition.
Before you begin:
-
Understand Variables
-
Understand container actions. You can add actions to create branches such as Branch by stage or to contain other actions such as Action Set that can be collapsed down into a single action high-level view.
Jump to:
Configure the Branch by value action
See the Branch by value action fields, buttons, and settings table for all the configuration fields.
In the Designer page:
-
Click the Logic and flow action group in the action toolbox.
or
Find actions by browsing action groups, or by typing an action name or function in the Search field at the top of the action toolbox.
- Drag the Branch by value action to the point where you want to create multiple paths in the workflow.
- Click the Branch by value action.
- In the Variable to evaluate field, select the variable that the workflow will use to decide which branch to take.
- In the Branches fields, type the value the variable must match for the workflow to choose that branch. The branch names must exactly match the variable value, including case.
-
To add another branch:
-
Click the Add new branch.
-
Type the value of the variable in the Name field of the new branch. The maximum number of branches you can add is 100.
-
-
In the Default branch field, select the branch to use if the variable does not match any branch name.
Tip: Create a branch and name it "Exceptions." Select it for your default branch. This branch will run when the action encounters unexpected data.
Field |
Description |
Variable types |
---|---|---|
Variable to evaluate |
The text variable that controls the branch decision. When the workflow reaches the Branch by value action, the value of this variable determines which branch is taken. |
Text, Integer, Boolean |
Default branch |
The branch the workflow chooses if the variable value does not match the names of any branches. |
(n/a) |
Branches |
The names of each branch in the workflow. For a branch to be selected, the name must match the variable value exactly. The character limit for branch names is 150. |
(n/a) |
Add new branch |
Click to add another branch to the workflow. The maximum number of branches you can add is 100. |
(n/a) |
(Remove) |
Removes the branch. Removing a branch also removes all the actions contained within the branch. |
(n/a) |