Summary: ◀▼
Use the legacy Branch by condition step to route AI agent conversations based on variable values, such as a customer’s location or membership status. Compare values with operators, combine conditions using AND or OR, and use nested conditions for more complex logic. Branches are checked in order, and an Else branch is required. This functionality is scheduled to be unavailable after June 2027.
This article includes the following sections:
Branch by condition step basics
When you add a new Branch by condition step to your answer flow, the following settings are included:
- Name that identifies the step on the canvas.
-
Two default branches
that must be configured before the answer
flow can be published:
- If this: If the branch's conditions are met, the conversation follows the branch's steps
- Else: If the conversation doesn't match the conditions of any other branch, the conversation follows this branch's steps
Branch by condition can have up to six branches, including the Else branch. The Else branch is required and cannot be removed from the step. You can add up to four additional branches, to a maximum of six branches.
To add an additional branch, click Add branch and configure the following settings for each branch:
- Name that describes the condition for the branch. This name appears as the branch name on the canvas.
-
Condition
that includes the following elements:
- Variable: The data that will be evaluated to see if the condition is met.
- Operator: How the data from the variable and value are compared. Includes is, is not, contains, and does not contain.
- Value: Value expected for the condition specified by the operator.
See Condition elements for more information.
You can combine conditions for a branch using the AND/OR drop-down. For example, the following branch checks whether a user is located in Australia or the United States.

A conversation can only follow one branch. Branches are evaluated in the order they are included in the step. End users that meet the criteria of more than one branch will be sent down the first branch with matched criteria, from top to bottom in the step's configuration panel or left to right on the canvas. Branches can be reordered by dragging the condition panes on the canvas.
Condition elements
About variables
In a condition, a variable's value is compared to a static value. Variables are added to the condition using a drop-down menu.
For more information about variable types and creating variables, see Using variables to personalize AI agent answers.About operators
The operator determines how the variable's data is compared to the value. Operators are added to a condition using a drop-down menu.
The following operators are available. All operator matching is case-insensitive.
| When I’m using the conditional step in bot builder… | Available operators |
|---|---|
| I want to be able to evaluate data stored as a number |
Operators for Zendesk known use cases for evaluating numbers:
|
| I want to be able to evaluate data stored as a string |
Operators for Zendesk known use cases for evaluating strings:
|
About values
A value is static data that's compared to a variable.
It represents the expected data for a variable. For example, in a condition that
checks whether a customer's
membership_statusis "platinum",
"platinum" is the value.
Customer variables collected during an Ask for details step require a corresponding custom
ticket field. For customer variables using a drop-down ticket field, use the
associated tag as the value for a condition. For example, the
membership_statusdrop-down field accepts a "Platinum level"
value with a related "platinum_level" tag. To check whether the customer has a
platinum membership status, use "platinum_level" as the value in the condition.
Nested conditions
A nested condition is a condition that contains two or more conditions inside it. You can use nested conditions to build complex logic that relies on multiple conditions. They are especially useful when combining conditions using both AND and OR.
- The user has a “platinum” membership status AND
- The user is located in one of the following countries:
- Australia OR
- The United States

You can only nest conditions up to three levels deep. Each level, including the top level, can contain up to six conditions.
Article Q&A
Click to view
How do I set up branches in a Branch by condition step, and which branch runs if more than one matches?
Configure each branch with a name and conditions made from a variable, operator, and value. The required Else branch runs when no other branch matches. You can have up to six branches total, including Else. A conversation follows only one branch: if multiple branches match, it follows the first matching branch in the configured order. You can reorder branches by dragging them on the canvas.
How do I choose condition operators for the data I want to evaluate?
Conditions compare a variable’s data with a static value. Variable data can come from an Ask for Details step, a Make API call step, or messaging authentication metadata. For number data, available operators are equal to or greater than, equal to or less than, greater than, less than, equal to, and not equal to. For string data, operators are is, is not, contains, does not contain, starts with, and ends with. Operator matching is case-insensitive.
Why isn’t my customer dropdown value matching in a condition?
Customer variables collected during an Ask for Details step require a corresponding custom ticket field. For a customer variable that uses a dropdown ticket field, use the associated tag as the condition value. For example, use `platinum_level` rather than “Platinum level.” The Authenticated status variable uses a boolean dropdown and is available as a branching option only if you have created a messaging key for JWT authentication.
Can I combine AND and OR logic in a branch, and how deeply can I nest conditions?
Yes. You can combine conditions using the AND/OR control and use nested conditions for more complex logic. Nesting is limited to three levels, and each level, including the top level, can contain up to six conditions.
How long will Branch by condition remain available?
This functionality moved into legacy status on February 2, 2025, and will no longer be available after June 2027.