Creating entities in conversation flows for AI agents


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.


What's my plan?







All Suites

Team, Growth, Professional, Enterprise, or Enterprise Plus










Support

Team, Professional, or Enterprise









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.
This article covers the following topics:
About entities
Adding a preset entity
Creating a custom entity




About entities

An entity represents information in a customer message that has a defined pattern, such as
an email address. In that example, email is a preset entity. The
information is attached to the conversation session and is available for later use by the AI
agent.
Common uses for entities include the following:
Sanitizing personally identifiable information (PII)
Collecting and verifying a piece of information, such as an order number, so it can be
used in a conversation flow
Understanding and identifying product-specific descriptions in customer messages


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.
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 conditional blocks and customer messages. You can then apply an action using the
information.
It’s recommended that you organize the entities list so that the highest priority and least
sensitive ones are at the top.
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.
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.



Adding a preset entity

Your AI agent comes with the following preset entities:
International bank account number (IBANs)
Email
Credit card
United States Social Security number (SSN)
Personal identity codes for various countries


To add a preset entity


In the AI agents workspace, select the AI agent you want to work
with.

Click
Content in the sidebar, then select Entities.


Click Add preset.
Hover over the preset you want to add and click Add entity.

Go back to the Entities page, click the options menu ( ) in the upper-right corner, then select Reorder
entities to change the order of the entities.





Creating a custom entity

You can create a custom entity in order to build one with your own set of rules.
To create a custom entity


In the AI agents workspace, select the AI agent you want to work
with.
Click
Content in the sidebar, then select Entities.
Select New entity.

Enter a name and optional description for your custom entity. The name can contain
no spaces and alphanumeric characters only, in addition to underscores (_) and hyphens
(-).

Click Sanitize if you want the model to replace the detected custom information
with a placeholder in order to protect PII.
Select a Rule type and create the rule. Types include the following
options:


Regular expression: 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 RegEx reference for AI agents.

Expression list: 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."

Synonym list: 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:
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"
For
example: car, "automobile, vehicle, auto, wheels"



Select Case sensitive if the entity is case sensitive.
For expression lists, select Whole words if the expression represents the
entire word.
Click Add rule to create additional rules as needed.
(Optional) If you included a regular expression in your entity rules:
Click Test and save. The Validate rules pane opens.


Enter sample text and click Test to make sure the entity is working as
expected.



Click Save.




{
"@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"
}
}
}
