Understanding branching conditions (Legacy)

<body>
<p id="docs-hc-snippet" style="display: none;">This article includes the following sections:</p>
<div class="article-banners">
<div id="docs-wmp-link">
<a href="https://support.zendesk.com/hc/en-us/articles/5411234991258-plan" rel="noopener" target="_blank">What's my plan?</a>
</div>
<div class="article-banner" id="suite_all">
<table>
<tbody>
<tr>
<td>
<strong>All Suites</strong>
</td>
<td>Team, Growth, Professional, Enterprise, or Enterprise Plus</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="body">
<div class="p" id="topic_tjn_hrm_gwb__note_owy_qnb_hbc">
<div class="note attention" id="topic_tjn_hrm_gwb__note_vyj_xg2_f2c">
<span class="attentiontitle"></span> <span class="ph">This article describes functionality that moved into legacy
status on February 2, 2025. On December 10, 2026, this functionality will no longer
be available. For more information, see <a href="https://support.zendesk.com/hc/en-us/articles/10487730059034" target="_blank">this announcement</a>.</span>
</div>
</div>
<div class="p"><div class="div">You can configure the <strong class="ph b">Branch by condition</strong> step to evaluate data stored in <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/5480101976218" target="_blank">variables</a> and branch a messaging AI agent conversation
based on that data.<p class="p">This article includes the following sections:</p>
<div class="p">
<ul class="ul" id="topic_tjn_hrm_gwb__ul_j3r_zx5_3wb">
<li class="li"><a class="xref" href="#topic_a2d_q31_jwb">Branch by condition step
basics</a></li>
<li class="li"><a class="xref" href="#topic_lrt_p31_jwb">Condition
elements</a></li>
<li class="li"><a class="xref" href="#topic_xww_qnl_pwb">Nested conditions</a></li>
</ul>
</div>
</div></div>
</div>
<div aria-labelledby="ariaid-title2" class="topic nested1" id="topic_a2d_q31_jwb">
<h2 class="title topictitle2" id="ariaid-title2">Branch by condition step basics</h2>
<div class="body">
<div class="bodydiv">
<p class="p">When you add a new
<strong class="ph b">Branch by condition</strong>
step to your answer flow,
the following settings are included:</p>
<div class="p">
<ul class="ul" id="topic_a2d_q31_jwb__ul_yrk_cj1_jwb">
<li class="li">
<strong class="ph b">Name</strong>
that identifies the step on the canvas.</li>
<li class="li">
<strong class="ph b">Two default branches</strong>
that must be configured before the answer
flow can be published:
<div class="p">
<ul class="ul" id="topic_a2d_q31_jwb__ul_wgk_pj1_jwb">
<li class="li">
<strong class="ph b">If this</strong>: If the branch's conditions are met, the
conversation follows the branch's steps</li>
<li class="li">
<strong class="ph b">Else</strong>: If the conversation doesn't match the
conditions of any other branch, the conversation follows
this branch's steps</li>
</ul>
</div>
</li>
</ul>
</div>
<p class="p">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.</p>
<p class="p">To add an additional branch, click
<strong class="ph b">Add branch</strong>
and configure the following
settings for each branch:</p>
<div class="p">
<ul class="ul" id="topic_a2d_q31_jwb__ul_zp2_fm1_jwb">
<li class="li">
<strong class="ph b">Name</strong>
that describes the condition for the branch. This name
appears as the branch name on the canvas.</li>
<li class="li">
<strong class="ph b">Condition</strong>
that includes the following elements:
<div class="p">
<ul class="ul" id="topic_a2d_q31_jwb__ul_pmq_tm1_jwb">
<li class="li">
<strong class="ph b">Variable</strong>: The data that will be evaluated to see if
the condition is met.</li>
<li class="li">
<strong class="ph b">Operator</strong>: How the data from the variable and value
are compared. Includes
<em class="ph i">is</em>,
<em class="ph i">is not,</em>
<em class="ph i">contains</em>, and
<em class="ph i">does not contain</em>.</li>
<li class="li">
<strong class="ph b">Value</strong>: Value expected for the condition specified by
the operator.</li>
</ul>
</div>
<p class="p">See
<a class="xref" href="#topic_lrt_p31_jwb">Condition
elements</a>
for more information.</p>
</li>
</ul>
</div>
<p class="p">You can combine conditions for a branch using the
<strong class="ph b">AND/OR</strong>
drop-down. For
example, the following branch checks whether a user is located in Australia or
the United States.</p>
<p class="p"><img class="image img-screenshot" id="topic_a2d_q31_jwb__image_iz3_hql_pwb" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/flow-builder-or-condition-example.png" width="350"></p>
<p class="p">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.</p>
</div>
</div>
</div>
<div aria-labelledby="ariaid-title3" class="topic nested1" id="topic_lrt_p31_jwb">
<h2 class="title topictitle2" id="ariaid-title3">Condition elements</h2>
<div class="body">
<p class="p">Conditions are comprised of
<a class="xref" href="#topic_hhd_xrm_gwb">variables</a>,
<a class="xref" href="#topic_bdj_xrm_gwb">operators</a>, and
<a class="xref" href="#topic_hk4_xrm_gwb">values</a>.</p>
</div>
<div aria-labelledby="ariaid-title4" class="topic nested2" id="topic_hhd_xrm_gwb">
<h3 class="title topictitle3" id="ariaid-title4">About variables</h3>
<div class="body">
<div class="p"><div class="div"> A <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/5480101976218" target="_blank">variable</a> is a container for data related to a
conversation, such as a customer's location or membership status. A
variable's data can come from information collected in an <strong class="ph b">Ask for
Details</strong> or <strong class="ph b">Make API call</strong> step or <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/5314129059482" target="_blank">messaging authentication metadata</a>. <p class="p">In a
condition, a variable's value is compared to a static value. Variables
are added to the condition using a drop-down menu.</p>
For more
information about variable types and creating variables, see <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/5480101976218" target="_blank">Using variables to personalize AI agent answers</a>. </div></div>
</div>
</div>
<div aria-labelledby="ariaid-title5" class="topic nested2" id="topic_bdj_xrm_gwb">
<h3 class="title topictitle3" id="ariaid-title5">About operators</h3>
<div class="body">
<p class="p">The operator determines how the variable's data is compared to the
value. Operators are added to a condition using a drop-down menu.</p>
<p class="p">The following operators are available. All operator matching is case-insensitive.</p>
<div class="p">
<table border="1" cellpadding="4" cellspacing="0" class="simpletable" id="topic_bdj_xrm_gwb__simpletable_yxq_2vq_tbc" summary="">
<col style="width:43.290043290043286%">
<col style="width:56.709956709956714%">
<thead>
<tr class="sthead">
<th class="stentry" id="d88e254" style="vertical-align:bottom;text-align:left;">When I’m using the conditional step in bot builder…</th>
<th class="stentry" id="d88e257" style="vertical-align:bottom;text-align:left;">Available operators</th>
</tr>
</thead>
<tbody>
<tr class="strow">
<td class="stentry" headers="d88e254" style="vertical-align:top;">I want to be able to evaluate data stored as a
<strong class="ph b">number</strong>
</td>
<td class="stentry" headers="d88e257" style="vertical-align:top;">
<p class="p" dir="ltr">Operators for Zendesk known use cases for evaluating
numbers:</p>
<ul class="ul" id="topic_bdj_xrm_gwb__ul_jhd_pvq_tbc">
<li class="li" dir="ltr">Equal to or greater than </li>
<li class="li" dir="ltr">Equal to or less than </li>
<li class="li" dir="ltr">Greater than </li>
<li class="li" dir="ltr">Less than </li>
<li class="li" dir="ltr">Equal to </li>
<li class="li" dir="ltr">Not equal to </li>
</ul>
</td>
</tr>
<tr class="strow">
<td class="stentry" headers="d88e254" style="vertical-align:top;">I want to be able to evaluate data stored as a
<strong class="ph b">string</strong>
</td>
<td class="stentry" headers="d88e257" style="vertical-align:top;">
<p class="p" dir="ltr">Operators for Zendesk known use cases for evaluating
strings:</p>
<ul class="ul" id="topic_bdj_xrm_gwb__ul_rmt_vvq_tbc">
<li class="li" dir="ltr">Is </li>
<li class="li" dir="ltr">Is not </li>
<li class="li" dir="ltr">Contains </li>
<li class="li" dir="ltr">Does not contain </li>
<li class="li" dir="ltr">Starts with </li>
<li class="li" dir="ltr">Ends with </li>
</ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div aria-labelledby="ariaid-title6" class="topic nested2" id="topic_hk4_xrm_gwb">
<h3 class="title topictitle3" id="ariaid-title6">About values</h3>
<div class="body">
<p class="p">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
<code class="ph codeph">membership_status</code>is "platinum",
"platinum" is the value.</p>
<div class="p">The input field used to specify a condition's value varies based on the variable. For the
<strong class="ph b">Authenticated status</strong> variable, you specify the condition's value
using a boolean drop-down field. For other variables, you specify the
condition's value using a text input field.<div class="note">
<span class="notetitle">Note:</span> The authenticated status
variable is only available as a branching option if you have <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4411666638746" target="_blank">created a messaging key for JWT
authentication</a>. </div>
</div>
<p class="p"><a class="xref" href="https://support.zendesk.com/hc/en-us/articles/5480101976218#topic_yyz_dkh_twb" target="_blank">Customer variables</a> collected during an <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408836323738#topic_i5r_grz_n5b" target="_blank">Ask for details</a> 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
<code class="ph codeph">membership_status</code>drop-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. </p>
</div>
</div>
</div>
<div aria-labelledby="ariaid-title7" class="topic nested1" id="topic_xww_qnl_pwb">
<h2 class="title topictitle2" id="ariaid-title7">Nested conditions</h2>
<div class="body">
<p class="p">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
<strong class="ph b">AND</strong>
and
<strong class="ph b">OR</strong>.</p>
<div class="p">For example, the following branch uses a nested condition to check if the user meets
the following criteria:
<ul class="ul" id="topic_xww_qnl_pwb__ul_w2t_vfj_pwb">
<li class="li">The user has a “platinum” membership status AND</li>
<li class="li">The user is located in one of the following countries:
<ul class="ul" id="topic_xww_qnl_pwb__ul_djw_yfj_pwb">
<li class="li">Australia OR</li>
<li class="li">The United States</li>
</ul>
</li>
</ul>
</div>
<p class="p"><img class="image img-screenshot" id="topic_xww_qnl_pwb__image_sqv_ngj_pwb" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/nested-condition-example.png" width="350"></p>
<p class="p">You can only nest conditions up to three levels deep. Each level, including the top
level, can contain up to six conditions.</p>
</div>
</div>
<script id="docs-schema-markup" type="application/ld+json">{
"@context": "https://schema.org",
"@type": "TechArticle",
"@id": "https://support.zendesk.com/hc/en-us/articles/5280598023450",
"url": "https://support.zendesk.com/hc/en-us/articles/5280598023450",
"headline": "Understanding branching conditions (Legacy)",
"description": "You can configure a branching step to evaluate variables and direct a messaging AI agent conversation based on conditions using variables, operators, and values, including nested conditions for complex logic.",
"articleSection": "Using bot builder to create answers (Legacy)",
"datePublished": "2023-01-05T00:05:37+00:00",
"dateModified": "2026-05-12T16:33:30.117018+00:00",
"inLanguage": "en-US",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://support.zendesk.com/hc/en-us/articles/5280598023450"
},
"author": {
"@type": "Organization",
"name": "Zendesk",
"@id": "https://www.zendesk.com"
},
"publisher": {
"@type": "Organization",
"name": "Zendesk",
"@id": "https://www.zendesk.com"
},
"isPartOf": {
"@type": "WebSite",
"name": "Zendesk Help",
"@id": "https://support.zendesk.com/hc/"
},
"about": {
"@type": "SoftwareApplication",
"name": "Zendesk",
"@id": "https://www.zendesk.com"
}
}</script>
</body>