DefaultNextPromptBehavior Snippet
Content on this page is for a product or feature in controlled release (CR). If you are not part of the CR group and would like more information, contact your CXone Account Representative.
This code specifies the behavior of another action. Use it with virtual agent A software application that handles customer interactions in place of a live human agent. actions to define behaviors for bots such as Google Dialogflow ES. You can include more than one Snippet action with this code in a single script. Each instance of the action can provide different behaviors to reflect what you want to happen at that point in the script.
The behaviors you can define are comfort noise, capturing DTMF Signaling tones that are generated when a user presses or taps a key on their telephone keypad.tones, and barge.

DYNAMIC defaultNextPromptBehaviors
ASSIGN defaultNextPromptBehaviors.silenceRules.engageComfortSequence="false"
ASSIGN defaultNextPromptBehaviors.silenceRules.botResponseDelayTolerance=1000
ASSIGN defaultNextPromptBehaviors.silenceRules.comfortPromptSequence.prompts[1].audioFilePath="comfortDEV.wav"
ASSIGN defaultNextPromptBehaviors.silenceRules.millisecondsToWaitForUserResponse=10000
ASSIGN defaultNextPromptBehaviors.audioCollectionRules.collectionType="SEND_UTTERANCE_AUDIO"
ASSIGN defaultNextPromptBehaviors.audioCollectionRules.dtmfRules.detectDtmf=false
ASSIGN defaultNextPromptBehaviors.audioCollectionRules.dtmfRules.clearDigits="true"
ASSIGN defaultNextPromptBehaviors.audioCollectionRules.dtmfRules.terminationCharacters="#"
ASSIGN defaultNextPromptBehaviors.audioCollectionRules.dtmfRules.stripTerminator=true
ASSIGN defaultNextPromptBehaviors.audioCollectionRules.dtmfRules.interDigitTimeoutMilliseconds=5000
ASSIGN defaultNextPromptBehaviors.audioCollectionRules.dtmfRules.maxDigits=10
ASSIGN defaultNextPromptBehaviors.audioCollectionRules.bargeConfiguration.enableSpeakerBarge="true"
ASSIGN defaultNextPromptBehaviors.userInputType=2
ASSIGN nextPromptBehaviorsOutjson="{defaultNextPromptBehaviors.asjson()}"
Properties for Comfort Noise
Comfort noise is audio that plays when the bot's response is delayed. Its purpose is to reassure the contact that the line is still active.

Property | Details |
---|---|
engageComfortSequence | Set the property to true if you want to enable comfort noise for this action. Set it to false if you don't want this action to use comfort noise. |
botResponseDelayTolerance | Enter the amount of time in milliseconds that triggers the comfort noise audio file. |
audioFilePath | Enter the location of the comfort noise audio file. The file should be located in your tenant's file structure. Include the whole path if the file is in a folder. The file structure is enforced as it would be for other prompt behavior. |
millisecondsToWaitForUserResponse | Enter the amount of time in milliseconds that the action waits for a response from the contact before timing out. |
Properties for DTMF Detection
DTMF detection allows you to collect the tones when a contact presses buttons on the phone keypad.

Property | Details |
---|---|
detectDtmf | Set this property to true if you want the action to capture DTMF entries. |
clearDigits |
Set this property to true if you want to clear the DTMF tone buffer when the action begins. The buffer caches DTMF tones when the contact presses a key on their phone keypad. This property is similar to the clearDigitsproperty in the Menu action. |
terminationCharacters |
Enter the character that you want contacts to enter to indicate they are finished entering digits. For example, you might want contacts to press the pound sign (#) when they finish entering an account number. This property is similar to the Terminationproperty in the Menu action. |
stripTerminator | Set this property to true if you want to remove the value of the termination character from the captured DTMF tones. |
interDigitTimeoutMilliseconds |
Enter the amount of time in milliseconds that the system waits after a contact enters a digit to determine if the contact will enter another digit. This property is similar to the InterDigitTimeoutproperty in the Menu action. |
maxDigits |
Enter the maximum number of digits that the contact can enter for this action's prompt. For example, if the prompt instructs the contact to enter the last four digits of their social security number, set this property to 4. When the maxDigits value is reached, the script continues to execute. This property is similar to the MaxDigits property in the Menu action. |
Property for Barge
Barge allows the contact to speak over the audio that the script is playing.

Property | Details |
---|---|
enableSpeakerBarge | Set this property to true to enable barge. This property should be enabled (true) for most bot interactions, but can be disabled (false) when the audio contains information the caller is required to hear, such as legal disclaimers. |