TextBot Conversation

The icon for the Textbot Conversation action.

Integrates a self-service virtual agentClosed A software application that handles customer interactions in place of a live human agent. textbot with any supported script type. Your virtual agent must support this action.

This action is only for use with very simple bots. It does not allow for customization of the bot's behavior from turn to turn. If you need to customize the bot's behavior between turns in the conversation and if your virtual agent provider supports it, use the TextBot Exchange action.

Textbot Conversation interacts directly with the bot, passively monitoring the conversation in real time. The bot analyzes the conversation for intentClosed The meaning or purpose behind what a contact says/types; what the contact wants to communicate or accomplish and context and returns appropriate responses to the contact. When bot indicates that the conversation is over, the action continues with the Studio script. The action passes along any relevant information for screenpops, agent routing, and so on.

Textbot Conversation is not recommended for use with Google Dialogflow CX, Google Dialogflow ES, or SmartAssist chatbots.

Double-clicking this action opens the CXone Virtual Agent Hub, where you can manage all of your virtual agent bots.

Supported Script Types

The icon for the Email script type - a large @ symbol in a diamond. The icon for the Chat script type - a chat bubble with an ellipsis inside (...), in a diamond shape. The icon for the SMS script type - a smart phone with a chat bubble coming out of it.
Email Chat SMS

Related Studio Actions

The TextBot Exchange action is similar to this action but is used for more complex virtual agent interactions. It allows you to include exchange parameters and to customize various aspects of the conversation between contact and bot.

Voicebot Conversation and Voicebot Exchange are also similar, providing the same function as Textbot Conversation and Textbot Exchangefor voice-based interactions.

Supported Virtual Agents

This action supports the following virtual agents: 

Before you can assign a virtual agent bot to this action, you must add and configure the bot in the CXone Virtual Agent Hub. You only need to add a virtual agent to the Virtual Agent Hub once, then you can assign it to actions as needed. Refer to the topic for the virtual agent you're using for configuration details.

Properties

Property Details
virtualAgentID

Corresponds to the name of the virtual agent selected in the CXone Virtual Agent Hub. See the Supported Virtual Agents section on this page for more information.

useDefaultWelcomeMessage

When set to true, the default welcome message for the virtual agent assigned to the action is used.

When set to false, the script relies on the virtual agent bot to provide the welcome message.

userInputTimeout

Sets the amount of time in seconds that the action waits for the contact to input a response before timing out.

maxTimeouts

Sets the number of no-utterance exchanges before routing to the error fallback branch.

customPayload

A generic JSON object that passes data from the script to the bot. It's populated from the Studio script. You can use it to pass information such as the contact's name from the CRM to be used in the Welcome message. You can convert this object using the asjson() method in a Snippet action.

For Amazon Lex bots, this property is required. Use a Snippet action with code from the customPayload snippet. Other bots may benefit from this property and the customPayload snippet.

For Google Dialogflow ES bots, this property is used to pass the context for an intentClosed The meaning or purpose behind what a contact says/types; what the contact wants to communicate or accomplish. For more information about using this property with Google Dialogflow ES, see the Best Practices for Custom Payload with Google Dialogflow ES section in this topic.

For Google Dialogflow CX bots, see the Best Practices for Custom Payload with Google Dialogflow CX section.

Don't use this property if you need to process data that the bot returns to the script. Instead, use the customPayloadVarName (out) variable.

Branches

Branch Details
OnBotSessionComplete

Path taken when the bot indicates that the conversation has ended.

OnError Path taken when there is an unexpected problem (for example, poor connectivity, syntax errors, and so forth). The _ERR variable should be populated with a condensed explanation of the problem.
OnTimeout

Path taken when there is no response by the user in the time specified in the Default Next Prompt BehaviorSnippet action.

Output Variables

Variable Details
customPayloadOutput (out)

Returns custom JSON data from the virtual agent bot to the script. Use this variable when you want the script to process data that the bot provides. May contain fulfillment data.

If you want to provide data to the bot, use the customPayload property.

errorDetailsOutput (out)

Lists the reason that the error branch was taken.

intentInfoOutput (out)

Lists details from the bot indicating current user intent.

Snippet Action Code

Some of this action's properties require Snippet action code. You can follow these examples when creating your script.

Best Practices for Custom Payload with Google Dialogflow CX

When using this action with Google Dialogflow CX follow these best practices for integrating custom payloads: 

  • Dialogflow CX doesn't use contexts to pass data to Dialogflow intentsClosed The meaning or purpose behind what a contact says/types; what the contact wants to communicate or accomplish like Dialogflow ES does.
  • You can pass custom data to Dialogflow CX using JSON key-value pairs. In a Snippet action in your script, create a DYNAMIC customPayload object and add the key-value pairs to it. For example: 
    DYNAMIC customPayload

    customPayload.ani = ani

    customPayload.contactID = contactId

    customPayload.masterContactId = masterId
    customPayloadJSON = "{customPayload.asJSON()}"

  • In the Exchange or Conversation action in your script, configure the customPayload property with the variable you used in the customPayload object with the asJSON() method.
  • Pass the customPayload JSON to the bot using the Payload property of QueryParameters (see Google documentation on QueryParameters for Google Dialogflow CX).
  • Data passed through QueryParameters is received by a webhook in Dialogflow CX. You can write code in the Dialogflow CX console to handle the passed data.
  • To pass custom data from your Dialogflow CX bot back to the script, use the Custom Payload field in the Dialogflow CX console for the virtual agent you're using with CXone. Map this to your script using the customPayloadVarName (out) variable in the voicebot or chatbot Studio action in your script. For example, you can use this to set the next prompt's behaviors.
  • To configure how long the bot waits when the contact pauses while speaking, add the maxPostEnergySilenceMS field to the nextPromptBehaviors or defaultNextPromptBehavior Snippet action.

Best Practices for Custom Payload with Google Dialogflow ES

When using this action with Google Dialogflow ES, follow these best practices for integrating custom payloads: 

Example Script Using TextBot Conversation

An image showing an example script using the Textbot Exchange action.

Download this script.