Entities
Entities are defined pieces of information extracted from a message Anything a contact says in a bot interaction, whether question or statement, written or spoken.. You should only create entities that your bot A software application that handles customer interactions in place of a live human agent. needs to accomplish its goals. For example, contacts may provide their names and addresses during an interaction. If the goal is simply to enable the bot to call the customer by name, there's no need to create an entity for the address. Each entity you create also creates a corresponding slot.
Create Entities Using Lookup Table
Required permission: Chatbot (ACD > Digital > Roles > [choose one] > Core Modules)
This task describes one way to create entities. You can also create new entities as part of creating the intents that will use them.
Akela Wolf already has a working bot to help her users with password resets. She wants to enable her bot to start asking for the user's location. She adjusts her happy path Story that produces the correct outcome for the intent to look like this:
Customer: Hello.
Bot: Hello. How can I help you?
Customer: I forgot my password.
Bot: I'm sorry to hear that. First, which office location are you at?
Customer: I'm at the Columbus office.
Bot: Thanks.
Based on this revision, Akela decides to create an entity called Location.
-
In CXone, click the app selector and select Bot Builder.
- Click the bot you want to work with.
- Click NLU in the left icon menu.
- Click the Entities tab.
- Locate the folder your new entity should go in. If the folder doesn't exist, click New Folder and enter the name for the new folder.
- Hover over the folder name and click New Entity > Lookup.
- Enter a name for your new entity and press Enter. Entries are saved automatically.
- On your new entity, click Add Example. Enter a value for the example and press Enter. Entries are saved automatically. Repeat this step for as many examples as you need.
- On an example, you can click Add Synonym to add similar words to the example value.
Be sure to label them correctly in your intent training examples as well. Follow the Planning Example
After creating the location entity, Akela notices that her customers from New York refer to their location in several different ways. She creates an entity example for New York under location, then adds the synonyms NY and Big Apple. Now, when customers use NY or Big Apple in a conversation, the bot will know to extract that to the value of New York.
Create Entities Using Regular Expressions
Required permission: Chatbot (ACD > Digital > Roles > [choose one] > Core Modules)
A regular expression (regex) is a sequence of characters that specifies a search pattern. Creating a regular expression to extract entities teaches your bot A software application that handles customer interactions in place of a live human agent. a pattern to look for to identify the correct information for that entity Keyword or phrase defined in your company profile in Interaction Analytics. Related to an entity type. Can include variants.. You should have at least two intent The meaning or purpose behind what a contact says/types; what the contact wants to communicate or accomplish examples with the regex entity in your training data to help your bot learn the association.
There are three types of regexes you can create:
- Phone Number: This is a predefined regex pattern. You can use it without any additional configuration.
- Email: This is a predefined regex pattern. You can use it without any additional configuration.
- Custom: This pattern allows you to define your own regex. See the planning example below.
Akela Wolf noticed that a lot of her bot's conversations included a customer's invoice number. She wants to create a custom regular expression pattern to enable her bot to extract an entity for invoice number.
The invoice numbers for Akela's customers always start with #IN, followed by exactly eight digits. So, she writes a custom regex pattern that reads:
#IN\d{8,8}\b
Now, whenever a user message contains a sequence that starts with "#IN" and contains exactly 8 digits, it will be extracted as an invoice number entity.
-
In CXone, click the app selector and select Bot Builder.
- Click the bot you want to work with.
- Click NLU in the left icon menu.
- Click the Entities tab.
- Locate the folder your new entity should go in. If the folder doesn't exist, click New Folder and enter the name for the new folder.
- Hover over the folder name and click New Entity > Regex.
- Enter a name for your new entity and press Enter. Entries are saved automatically.
- On your new entity:
- Choose the Pattern type from the drop-down.
- Enter your Regular Expression.
- Enter several Test phrases. Any that match the pattern of your expression are highlighted in green.
- Include the entity in at least two intent examples so the NLU model can correctly register the association.
Create Intents to Extract Entities
Required permission: Chatbot (ACD > Digital > Roles > [choose one] > Core Modules)
When you create an intent The meaning or purpose behind what a contact says/types; what the contact wants to communicate or accomplish for extracting entities, your examples teach your bot A software application that handles customer interactions in place of a live human agent. how to identify the correct information for that entity Keyword or phrase defined in your company profile in Interaction Analytics. Related to an entity type. Can include variants..
Akela Wolf already has a working bot to help her users with password resets. She wants to enable her bot to start asking for the user's location. She has adjusted her happy path Story that produces the correct outcome for the intent to include a request for that information:
Customer: Hello.
Bot: Hello. How can I help you?
Customer: I forgot my password.
Bot: I'm sorry to hear that. First, which office location are you at?
Customer: I'm at the Columbus office.
Bot: Thanks.
Based on this revision, Akela creates a new intent: provide_location.
-
In CXone, click the app selector and select Bot Builder.
- Click the bot you want to work with.
- Click NLU in the left icon menu.
- Click the Intents tab.
- Locate the folder your new intent should go in. If the folder doesn't exist, click New Folder and enter the name for the new folder.
- Hover over the folder name and click New Intent.
- Enter a name for your new intent and press Enter.
- Beneath the new intent, begin entering phrases that the bot should recognize for that intent. Separate phrases by pressing Enter. Entries are saved automatically.
- Once you have entered all your phrase examples, click the words in the phrase that match the entity you want to use. You can hold Shift and click if you need to select multiple words. Then, in the pop-up, click Lookup.
- If the correct entity doesn't exist yet, you can enter it in the Type entity name field and then click Create entity "..." to create it.
View image
In the following image, Akela has selected Salt Lake City as her phrase, and will match it to her location entity. You can see she has already done this with the Columbus location.