Use cases and best practices for 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 describes some useful ways to use conditional blocks in conversational flows for AI agents.</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">

<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 describes some
useful ways to use conditional blocks in conversational flows for AI agents. </p>
<p class="p">This article contains the following sections: </p>
<ul class="ul" id="conditional_blocks_best_practices__ul_s41_jmv_bgc">
<li class="li"><a class="xref" href="#topic_jpl_mmv_bgc">Loop prevention</a></li>
<li class="li"><a class="xref" href="#topic_tbl_nmv_bgc">Entity lists</a></li>
<li class="li"><a class="xref" href="#topic_phn_4mv_bgc">Customer type/value personalization</a></li>
<li class="li"><a class="xref" href="#topic_e3s_pmv_bgc">API integration value personalization</a></li>
<li class="li"><a class="xref" href="#topic_wzq_qmv_bgc">Preferred language detection</a></li>
<li class="li"><a class="xref" href="#topic_lvr_rmv_bgc">Number conventions</a></li>
<li class="li"><a class="xref" href="#topic_ycw_smv_bgc">Brand-specific information</a></li>
</ul>
<p class="p">Related articles:</p>
<ul class="ul" id="conditional_blocks_best_practices__ul_kqr_hmv_bgc">
<li class="li"><a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8357733406234" target="_blank">Using conditional blocks in conversation flows
for AI agents</a></li>
</ul>
</div>
<div aria-labelledby="ariaid-title2" class="topic nested1" id="topic_jpl_mmv_bgc">
<h2 class="title topictitle2" id="ariaid-title2">Loop prevention</h2>
<div class="body">
<p class="p">Loops are usually not helpful. If a customer has been through a conversational path
once, they likely need more information in order to be successful progressing
through the rest of the conversation. </p>
<p class="p">To prevent infinite loops, there's a limit on the number of times a conversation can
loop through the same block in a dialogue. When an AI agent is attempting to
generate a reply, if the conversation flow goes through the same block three times
(which might happen if you’ve linked back to earlier blocks), the AI agent stops
attempting to generate a response. </p>
<p class="p">You can also set a parameter value to act as a circuit breaker for what would
otherwise become a frustrating loop for a customer. Consider the example image
below, which shows a dialogue for a customer asking to speak to a human. The first
time the customer asks to speak to a human, the AI agent tells the customer that the
human agents may be busy and suggests working with it first. After this first
message, the dialogue sets a parameter value of <em class="ph i">passed</em>—this is the circuit
breaker. If the customer asks a second time to speak to a human, the dialogue checks
for the <em class="ph i">passed</em> value and, upon seeing it, escalates the customer to a
human.</p>
<p class="p"><img class="image" id="topic_jpl_mmv_bgc__image_fqt_fnv_bgc" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/bots_7114851881234.png" width="600"></p>
<p class="p"><img class="image" id="topic_jpl_mmv_bgc__image_f3n_gnv_bgc" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/bots_7244419842834.png" width="600"></p>
</div>
</div>
<div aria-labelledby="ariaid-title3" class="topic nested1" id="topic_tbl_nmv_bgc">
<h2 class="title topictitle2" id="ariaid-title3">Entity lists</h2>
<div class="body">
<p class="p">If you prefer not to or can't use buttons, conditional blocks are great for different
use cases such as contact methods where you are unlikely to train a specific intent. </p>
<p class="p">By using lists, you can segment information and then take users down a more specific,
personalized path. </p>
<p class="p">The example below is based on contact methods, however, you could have another based
on information such as where the customer is having the issue. By loading a list of
browsers and operating systems you can personalize troubleshooting help.</p>
<p class="p"><img class="image" id="topic_tbl_nmv_bgc__image_ly3_hnv_bgc" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/bots_7114851874962.png" width="600"></p>
</div>
</div>
<div aria-labelledby="ariaid-title4" class="topic nested1" id="topic_phn_4mv_bgc">
<h2 class="title topictitle2" id="ariaid-title4">Customer type/value personalization</h2>
<div class="body">
<p class="p">Depending on the type of customer that is contacting there may be different
procedures or policies, such as merchant vs premium or new customers. Therefore, by
pulling this information you can provide a more accurate and appropriate experience
based on customer lifetime value or business relationship. An example of this is by
pulling the organization information if you are servicing B2B, B2C or D2C use cases
- in the screenshot below with Zendesk - this can then be split with the orgCustom
parameter. </p>
<p class="p"><img class="image" id="topic_phn_4mv_bgc__image_ytc_3nv_bgc" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/bots_7254060643218.png" width="600"></p>
</div>
</div>
<div aria-labelledby="ariaid-title5" class="topic nested1" id="topic_e3s_pmv_bgc">
<h2 class="title topictitle2" id="ariaid-title5">API integration value personalization</h2>
<div class="body">
<p class="p">Further personalize AI agent responses based on customer-specific information
returned which can be pretty much everything, depending on the use-case, API, and
information available to us. Such as; Parcel Status is “Shipped” + Courier is “DHL”
+ Shipping Mode is “Express” </p>
<p class="p">Firstly, here you can provide more accurate information to the user, but also in the
example of express shipping if you just return the value of shipped, you might
provide a generic response like "please allow 2-5 days for your order to reach you"
that could end up causing customer dissatisfaction when they are either a premium
customer that gets it as part of a loyalty scheme or they personally paid for 1-day
delivery. </p>
</div>
</div>
<div aria-labelledby="ariaid-title6" class="topic nested1" id="topic_wzq_qmv_bgc">
<h2 class="title topictitle2" id="ariaid-title6">Preferred language detection</h2>
<div class="body">
<p class="p">When someone is on your help center looking at content in a certain language, it is
great to be able to keep a seamless experience by maintaining the language they are
seeing the page in. </p>
<p class="p">An example of this is using the get tag depending on which help center the widget is
loaded within.</p>
<p class="p"><img class="image" id="topic_wzq_qmv_bgc__image_nzb_jnv_bgc" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/bots_7244438482450.png" width="600"></p>
<p class="p">We have an action for chat started to get Tags and then use those tags to trigger the
correct language. The below screenshots are with Zendesk as an example.</p>
<p class="p"><img class="image" id="topic_wzq_qmv_bgc__image_jh5_jnv_bgc" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/bots_7244423049362.png" width="600"></p>
<p class="p"><img class="image" id="topic_wzq_qmv_bgc__image_gck_knv_bgc" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/bots_7244423048978.png" width="600"></p>
</div>
</div>
<div aria-labelledby="ariaid-title7" class="topic nested1" id="topic_lvr_rmv_bgc">
<h2 class="title topictitle2" id="ariaid-title7">Number conventions</h2>
<div class="body">
<p class="p">There are different examples where numbers are specific to a product (brand-based
SKU's, destinations), country (such as postal code or phone number), or some kind of
convention you have implemented at your business (regional or premium order
numbers). This is where the starts with operator is great for personalizing
communication.</p>
</div>
</div>
<div aria-labelledby="ariaid-title8" class="topic nested1" id="topic_ycw_smv_bgc">
<h2 class="title topictitle2" id="ariaid-title8">Brand-specific information</h2>
<div class="body">
<p class="p">Depending on the type of product that a customer is asking about, you may have
specific merchandising agreements that entitle the user to more specific support,
and thus you may want to split this based on a conditional block on the brand level.
Depending on the Intent you might have responses you might want to provide, such as
Care Instructions, Damaged Product, and Pre-Order.</p>
<p class="p"><img class="image" id="topic_ycw_smv_bgc__image_zs3_lnv_bgc" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/bots_7254359336722.png" width="600"></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/9518481968154",
"url": "https://support.zendesk.com/hc/en-us/articles/9518481968154",
"headline": "Use cases and best practices for using conditional blocks in conversation flows for AI agents",
"description": "You can use conditional blocks in conversation flows to personalize AI agent interactions by preventing loops, segmenting users, integrating API data, detecting language, and tailoring responses based on customer and brand information.",
"articleSection": "AI agent best practices",
"datePublished": "2025-07-23T20:09:49+00:00",
"dateModified": "2026-05-12T17:48:17.503115+00:00",
"inLanguage": "en-US",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://support.zendesk.com/hc/en-us/articles/9518481968154"
},
"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>