Set up Rules

Rules allow you to teach your bot to respond to messages whose intent is the same in every context. This includes messages such as greetings, goodbyes, and thanks.

Create a Rule

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

  2. Click the bot you want to work with.
  3. Click Dialogues icon, which looks like conversation bubbles. in the left icon menu.
  4. Click the Rules tab.
  5. Locate the folder your new rule 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 and click New Rule icon, indicated by a plus sign inside a circle..
  7. Type a name for the rule and press Enter.
  8. If your rule should only be used under a certain condition, click Add condition. Choose the condition type and the appropriate form, slot value, or both.
  9. Add the contact's message:
    1. In the middle panel, click the + icon on the right. It turns into the contact icon A square with rounded corners with a face in it.. In the Customer may say box, enter a message a contact might send and then press Enter. CXone Bot Builder analyzes the message and offers a list of intents with a confidence level for each.
    2. If the top intent is the correct intent, click Confirm. If it's not, click the incorrect intent to expand the Intents list, then select the correct intent and click Confirm.
  10. Add the bot's response: 
    1. In the middle panel of the story page, hover over the plus sign + on the left until it changes to a bot icon A square with rounded corners and a robot head inside.. Click the General, Forms, or Integrations tab, then click an action.
    2. Provide the information matching the action you selected. For example, if you selected Message, enter what the bot should say.

    3. Click the typing indicator to set or override the length of time a typing indicator displays for the action. If smart typing is turned on, the bot automatically determines this for you.
    4. For message actions only, clickVariations icon, represented by two crossing arrows to open a dialogue where you can add variations to the existing bot message. In this dialogue, click Add Variation, then type a different version of your original message shown at the top. Add as many variations as you want. The bot will randomly select which variation to use in a conversation.
    5. For rich messageClosed Elements in digital messaging such as buttons, images, menus, and option pickers. actions only, click Rich Message Fallback icon, represented by two boxes with an arrow pointing from one to the other. to customize the response if the message is being sent over a channel that doesn't support rich content. By default, the bot will use what is configured in Rich Messaging Fallback.
  11. You can add more examples to the intent. This helps ensure the rule is triggered for each way a customer may phrase something. You can do this in two ways: 
    • Click the intent under the contact message to load it in the Intents pane on the right. Then click Add example and add new messages.
    • Go to NLUicon, which looks like a gear inside a head silhouette., then click Add example for the intent you want add messages to.
  12. Click Hide An eye with a diagonal line across it. if you want to exclude this rule from training. For example, if you cannot complete the rule in one session, you can hide it until you're able to finish it.
  13. Click Train and Stage to train your bot on the new rule. You can also do more training and testing later.

Add New Training Examples to an Existing Rule's Intent

As you review and refine your bot, you may learn that contacts often use phrases that aren't currently configured for the rule's intent. You can add these to the intent that the rule uses to improve the bot's performance.

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

  2. Click the bot you want to work with.
  3. Click Dialogues icon, which looks like conversation bubbles. in the left icon menu.
  4. On the Rules tab, click the rule you want to work with.
  5. Click Intents Icon of a lightbulb in a circle. in the menu bar on the right side of the page.

  6. Click the intent A lightbulb. under the contact message to load it in the Intents pane.
  7. Click Add example and add the new utterance examples.
  8. When you're finished making changes, click Train and Stage to update your bot modelClosed Version of a bot that has been trained and staged to test this change.

Duplicate a Rule

If you have an existing rule that is similar to the one you want to create, you can copy it and edit as needed.

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

  2. Click the bot you want to work with.
  3. Click Dialogues icon, which looks like conversation bubbles. in the left icon menu.
  4. On the Rules tab, hover your cursor over a rule and click Options icon, represented by three horizontal dots., then click Duplicate. The copied rule appears in the same folder with the word copy after the name.
  5. Click the copied rule in the list on the left and make changes as needed.
  6. When you're finished making changes, click Train and Stage to update your bot modelClosed Version of a bot that has been trained and staged to test this change.

Hide a Draft Rule from Training

You can hide individual dialoguesClosed Bot stories and rules in CXone Bot Builder. . This excludes them from training until they're ready.

When hidden, the data is visible to you for editing, but your bot does not learn from it. It is also displayed with the Hidden an eye icon with a slash through it icon.

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

  2. Click the bot you want to work with.
  3. Click Dialogues icon, which looks like conversation bubbles. in the left icon menu.
  4. On the Rules tab, hover your cursor over the dialogue and click Options icon, represented by three horizontal dots., then click Hide.
  5. When you're finished making changes, click Train and Stage to update your bot modelClosed Version of a bot that has been trained and staged to test this change.

Release a Draft Rule to Training

When you're ready to release a draft dialoguesClosed Bot stories and rules in CXone Bot Builder. , you can unhide it and train your bot to use it.

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

  2. Click the bot you want to work with.
  3. Click Dialogues icon, which looks like conversation bubbles. in the left icon menu.
  4. On the Rules tab, hover your cursor over the dialogue and click Options icon, represented by three horizontal dots., then click Show.
  5. When you're finished making changes, click Train and Stage to update your bot modelClosed Version of a bot that has been trained and staged to test this change.