Creating entities in conversation flows for AI agents

<body>
<p id="docs-hc-snippet" style="display: none;">Entities hold pieces of information that have specific meaning. The AI agent recognizes information as an entity and treats it in a particular way. You can add an entity to an AI agent by using a preset entity or by creating your own custom entity.</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">Entities hold pieces of information that have specific meaning. The AI agent recognizes
information as an entity and treats it in a particular way. You can add an entity to an AI
agent by using a preset entity or by creating your own custom entity. </p>
<div class="p">This article covers the following topics: <ul class="ul" id="content_entities_create__ul_whz_rsk_m2c">
<li class="li"><a class="xref" href="#topic_gy1_vqt_m2c">About entities</a></li>
<li class="li"><a class="xref" href="#topic_obw_1dt_m2c">Adding a preset entity</a></li>
<li class="li"><a class="xref" href="#topic_owr_bdt_m2c">Creating a custom entity</a></li>
</ul>
</div>
</div>
<div aria-labelledby="ariaid-title2" class="topic nested1" id="topic_gy1_vqt_m2c">
<h2 class="title topictitle2" id="ariaid-title2">About entities</h2>
<div class="body">
<p class="p">An entity represents information in a customer message that has a defined pattern, such as
an email address. In that example, <code class="ph codeph">email</code> is a preset entity. The
information is attached to the conversation session and is available for later use by the AI
agent. </p>
<div class="p">Common uses for entities include the following: <ul class="ul" id="topic_gy1_vqt_m2c__ul_p4s_prp_xfc">
<li class="li">Sanitizing personally identifiable information (PII) </li>
<li class="li">Collecting and verifying a piece of information, such as an order number, so it can be
used in a conversation flow </li>
<li class="li">Understanding and identifying product-specific descriptions in customer messages </li>
</ul>
</div>
<p class="p">After an entity is added, anything in customer messages that match the entity pattern can
be identified and acted upon. For example, you might mask an email address with the
placeholder &lt;EMAIL&gt;. Or you might ask for verification or security information, which can
be sanitized before escalation. You can use the entity to validate that customer-entered
information follows a format or is part of a list. </p>
<p class="p">You can refer to this data later in the flow. For example, you can collect an email address
from the user and save it to the conversation data for later use via <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8357733406234" target="_blank">conditional blocks</a> and <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/9060613203610" target="_blank">customer messages</a>. You can then apply an action using the
information. </p>
<p class="p">It’s recommended that you organize the entities list so that the highest priority and least
sensitive ones are at the top. </p>
<p class="p">When using numbers to represent scenarios in a channel where the customer can't use
buttons, such as WhatsApp, you can create multilingual entity lists, including typos of each
of the number scenarios. These should be ordered towards the top of the lists as they
represent the greatest sensitivity. </p>
<p class="p">If you're using entity recognition of numbers in your scenarios, ensure they’re not
confused with other entities or intent predictions. Therefore, check the most specific
first, in case you want to include an intent predicted, such as "wait a moment," in that
customer message. Then check for the numbers. Otherwise, if a user says "wait a second," it
would trigger scenario one instead of the intent. </p>
</div>
</div>
<div aria-labelledby="ariaid-title3" class="topic nested1" id="topic_obw_1dt_m2c">
<h2 class="title topictitle2" id="ariaid-title3">Adding a preset entity</h2>
<div class="body">
<div class="p">Your AI agent comes with the following preset entities: <ul class="ul" id="topic_obw_1dt_m2c__ul_udb_zrp_xfc">
<li class="li">International bank account number (IBANs) </li>
<li class="li">Email </li>
<li class="li">Credit card </li>
<li class="li">United States Social Security number (SSN) </li>
<li class="li">Personal identity codes for various countries </li>
</ul>
</div>
<p class="p"><strong class="ph b">To add a preset entity</strong></p>
<div class="p">
<ol class="ol" id="topic_obw_1dt_m2c__ol_qbd_fdt_m2c">
<li class="li"><span class="ph">In the AI agents workspace, <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8357756913178#topic_t25_qvj_tdc" target="_blank">select the AI agent</a> you want to work
with.</span></li>
<li class="li">
<span class="ph">Click <img class="image" id="topic_obw_1dt_m2c__d8e200" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/ai_agents_content_icon.png">
<strong class="ph b">Content</strong> in the sidebar, then select <strong class="ph b">Entities</strong>.</span>
<img class="image" id="topic_obw_1dt_m2c__image_w5w_jsp_xfc" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/aiaa_entities.png" width="800">
</li>
<li class="li">Click <strong class="ph b">Add preset</strong>. </li>
<li class="li">Hover over the preset you want to add and click <strong class="ph b">Add entity</strong>.<p class="p"><img class="image" id="topic_obw_1dt_m2c__image_kmw_4sp_xfc" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/aiaa_entity_presets.png" width="800"></p>
</li>
<li class="li">Go back to the Entities page, click the options menu (<img class="image" id="topic_obw_1dt_m2c__image_cq3_3bt_m2c" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/options_menu_icon_verticle_sm.png">) in the upper-right corner, then select <strong class="ph b">Reorder
entities</strong> to change the order of the entities.</li>
</ol>
</div>
</div>
</div>
<div aria-labelledby="ariaid-title4" class="topic nested1" id="topic_owr_bdt_m2c">
<h2 class="title topictitle2" id="ariaid-title4">Creating a custom entity</h2>
<div class="body">
<p class="p">You can create a custom entity in order to build one with your own set of rules. </p>
<p class="p"><strong class="ph b">To create a custom entity</strong></p>
<div class="p">
<ol class="ol" id="topic_owr_bdt_m2c__ol_rl1_c2t_m2c">
<li class="li"><span class="ph">In the AI agents workspace, <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8357756913178#topic_t25_qvj_tdc" target="_blank">select the AI agent</a> you want to work
with.</span></li>
<li class="li"><span class="ph">Click <img class="image" id="topic_owr_bdt_m2c__d8e200" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/ai_agents_content_icon.png">
<strong class="ph b">Content</strong> in the sidebar, then select <strong class="ph b">Entities</strong>.</span></li>
<li class="li">Select <strong class="ph b">New entity</strong>. <p class="p"><img class="image" id="topic_owr_bdt_m2c__image_mct_ysp_xfc" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/aiaa_entity_new.png" width="800"></p>
</li>
<li class="li"> Enter a name and optional description for your custom entity.<p class="p">The name can contain
no spaces and alphanumeric characters only, in addition to underscores (_) and hyphens
(-).</p>
</li>
<li class="li">Click <strong class="ph b">Sanitize</strong> if you want the model to replace the detected custom information
with a placeholder in order to protect PII. </li>
<li class="li">Select a <strong class="ph b">Rule type</strong> and create the rule.<p class="p">Types include the following
options:</p>
<ul class="ul" id="topic_owr_bdt_m2c__ul_wzf_fgt_m2c">
<li class="li">
<strong class="ph b">Regular expression</strong>: Also known as RegEx, this is a text string that appears
as part of a repetitive pattern. It should represent all the possible patterns,
formats, and length of the information you want to identify. See <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8357756811162" target="_blank">RegEx reference for AI agents</a>.</li>
<li class="li">
<strong class="ph b">Expression list</strong>: A list of words to look for. For example, Berlin,
Helsinki, Paris, Rome. You can implement partial words to identify a word as part of
another word (such as "play" within "playing"), or whole words when the expression
represents the whole word. Lemmatization recognizes when there are multiple ways to
express the entity, such as "am," "are," "is," "was," "were," or "been" as the other
forms of the verb "to be." </li>
<li class="li">
<strong class="ph b">Synonym list</strong>: A list of word combinations provided in a CSV file. For
example, product types or product colors. This cannot be mixed with other rules. Use
the following example file format:
<pre class="pre codeblock"><code>item1, "item1-synonym1, item1-synonym2, item1-synonym3, item1-synonym4"
item2, "item2-synonym1, item2-synonym2, item2-synonym3, item2-synonym4"
item3, "item3-synonym1, item3-synonym2, item3-synonym3, item3-synonym4"</code></pre>
<p class="p">For
example: <em class="ph i">car, "automobile, vehicle, auto, wheels"</em></p>
</li>
</ul>
</li>
<li class="li">Select <strong class="ph b">Case sensitive</strong> if the entity is case sensitive. </li>
<li class="li">For expression lists, select <strong class="ph b">Whole words</strong> if the expression represents the
entire word. </li>
<li class="li">Click <strong class="ph b">Add rule</strong> to create additional rules as needed. </li>
<li class="li">(Optional) If you included a regular expression in your entity rules:<ol class="ol" id="topic_owr_bdt_m2c__ol_xyp_353_sjc" type="a">
<li class="li">Click <strong class="ph b">Test and save</strong>. <p class="p">The Validate rules pane opens.</p>
</li>
<li class="li">
<p class="p">Enter sample text and click <strong class="ph b">Test</strong> to make sure the entity is working as
expected. </p>
</li>
</ol>
</li>
<li class="li">Click <strong class="ph b">Save</strong>.</li>
</ol>
</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/8357749740698",
"url": "https://support.zendesk.com/hc/en-us/articles/8357749740698",
"headline": "Creating entities in conversation flows for AI agents",
"description": "You learn how to add preset or custom entities in conversation flows so the agent can recognize, sanitize, validate, and reuse customer message data.",
"articleSection": "Creating dialogues",
"datePublished": "2024-11-11T22:25:10+00:00",
"dateModified": "2026-06-26T19:00:28.999965+00:00",
"inLanguage": "en",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://support.zendesk.com/hc/en-us/articles/8357749740698"
},
"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",
"softwareAddOn": {
"@type": "SoftwareApplication",
"name": "AI agents",
"@id": "https://support.zendesk.com/hc/en-us/sections/8988994355994"
}
}
}</script>
</body>