Using conditional blocks in conversation flows for AI agents

<body>
<p id="docs-hc-snippet" style="display: none;">In thedialogue builder, conditional blocks activate dialogue branches based on information in the conversation. This article explains what conditional blocks are and how to set them up for an AI agent.</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 class="article-banner" id="support_all">
<table>
<tbody>
<tr>
<td>
<strong>Support</strong>
</td>
<td>Team, Professional, or Enterprise</td>
</tr>
</tbody>
</table>
</div>

</div>

<div class="body">

<div class="note attention" id="conditional_blocks_using__note_e4y_nnr_2jc">
<span class="attentiontitle"></span> <span class="ph">The functionality described in this article is being rolled
out to all Suite and Support plans from May 11 through June 12, 2026. You may not
see this functionality in your account yet. See <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/10487730059034" target="_blank">this announcement</a> for details.</span>
</div>
<p class="p">In the <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8357749494810" target="_blank">dialogue builder</a>, conditional blocks activate dialogue branches
based on information in the conversation. This article explains what conditional blocks are
and how to set them up for an AI agent.</p>
<div class="p">The article contains the
following sections:<ul class="ul" id="conditional_blocks_using__ul_yj2_5wp_xfc">
<li class="li"><a class="xref" href="#topic_sds_xwp_xfc">Understanding conditional
blocks</a></li>
<li class="li"><a class="xref" href="#topic_nbw_nxp_xfc">Adding a conditional block to a
dialogue</a></li>
</ul>
</div>
</div>
<div aria-labelledby="ariaid-title2" class="topic nested1" id="topic_sds_xwp_xfc">
<h2 class="title topictitle2" id="ariaid-title2">Understanding conditional blocks</h2>
<div class="body">
<p class="p">Conditional blocks let you customize a conversation flow based on certain conditions. You
can create conditional blocks based on: </p>
<ul class="ul" id="topic_sds_xwp_xfc__ul_thx_w1c_cgc">
<li class="li">
<a class="xref" href="https://support.zendesk.com/hc/en-us/articles/9522180655386" target="_blank">Parameters</a>, which let you shape conversations based on
information from your CRM platform, session data, or backend integrations. </li>
<li class="li">
<a class="xref" href="https://support.zendesk.com/hc/en-us/articles/9413046533530" target="_blank">Segments</a>, which let you shape conversations based on different
types of customers. </li>
</ul>
<p class="p">Each conditional block represents a conditional statement that requires: </p>
<ul class="ul" id="topic_sds_xwp_xfc__ul_dbl_ycc_cgc">
<li class="li">A condition (a parameter or segment) </li>
<li class="li">An operator (such as “is” or “Is ANY of”) </li>
<li class="li">A value or set of values (including a null value) </li>
</ul>
<p class="p">When the conversation reaches the conditional block within a dialogue, the system evaluates
the conditional statement as true or false. Based on the outcome, the conversation continues
down the appropriate branch in the dialogue, as configured by you. </p>
<p class="p">For example, you could configure the following conditional block: </p>
<ul class="ul" id="topic_sds_xwp_xfc__ul_fxq_zcc_cgc">
<li class="li">Parameter: country </li>
<li class="li">Operator: is </li>
<li class="li">Values: Germany, Japan </li>
</ul>
<p class="p">In this example, a customer reaching out to your AI agent will receive a different message
based on their location, which is determined by the country parameter. Referencing the image
below, if the customer is in: </p>
<ul class="ul" id="topic_sds_xwp_xfc__ul_wn2_1dc_cgc">
<li class="li">Germany, the conversation progresses down the left branch. </li>
<li class="li">Japan, the conversation progresses down the middle branch. </li>
<li class="li">Any other country, the conversation progresses down the right branch (the fallback
branch).<p class="p"><img class="image" id="topic_sds_xwp_xfc__image_twd_fdc_cgc" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/aiaa_conditional_block_example.png" width="600"></p>
</li>
</ul>
<p class="p">It’s important to understand and account for all possible scenarios when creating a
conditional block and its resulting conversational branches, especially if you’re using
values returned from an API. </p>
<p class="p">Conditions are checked from left to right. Ensure that broader conditions you configure are
positioned to the right of other, narrower conditions. The fallback condition, the broadest
condition, is always positioned furthest right and can’t be moved. </p>
</div>
</div>
<div aria-labelledby="ariaid-title3" class="topic nested1" id="topic_nbw_nxp_xfc">
<h2 class="title topictitle2" id="ariaid-title3">Adding a conditional block to a dialogue</h2>
<div class="body">
<p class="p">In the dialogue builder, you can add a conditional block to a dialogue. When you do, you
can:</p>
<ul class="ul" id="topic_nbw_nxp_xfc__ul_kws_4dc_cgc">
<li class="li"><a class="xref" href="#topic_u44_kdc_cgc">Configure a conditional block based on a parameter</a></li>
<li class="li"><a class="xref" href="#topic_e3n_ldc_cgc">Configure a conditional block based on a segment</a></li>
</ul>
</div>
<div aria-labelledby="ariaid-title4" class="topic nested2" id="topic_u44_kdc_cgc">
<h3 class="title topictitle3" id="ariaid-title4">Configure a conditional block based on a parameter</h3>
<div class="body">
<p class="p">Configuring a conditional block based on a parameter lets you shape conversations based
on information from your CRM platform, session data, or backend integrations. </p>
<p class="p"><strong class="ph b">To configure a conditional block based on a parameter</strong></p>
<ol class="ol" id="topic_u44_kdc_cgc__ol_afb_tdc_cgc">
<li class="li">
<a class="xref" href="https://support.zendesk.com/hc/en-us/articles/9066753203738" target="_blank">Open the dialogue builder</a> for the dialogue you want to add a
conditional block to. </li>
<li class="li">In the appropriate location in the dialogue, click the plus (+) icon and select
<strong class="ph b">Conditional</strong>.<p class="p">A set of blocks appear, including Conditional, Parameter, and
Fallback.</p>
<p class="p"><img class="image" id="topic_u44_kdc_cgc__image_acm_52c_cgc" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/aiaa_conditional_dialogue_parameter.png" width="450"></p>
</li>
<li class="li">In the Conditional block, use the second drop-down field to select the <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/9522180655386#topic_cth_4xp_xfc" target="_blank">parameter</a> you want to use. <p class="p">If the parameter
you want isn’t there, you can <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8357756623770" target="_blank">create an action</a> to capture it. </p>
</li>
<li class="li">In the Parameter block, select the <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/9522180655386#topic_jbc_qxp_xfc" target="_blank">operator</a> and enter the value to check for. </li>
<li class="li">Click the plus (+) icon below the Parameter block and configure the conversational
flow that should follow if the condition evaluates as true.<div class="p">
<div class="note tip" id="topic_u44_kdc_cgc__note_z5k_c2c_cgc">
<span class="tiptitle">Tip:</span> You can even add another conditional block for
increasingly tailored conversational flows.</div>
</div>
</li>
<li class="li">(Optional) Add another condition by clicking the plus (+) icon on the right. <p class="p">An
additional Parameter block is added to the left of the Fallback block.</p>
Repeat steps
4 and 5. </li>
<li class="li">Under the Fallback block, click the plus (+) icon and configure the conversational
flow that should follow if none of the conditions are met. </li>
</ol>
</div>
</div>
<div aria-labelledby="ariaid-title5" class="topic nested2" id="topic_e3n_ldc_cgc">
<h3 class="title topictitle3" id="ariaid-title5">Configure a conditional block based on a segment</h3>
<div class="body">
<p class="p">Configuring a conditional block based on a segment lets you shape conversations based on
different types of customers. </p>
<p class="p"><strong class="ph b">To configure a conditional block based on a parameter</strong></p>
<div class="p">
<ol class="ol" id="topic_e3n_ldc_cgc__ol_nbt_22c_cgc">
<li class="li">
<a class="xref" href="https://support.zendesk.com/hc/en-us/articles/9066753203738" target="_blank">Open the dialogue builder</a> for the dialogue you
want to add a conditional block to. </li>
<li class="li">In the appropriate location in the dialogue, click the plus (+) icon and select
<strong class="ph b">Conditional</strong>. <p class="p">A set of blocks appear, including Conditional, Parameter, and
Fallback. </p>
</li>
<li class="li">In the Conditional block, use the first drop-down field to select Segment. <p class="p">The
Parameter block changes to a Segment block.</p>
<p class="p"><img class="image" id="topic_e3n_ldc_cgc__image_sm2_v2c_cgc" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/aiaa_conditional_dialogue_segment.png" width="450"></p>
</li>
<li class="li">In the Segment block, select the: <ul class="ul" id="topic_e3n_ldc_cgc__ol_kdp_l2c_cgc">
<li class="li">Operator (<strong class="ph b">Is ANY of</strong>, <strong class="ph b">Is NOT ANY of</strong>, <strong class="ph b">Is ALL of</strong>) </li>
<li class="li">Segments to check for </li>
</ul>
</li>
<li class="li">Click the plus (+) icon below the Segment block and configure the conversational
flow that should follow if the condition evaluates as true.<div class="p">
<div class="note tip" id="topic_e3n_ldc_cgc__note_vxx_m2c_cgc">
<span class="tiptitle">Tip:</span> You can even add another conditional block
for increasingly tailored conversational flows. </div>
</div>
</li>
<li class="li">(Optional) Add another condition by clicking the plus (+) icon on the right. <p class="p">An
additional Segment block is added to the left of the Fallback block.</p>
Repeat steps
4 and 5. </li>
<li class="li">Under the Fallback block, click the plus (+) icon and configure the conversational
flow that should follow if none of the conditions are met.</li>
</ol>
</div>
</div>
</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/8357733406234",
"url": "https://support.zendesk.com/hc/en-us/articles/8357733406234",
"headline": "Using conditional blocks in conversation flows for AI agents",
"description": "You can use conditional blocks in conversation flows to customize AI agent dialogues based on parameters or customer segments, directing conversations according to specified conditions and values.",
"articleSection": "Building conversation flows for AI agents",
"datePublished": "2024-11-11T22:24:48+00:00",
"dateModified": "2026-05-12T17:43:47.822102+00:00",
"inLanguage": "en-US",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://support.zendesk.com/hc/en-us/articles/8357733406234"
},
"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>