VOICEBOT STREAM

This help page is for Studio. This information is also available for Desktop Studio.

Icon of a smiling robot head

Integrates a self-service virtual agent with voice scripts using a continuous stream of audio from the platform. This action allows NiCE CXone use streaming audio with SIPClosed Protocol used for signaling and controlling multimedia communication sessions such as voice and video calls.connections.

This action does not allow you to change the virtual agent's behavior between turns. You only need one instance of this action in your script.

When you click Open Editor in this action's properties, Virtual Agent Hub options. The only provider options you see are those that support custom telephony. Currently, the only supported provider is Google Dialogflow CX VoiceStream. You can open Virtual Agent Hub from the NiCE CXone platform to see other providers available in your system.

Dependencies

This action is only for use with the Google Dialogflow CX VoiceStream virtual agentClosed A software application that handles customer interactions in place of a live human agent.. Use this action instead of the VOICEBOT EXCHANGE action for integrations with Dialogflow CX VoiceStream.

Supported Script Types

Phone

Input Properties

These properties define data that the action uses when executing. You can use variable substitution in all of the properties of this action.

Property

Description

Add Caption

Enter a short phrase that uniquely identifies this action in the script. The caption appears on the script canvas under the action icon.

virtualAgentId

The name of the virtual agent selected in the Virtual Agent Hub. When you assign a virtual agent app to a Studio action in Virtual Agent Hub, it automatically populates this property. The name is the value used in the Virtual Agent (Bot) Name field in the Virtual Agent Hub app. You can use variable substitution in this property.

Custom Payload to Bot

The variable that holds the custom payload to send to the virtual agentClosed A software application that handles customer interactions in place of a live human agent..

Enter the name of the JSON object that passes data from the script to the virtual agent. You must define the custom payload object in a Snippet action. The object must be converted to JSON, either in the snippet or in the customPayload property.

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

Initial Intent

The first intentClosed The meaning or purpose behind what a contact says/types; what the contact wants to communicate or accomplish. that the action sends to the virtual agentClosed A software application that handles customer interactions in place of a live human agent..

Output Properties

These properties contain variables that hold data returned from executing the action. They're available for reference and use when the action completes.

Property

Description

CustomPayloadFromBotVarName (out)

This variable contains the custom payload returned from the virtual agentClosed A software application that handles customer interactions in place of a live human agent..

ErrorDetailsVarName (out)

When the Error branch is taken, this variable contains any details associated with the error.

Result Branch Conditions

Result branch conditions allow you to create branches in your script to handle different outcomes when an action executes.

Condition

Description

Default

Path taken unless the script meets a condition that requires it to take one of the other branches. It is also taken if the action's other branches are not defined.

OnContained

The branch taken when the interaction with the virtual agent ends successfully.

Error During Session

Path taken when the action fails to execute properly. For example, when there is an unexpected problem such as poor connectivity, syntax errors, and so on. The _ERR variable, with a single underscore character, should be populated with a condensed explanation of the problem.

On Escalate

The branch taken when the interaction is escalated to a human agent.

On Failed to Initialize

The branch taken when the profile named in virtualAgentID has the wrong credentials or the wrong virtual agent profile is selected.

Best Practices for Custom Payload with Dialogflow CX VoiceStream

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

  • 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 VoiceBOT STREAM action in your script, configure the customPayload property with variable that has the asJSON() function in its value. You can find this variable in the customPayload object.
  • Pass the customPayload JSON to the virtual agent using the Payload property of QueryParameters. See Google documentation on QueryParameters A square with an arrow pointing from the center out from the top right corner. 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.
  • Do not nest an object within the customPayload object. Nested objects are sent as literal strings.
  • To pass custom data from your Dialogflow CX virtual agent back to the script, use the Custom Payload field in the Dialogflow CX console. Make sure you're in the console for the virtual agent you're using with NiCE CXone. Map this to your script using the customPayloadVarName (out) variable in the VOICEBOT STREAM action in your script.
  • To pass custom data to Dialogflow CX from the script, use session_params in the customPayload object in a Snippet action. For example:

    DYNAMIC customPayload
    customPayload.session_params.name = "Winnie le Pooh" 
    customPayload.session_params.job = "Food critic" 
    customPayload.session_params.location = "Hundred Acre Wood"	

    Access the session parameters in the Dialogflow CX agent intent using the following syntax:

    $session.params.name = Winnie Le Pooh
    $session.params.job = Food critic
    $session.params.location = 100 Acre Wood 

    Session parameters are only used with Dialogflow CX virtual agents. To achieve a similar result with Dialogflow ES, use contexts.

  • Configure speech context hints and a custom conversation ID to transfer the conversation to a different Dialogflow CX virtual agent in the Custom Payload snippet.

  • To configure how long the virtual agent waits when the contact pauses while speaking, add the maxPostEnergySilenceMSparameter to the Next Prompt Behaviorsor Default Next Prompt BehaviorsSnippet action.