Use Slots in Bot Responses

Use Slots as Variables in Bot Responses

You use slots as variables in bot responses in your dialoguesClosed Bot stories and rules in CXone Bot Builder. . When the bot shows the response to the contact, it replaces the variable with the slot's value.

You can use slots as variables in any response action that you can add your own text to.

  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 Stories, Rules, or Fallback tab, click the dialogue you want to work with.

  5. Locate the bot action you want to add a slot variable to, or add a new bot action.
  6. Click in the field in the bot action where you want to add the slot variable and add any other text that you want to be in the response.
  7. Type an open curly bracket ( { ). A list of available slots appears in a drop-down menu. You can continue typing the slot name or select a slot from the list. Add a closing curly bracket after the name ( } ).

    In the following image, two slots are used as variables in the note displayed for the agent when the bot hands an interaction over. When the agent views the interaction, they might see a message such as "Winnie Le Pooh needs human help. They want to know their account balance."

  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.

Use Slots as Conditions in Bot Responses

You can use slots as conditions in bot responses. This allows you to have the bot make decisions based on criteria that occur during the interaction, such as something the contact says.

You can also use slots as conditions to define when the bot should follow a certain ruleClosed Used to define bot's response to messages that don't change with context..

  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 Stories, Rules, or Fallback tab, click the dialogue you want to work with.

  5. Hover the cursor over the plus sign + on the left until it changes to a bot icon A square with rounded corners and a robot head inside. and the bot actions menu appears.
  6. Click Slot Condition.

  7. Select the name of the Slot that you want to use as a condition in this ruleClosed Used to define bot's response to messages that don't change with context., storyClosed Used to train bot for interaction handling based on intent and context, or fallbackClosed A plain text alternative sent when the destination doesn't support rich media..

  8. Enter the Value that the slot must contain for the bot to follow the path described in this dialogue.

  9. Add one or more bot actions to define what you want the bot to do when the specified slot's value equals the Value you defined.

  10. Click Train and Stage to train your bot on the updated story, rule, or fallback.