Set Up Entities

Entities are pieces of specific information in contact messages, such as names, addresses, phone numbers, order numbers, and item numbers. You can extract the information to use in bot conversations.

After you create entities, you need to label examples of them in stories and rules, intent training data, or NLU Inbox messages. Labeling identifies words or phrases as entities, which tells the bot they're important for the intent of the message where you label them.

Create Lookup Table Entities

This task describes one way to create lookup table entities. You can also create them on the Intents tab or in the NLU Inbox.

  1. In CXone, click the app selector and select Bot Builder.

  2. Click the bot you want to work with.
  3. Click NLU icon, which looks like a gear inside a head silhouette. in the left icon menu.
  4. Click the Entities tab.

  5. Locate the folder your new entity should go in. You can also click New Folder icon, indicated by a plus sign inside a circle., enter a name, and press Enter.

  6. Hover over the folder name and click New Entity > Lookup.

  7. Enter a name and press Enter. Changes are saved automatically.
  8. On your new entity, click Add Example . Enter a value for the example and press Enter. Changes are saved automatically. Repeat this step for as many examples as you need. Add examples that you bot needs to be able to recognize. For example, if your bot collects a Location entity, add examples for every office location your organization has.
  9. On an example, you can click Add Synonym to add similar words to the example value. Do this when one of your entities could be called something else. For example, New York City is sometimes called NY and the Big Apple. When you label entities in stories and rules, intent training data, or NLU Inbox messages, be sure to label synonyms too.

Create a Regex Entity

A regular expression (regex) is a sequence of characters that specifies a search pattern. Creating a regular expression to extract entities teaches your botClosed 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 entityClosed 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 intentClosed 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.

You can learn about working with regular expressions at https://regexr.com/ A square with an arrow pointing from the center to the upper right corner..

  1. In CXone, click the app selector and select Bot Builder.

  2. Click the bot you want to work with.
  3. Click NLU icon, which looks like a gear inside a head silhouette. in the left icon menu.
  4. Click the Entities tab.

  5. Locate the folder your new entity should go in. You can also click New Folder icon, indicated by a plus sign inside a circle., enter a name, and press Enter.

  6. Hover over the folder name and click New Entity > Regex.

  7. Enter a name and press Enter. Changes are saved automatically.
  8. On your new entity:
    1. Choose the Pattern type from the drop-down.
    2. Enter your Regular Expression. Learn more about regular expressions at https://regexr.com/ A square with an arrow pointing from the center to the upper right corner..
    3. Enter several Test phrases. Any that match the pattern of your expression are highlighted in green.
  9. Label the entity in at least two intent examples so the NLU model can correctly register the association.

Create a New Entity from an Intent or the NLU Inbox

You can create new entitiesClosed A piece of information gathered from the contact's messages during conversations with a bot. from the Intent tab or the NLU inbox in Bot Builder. This allows you to create entities on the fly when working with intentsClosed The meaning or purpose behind what a contact says/types; what the contact wants to communicate or accomplish or reviewing contact utterancesClosed What a contact says or types..

  1. In CXone, click the app selector and select Bot Builder.

  2. Click the bot you want to work with.
  3. Click NLU icon, which looks like a gear inside a head silhouette. in the left icon menu.
  4. Do one of the following:
    • To create an entity from an intent: Click the Intent tab, then select the intent you want to work with.
    • To create an entity from the NLU Inbox: Click Inbox, then locate the message you want to work with.
  5. Select the word or phrase in the intent example or inbox message that represents the entity. For example, for a phone number entity, select the phone number. If the entity example is made up of more than one word, click each word. Bot Builder highlights the words.
  6. Click an entity type in the pop-up menu.

  7. Enter the name of the entity in the Type entity name field.

  8. Click Create Entity "[name]".
  9. If you want to add the word or phrase you selected at the beginning of this task as an example of your new entity, you must follow the steps to add an entity example from an intent or from the NLU Inbox.

Label and Add Entity Examples or Synonyms in Intent Training Data

Intent training data consists of all the examples you've added to your intentsClosed The meaning or purpose behind what a contact says/types; what the contact wants to communicate or accomplish. Labeling entityClosed A piece of information gathered from the contact's messages during conversations with a bot. examples adds them to the associated entity if they're not already present. It also teaches your bot that the entity is important for the intent associated with the message containing the entity.

  1. In CXone, click the app selector and select Bot Builder.

  2. Click the bot you want to work with.
  3. Click NLU icon, which looks like a gear inside a head silhouette. in the left icon menu.
  4. On the Intents tab, click the intent you want to work with.

  5. In an intent example, click the word or phrase that makes up the entity.

  6. Select an option from the pop-up menu for the type of entity you're working with.

  7. If you're adding thes selected word or phrase as an example of a lookup or regex entity, follow these steps: 
    1. Enter the name of the entity in the search bar on the pop-up menu. For example, if you're adding a contact's office location as an entity example, enter the name of the entity for office location, such as Location.
    2. Click the matching entity name in the search results. Bot Builder adds the selected word or phrase as an entity example.

    3. If the entity you want doesn't exist, click Create Entity "[name]" to create an entity with the name you entered. Reselect the entity example and repeat the steps in this task to add it to the new entity.

  8.  If you're adding a synonym of an existing entity example, follow these steps: 
    1. Enter the name of the entity in the search bar. For example, location.
    2. Click the name of the entity example in the search results. For example, if you're adding NYC as a synonym for the New York, click New York City under the Location entity.

Label and Add Entity Examples or Synonyms from the NLU Inbox

The NLU Inbox displays all new contact utterancesClosed What a contact says or types.. You can add entity examples from utterance messages viewed in the NLU Inbox.

Labeling entityClosed A piece of information gathered from the contact's messages during conversations with a bot. examples adds them to the associated entity if they're not already present. It also teaches your bot that the entity is important for the intent associated with the message containing the entity.

  1. In CXone, click the app selector and select Bot Builder.

  2. Click the bot you want to work with.
  3. Click NLU icon, which looks like a gear inside a head silhouette. in the left icon menu.
  4. On the Intents tab, click Inbox.

  5. In a message, click the word or phrase that makes up the entity.

  6. Select an option from the pop-up menu for the type of entity you're working with.

  7. If you're adding thes selected word or phrase as an example of a lookup or regex entity, follow these steps: 
    1. Enter the name of the entity in the search bar on the pop-up menu. For example, if you're adding a contact's office location as an entity example, enter the name of the entity for office location, such as Location.
    2. Click the matching entity name in the search results. Bot Builder adds the selected word or phrase as an entity example.

    3. If the entity you want doesn't exist, click Create Entity "[name]" to create an entity with the name you entered. Reselect the entity example and repeat the steps in this task to add it to the new entity.

  8.  If you're adding a synonym of an existing entity example, follow these steps: 
    1. Enter the name of the entity in the search bar. For example, location.
    2. Click the name of the entity example in the search results. For example, if you're adding NYC as a synonym for the New York, click New York City under the Location entity.