Branch by value

The Branch by valueaction A tool for building the processes, logic, and direction within workflows. Actions are the steps the workflow performs to complete a process. directs your workflow or agentflow to perform different actions, depending on the value of a text variable. At the Branch by value action, the workflow or agentflow splits into two or more paths, or branches. When the workflow or agentflow 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 flow proceeds along 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: 

  1. Add the action to the designer canvas and open the action configuration panel. For more information, see Add an action to the workflow.

  2. In the Variable to evaluate field, select the variable that decides which branch to take.
  3. In the Branches fields, type the value the variable must match for the workflow or agentflow to choose that branch. The branch names must exactly match the variable value, including case.
  4. To add another branch:

    1. Click the Add new branch.

    2. Type the value of the variable in the Name field of the new branch. The maximum number of branches you can add is 100.

  5. 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.