Add-on | AI agents - Advanced |
Entities are pieces of information in customer messages that have specific meaning. You can add an entity by using a preset entity or by creating your own custom entity.
About entities
Entities are pieces of information in customer messages that have specific meaning. Common uses for entities include the following:
- Sanitize personally identifiable information (PII) before data import
- Collect and verify a piece of information, such as an order number, in customer messages to create customized dialogue flows
- Understand and identify product-specific descriptions in customer messages
After an entity is added, anything in customer messages that match the entity pattern can be identified. For example, you might mask an email with the placeholder <EMAIL>. Or you might ask for verification or security information, which can be sanitized before escalation. You can use the entity to see if it follows a format or is part of a list so that the user must enter something, then it can be checked later by the human agent.
You can refer to this data later in the flow. For example, you might want to collect the email address from the user and save it to the conversation data in case it's needed later. These can be done with conditional blocks and customer messages, then you can apply the action afterward to save it to the conversation data.
Be sure that you organize the entities list so that the highest priority and least sensitive ones are at the top. When using numbers to signal scenarios in channels where you can't have buttons, such as WhatsApp, you can create multi-lingual entity lists, including typos of each of the number scenarios. These should be ordered towards the top of the lists for the greatest sensitivity.
If you're using entity recognition of numbers in your scenarios, you don't want these to be confused with other entities or intent predictions. Therefore, you want to check the most specific first, in case you want to include an intent predicted, such as "wait a moment," in that customer message. You would want to look for that first, then the numbers. Otherwise, if a user says "one sec," it would trigger scenario one instead of the intent.
Adding a preset entity
You can add an entity by using a preset entity. Presets include:
-
International bank account numbers (IBANs)
-
Emails
-
Credit cards
-
US Social Security number (SSN)
-
Personal identity codes for various countries
To add a preset entity
-
In AI agents - Advanced, click
Settings in the sidebar, then select Entities.
Note: If you’re adding a preset entity for an agentic AI agent (EAP), select Content > Entities instead. - Click Add Preset.
- Beside the preset you want to add, 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 if you want to build your own set of rules for the entity.
To create a custom entity
-
In AI agents - Advanced, click
Settings in the sidebar, then select Entities.
Note: If you’re adding a preset entity for an agentic AI agent (EAP), select Content > Entities instead. - Click New Entity.
- Enter a Name and optional Description for your custom entity.
The name can contain only alphanumerical characters in addition to ‘_’ and ‘-’. No spaces are allowed.
- Click Sanitize if you want our model to replace the detected custom entity with a placeholder.
- Select a Rule type, then create the rule.
- Regular expression, also known as RegEx, is a text string of repetitive patterns of letters, numbers, characters. For example, UAI-94857365. Keep in mind that it should represent all the possible patterns, format, and length of the information you want to identify. See our RegEx reference.
-
Expression list is for a list of words. For example, Berlin, Helsinki,
Paris, Rome.
You can implement partial words when the word could be part of another word, such as "play" in "played", "playing," or whole words when the expression represents the whole word. You might also use lemmatize when the entity has multiple ways of expressing the entity, such as "am," "are," "is," "was," "were," or "been" as the other forms of the verb "to be."
-
Synonym list is for a large number of word combinations. For example,
product types or product colors. This cannot be mixed with other rules. Be sure to
save before uploading your CSV file. 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"
- Click Case sensitive if the entity is case sensitive, and, for expression lists, click Whole words if the expression represents the whole word.
- Click Add rule to create additional rules as needed.
- Click Test and save, then Save the new 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.
1 comment
Zendesk Partner - Faye Admin
Hi team - is there any existing documentation that goes through an example or two of setting up custom entities to show a bit more of the decision making process behind configuring the customizable settings available? Thanks!
2
Sign in to leave a comment.