Core Behaviors

The StandardBot core behaviors are the essential actions that virtual agents perform. CXone handles each core behavior in a standard, consistent way. The way CXone handles each behavior is defined on this page.

All virtual agent behaviors consist of:

  • Input:  Input is passed to the virtual agent by the script. Inputs trigger the virtual agent to respond. There are two kinds of input:

    • Words or phrases: These are the utterancesClosed What a contact says or types. from a human user. Part of setting up your virtual agent is training it to recognize the words that trigger specific behaviors and intentsClosed The meaning or purpose behind what a contact says/types; what the contact wants to communicate or accomplish.
    • Automated intents: These are commands the script sends to the virtual agent to trigger a specific behavior. The virtual agent is configured to respond to an automated intent by following a specific intent in its configuration. For example, the script recognizes the situation—a contact starts a new chat— and sends the automated intent to the virtual agent to trigger an intent—the Welcome intent to start a new interaction. To use automated intents: 
      • The script must be written to identify the situation and send the command to the virtual agent.
      • The virtual agent must be configured to respond to the command by following a specific, configured intent.
  • Response from the virtual agent: All data sent from the virtual agent to the Studio script is considered part of the response. Key parts of the response are: 
    • Statements or questions that the script passes on to the contact.
    • Other data that the script uses, such as the intent and the next script branch to take.

Behavior Configuration in StandardBot Tests

In the StandardBot test script, each behavior has a default configuration. The configuration defines:

  • The input from the script that triggers the virtual agent's responses.
  • The criteria to determine if the virtual agent passes the test.

The default configuration works as-is and there is no need to change it. If for any reason you need to modify it, such as when instructed to by your CXone Account Representative, you can do so. Make a backup copy of your script before making changes. Additionally, be sure to inspect the script carefully to ensure that you've changed everything that must be changed in all places where the information appears. Any changes to the default input triggers or pass criteria must also be made to the test-related configurations in the virtual agent you're testing.

Welcome Intent

Behavior Definition: The virtual agent responds to a new session by sending a welcome message as configured.  

This behavior applies to voice and text virtual agents. Most virtual agents that are natively supported in CXone use this behavior.

The following table describes how the Welcome intent works.

Event Details
Human Input (Chat)

Any message that begins a chat session.

Human Input (Voice)

Depends on how the virtual agent is integrated into the phone system or IVR menu.

For example, if a virtual agent is used to triage phone calls for customer service, callers might call the main company phone number. The script would send the welcome intent to the virtual agent, which could respond with a list of options for the caller to choose from.

Trigger

The Welcome automated intent. This can be any value, such as AutoWelcome or WelcomeIntent, as long as your script and your virtual agent are configured to use the same trigger. The variable you use to pass the automated intent is up to you. There is no standard or required variable.

The script sends this to the virtual agent when the expected human input occurs. The circumstances under which this happens depend on how your script is set up.

Virtual Agent Response

The welcome message or intent as configured in the virtual agent provider's configuration panel.

For example, the welcome intent could be a greeting ("Hello. How can we help you today?") or directions to the contact ("Please enter your name.").

Expected Result Branch: PromptAndCollectNextResponse

StandardBot Test

Welcome Intent is StandardBot Test 1.

The Welcome Intent test is useful as a learning and example tool, but may not be useful when testing a production environment. Depending on the virtual agent provider you use, the Welcome intent may be handled in different ways. For example, some virtual agents may have more than one Welcome intent message that they display randomly to contacts. Or they may only have one option for a Welcome intent, so that if you test a production virtual agent, this test triggers the live version of the Welcome intent.

This test is for voice and text virtual agents.

Event Details
Configure Virtual Agent for Test

Configure your virtual agent to respond to the Welcome autointent input with the following phrase: 

hello world

Note: If you're testing a live virtual agent that only has one option for a Welcome intent, skip this configuration. Do not modify your customer-facing welcome message.

Variable Input to Run Test in Script

In the TestData object in the Config test data snippet:

AutoIntent="Welcome"

UserInput=""

CustomPayload=""

TestName="StandardBotWelcome - Get Hello World from Automated Welcome"

Input to Run Test Manually

Click More Options Three dots stacked vertically. in the Test pane on the virtual agent's Properties page in Virtual Agent Hub. Select Trigger Custom Intent Event from the menu and enter Welcome.

Virtual Agent Pass Criteria

The virtual agent responds with the expected Welcome intent, based on its configuration.

The default pass criteria in the StandardBot script is: 

IF nextprompt.contains('hello world').

Default Test Label in Report

Test1

Bot Exchange

Behavior Definition:  The virtual agent responds to contact input with an appropriate response.

This behavior applies to voice and text virtual agents. Most virtual agents that are natively supported in CXone use this behavior.

The following table describes how a typical exchange between a contact and a virtual agent works.

Event Details
Human Input (Chat and Voice)

Any, after the automated welcome intent has been sent.

Trigger

The contact's utteranceClosed What a contact says or types.. The content of the utterance is sent in the UserInput variable each time the contact sends a message through the chat window:

UserInput="[any message or question from the contact]"

Virtual Agent Response

An appropriate response based on the contact's utterance. The response must include the intentClosed The meaning or purpose behind what a contact says/types; what the contact wants to communicate or accomplish in the intentInfo.intent parameter.

Expected Result Branch: PromptAndCollectNextResponse

StandardBot Test

Bot Exchange is StandardBot Test 2.

Currently, this test is only for text virtual agents. For voice virtual agents, it relies on voice input. The nonsense word used to trigger the test in a text virtual agent doesn't work for a voice virtual agent.

Event Details
Configure Virtual Agent for Test

Configure your virtual agent to respond to the debugStandardBotExchange input with:

  • A response that includes this phrase: 
  • bot response

  • The StandardBotExch ange intent.

Variable Input to Run Test in Script

In the TestData object in the Config test data snippet:

AutoIntent=""

UserInput="debugStandardBotExchange"

CustomPayload=""

TestName="StandardBotExchange - Get Bot Response from Human Input"

Input to Run Test Manually

For a text based virtual agent, enter debugStandardBotExchange in the Type a message field in the Test pane on the virtual agent's Properties page in Virtual Agent Hub. You can also enter this trigger word in the chat window associated with the channel the virtual agent runs on, such as the digital Live Chat window on your website.

Virtual Agent Pass Criteria

The script parses the virtual agent's response. The default pass criteria in the StandardBot script are: 

IF nextprompt.contains('bot response') && BotIntent.contains('StandardBotExchange')

Default Test Label in Report

Test2

User Input Not Understood

Behavior Definition: The virtual agent responds appropriately when it doesn't understand the contact's input.

This behavior applies to voice and text virtual agents. Most virtual agents that are natively supported in CXone use this behavior.

The following table describes the User Input not Understood behavior.

Event Details
Human Input (Chat and Voice)

Any text the virtual agent is not trained to recognize and is sent after the automated welcome intent has been sent.

Trigger

The contact's utteranceClosed What a contact says or types., when it doesn't match anything the virtual agent is trained to recognize.

The content of the utterance is sent in the UserInput variable each time the contact sends a message through the chat window:

UserInput="[any message or question from the contact]"

Virtual Agent Response

The virtual agent responds with the UserInputNotUnderstood intent: intentInfo.intent = userInputNotUnderstood intent and vahExchangeResultBranch = UserInputNotUnderstood .

Expected Result Branch PromptAndCollectNextResponse

StandardBot Test

User Input Not Understood is StandardBot Test 5.

This test is for voice and text virtual agents.

Event Details
Configure Virtual Agent for Test

Configure your virtual agent to respond to the nonsense word Gobblygook with the UserInputNotUnderstood intent and vahExchangeResultBranch = userinputnotunderstood .

Variable Input to Run Test in Script

In the TestData object in the Config test data snippet:

AutoIntent=""

UserInput="[any nonsense word or phrase]"

CustomPayload=""

TestName="StandardBotUserInputNotUnderstood - Get a user not understood message for nonsense text"

Input to Run Test Manually

Enter Gobblygookin the Type a message field in the Test pane on the virtual agent's Properties page in Virtual Agent Hub. You can also enter this trigger word in the chat window associated with the channel the virtual agent runs on, such as the digital Live Chat window on your website.

Virtual Agent Pass Criteria

The script parses the virtual agent's response. The default pass criteria are: 

IF (BotIntent= "userinputnotunderstood") && BotDiagnostics.contains('userinputnotunderstood')

Default Test Label in Report

Test5

User Input Timeout

Behavior Definition: The virtual agent responds appropriately when it receives the UserInputTimeout automated intent from the script. This happens when the script detects that the contact takes too long to respond.

For example, if your script uses the ASKCALLER action to prompt the contact, the length of the timeout would come from that action's TimeoutSec property. The action then takes the OnTimeout branch. This triggers the script to send the UserInputTimeout automated intent to the virtual agent. The response comes in on the OnTimeout branch with the appropriate UserInputTimeout intent.

This behavior applies to voice and text virtual agents. Most virtual agents that are natively supported in CXone use this behavior.

The following table describes how the user input timeout behavior works.

Event Details
Human Input (Chat and Voice)

None. To trigger a timeout, the contact cannot enter or speak anything for the length of the timeout configuration. The length of time is configurable and depends on the specific timeout impacting the interaction.

Trigger

The UserInputTimeout automated intent:

AutoIntent = "UserInputTimeout"

The script sends this to the virtual agent when the contact does not enter any text in the chat window and enough time passes to trigger a script-based timeout in the script.

Virtual Agent Response

The virtual agent responds with the UserInputTimeout intent.

Expected Result Branch: PromptAndCollectNextResponse

StandardBot Test

User Input Timeout is StandardBot Test 6.

This test only validates that the script can trigger a timeout.

This test is for voice and text virtual agents.

Event Details
Configure Virtual Agent for Test

Configure your virtual agent to response to the SILENCE automated intent by returning the UserInputTimeout intent.

Variable Input to Run Test in Script

In the TestData object in the Config test data snippet:

AutoIntent="SILENCE"

UserInput=""

CustomPayload=""

TestName="StandardBotUserInputTimeout - Get a user input timeout message for when an Askcaller action hits the Timeout Branch"

Input to Run Test Manually

Click More Options Three dots stacked vertically. in the Test pane on the virtual agent's Properties page in Virtual Agent Hub. Select Trigger Custom Intent Event from the menu and enter StandardBotUserInputTimeout.

Virtual Agent Pass Criteria

The script parses the virtual agents response. The default pass criteria are: 

IF (BotIntent = "userinputtimeout") && BotDiagnostics.contains('userinputtimeout')

Default Test Label in Report

Test6

Send Custom Payload to the Script

Behavior Definition: The virtual agent can pass custom payload to the Studio script in CXone. The payload is not intended to be passed on to the contact. This can be used to pass data that the virtual agent collected back to the script for later use. For example, you could store data in your CRMClosed Third-party systems that manage such things as contacts, sales information, support details, and case histories. or display it in the agent application.

The JSON structure of custom payload sent from the virtual agent should look similar to the following example:

{
"scriptPayloads": [
  {
   "metadata": "for your script",
   "nestedobject": {
   "integervalue": "4",
   "stringvalue": "foo"
   },
   "nestedarray": [
	"1",
	"2",
	"3",
	"4"
  ]
  }
 ]
}

This behavior applies to voice and text virtual agents. Most virtual agents that are natively supported in CXone use this behavior.

The following table describes how sending custom payload to the script works.

Event Details
Human Input (Chat and Voice)

Varies.

Trigger

Varies.

Define the input trigger and the intent that you want to associate this behavior with. Configure the virtual agent to send it and the script to receive and act on it.

For example, you might want the virtual agent to include account details in the next response sent after collecting that information from the contact. In this case, you would configure the response to include the custom payload that contains the collected data.

Virtual Agent Response

The virtual agent sends custom payload data in the customPayload object, following the structure described at the beginning of this section.

Expected Result Branch: PromptAndCollectNextResponse

StandardBot Test

Send Custom Payload to Script is StandardBot Test 7.

This test is for voice and text virtual agents.

Event Details
Configure Virtual Agent for Test

Configure your virtual agent to send custom payload to the script in response to the debugStandardBotScriptPayload user input. The custom payload must contain the following key-value pairs: 

  • "metadata": "for your script"
  • "integervalue": "4"
  • "nestedarray": "1", "2", "3", "4"

Variable Input to Run Test in Script

In the TestData object in the Config test data snippet:

AutoIntent=""

UserInput="debugStandardBotScriptPayload"

CustomPayload=""

TestName="StandardBotScriptPayload - Get a custom payload back from the bot"

Input to Run Test Manually

None. This test cannot be triggered manually.

Virtual Agent Pass Criteria

The script parses the virtual agent's response and saves it in three variables, transcriptString, transcriptString2, transcriptString3. The default pass criteria are: 

IF transcriptString.contains('metadata":"for your script') && transcriptString2.contains('integervalue":"4') && transcriptString3.contains('1","2","3","4')

Default Test Label in Report

Test7

Send Custom Payload to the Virtual Agent

Behavior Definition: The script can send custom payload from CXone to the virtual agent provider. The virtual agent can parse the payload and respond.

Custom payload must be sent in the customPayload object. Custom payload can contain anything you need to send. CXone has no requirements for what it must contain. Your virtual agent may have requirements for the format, structure, and contents of custom payload.

This behavior applies to voice and text virtual agents. Most virtual agents that are natively supported in CXone use this behavior.

The following table describes how sending custom payload to the virtual agent works.

Event Details
Human Input (Chat and Voice)

Any, after the automated welcome intent has been sent.

Trigger

Varies. Configure your script to include custom payload in the customPayload object in the request sent to the virtual agent when necessary. Follow any requirements for your virtual agent provider.

Virtual Agent Response

Expected Result Branch: PromptAndCollectNextResponse

StandardBot Test

Send Custom Payload to Virtual Agent is StandardBot Test 8.

The default custom payload sent for this test is structured to test three ways to send custom payload data to virtual agents. Some virtual agents may respond to only one of the methods, but others may use more than one method. You can check the contents of the customPayload variables in the script trace to learn which method your virtual agent uses.

This test is for voice and text virtual agents.

Event Details
Configure Virtual Agent for Test

Configure your virtual agent to respond to the user input debugStandardBotExchangeCustomInput by parsing and returning the contents of the custom payload as the next prompt response.

Variable Input to Run Test in Script

In the TestData object in the Config test data snippet:

AutoIntent=""

UserInput="debugStandardBotExchangeCustomInput"

CustomPayload=customInputToBotJson

TestName="StandardBotExchangeCustomInput - Send a custom payload to the bot and have it returned"

In the StandardBot script, customInputToBotJson is a dynamic data object that's configured by default with the values to parse out for the test.

Input to Run Test Manually

Enter debugStandardBotExchangeCustomInputin the Type a message field in the Test pane on the virtual agent's Properties page in Virtual Agent Hub. You can also enter this trigger word in the chat window associated with the channel the virtual agent runs on, such as the digital Live Chat window on your website.

Virtual Agent Pass Criteria

The virtual agent parses the custom payload and returns its contents as the next prompt response. The default pass criteria is: 

IF nextprompt.contains('passing json to bot method')

Default Test Label in Report

Test8

Automated Intent

Behavior Definition: The virtual agent can respond appropriately when it receives an automated intent from the script. The appropriate response varies and will be different for each automated intent.

This behavior applies to voice and text virtual agents. Most virtual agents that are natively supported in CXone use this behavior.

Event Details
Human Input (Chat and Voice)

Varies.

Trigger

Use a variable in your script to send the automated intent to the virtual agent.

Virtual Agent Response

Varies, depending on the automated intent.

Expected Result Branch: Varies.

StandardBot Test

Automated Intent is StandardBot Test 9.

This test requires some customization of the StandardBot script.

This test is for voice and text virtual agents.

Event Details
Configure Virtual Agent for Test

Configure your virtual agent to respond to the automated intent you want to test. You will also need to modify the input and pass criteria for test 9 in the StandardBot script.

Variable Input to Run Test in Script

In the TestData object in the Config test data snippet:

AutoIntent="StandardBotExchange"

UserInput=""

CustomPayload=""

TestName="StandardBotAutomatedIntent - Get Bot Response from an automated intent"

Input to Run Test Manually

Click More Options Three dots stacked vertically. in the Test pane on the virtual agent's Properties page in Virtual Agent Hub. Select Trigger Custom Intent Event from the menu and enter StandardBotExchangeCustomInput.

Virtual Agent Pass Criteria

The virtual agent responds as configured. The exact responds varies depending on the automated intent tested.

 

Default Test Label in Report

Test9

Branch Override

Behavior Definition: The virtual agent can respond with an override of the branch or intent when appropriate. This test overrides the response branch or the intent in Virtual Agent Hub with one specified in the custom payload that the bot sends to the script.

Not all virtual agents need this behavior. If your virtual agent handles sending the correct branch, such as for escalation or ending the conversation, without a specific action, you can omit this one from your script.

You must configure your virtual agent to send a custom payload that includes a branch or intent override. You can do this in the provider's console. The payload must include the JSON shown in the following example.

{
"contentType": "ExchangeResultOverride",
"content": {
	vahExchangeResultBranch": "ReturnControlToScript",
	"intent": "OverrideIntent"
	}
}

You don't have to test overriding both result branch and intent if you only use one of these options. Omit vahExchangeResultBranch to test overriding only intent. Omit intent to test overriding only result branch.

This behavior applies to voice and text virtual agents. Most virtual agents that are natively supported in CXone use this behavior. The only exception to this is SmartAssist.

The following table describes how triggering a branch override works.

Event Details
Human Input (Chat and Voice)

Varies.

Trigger

Custom payload sent from the virtual agent to the script that includes a branch or intent override, as shown in the preceding example. Your script must be configured to parse out these values and act on them.

Virtual Agent Response

Varies, depending on branch or intent that was overridden.

Expected Result Branch: Varies.

StandardBot Test

Branch Override is StandardBot Test 10.

This test is for voice and text virtual agents.

Event Details
Configure Virtual Agent for Test

Configure your virtual agent to respond to the debugStandardBotBranchOverride user input by changing the intent sent in the response to Override Intent and returning control to the script.

Variable Input to Run Test in Script

In the TestData object in the Config test data snippet:

AutoIntent=""

UserInput="debugStandardBotBranchOverride"

CustomPayload=""

TestName="StandardBotAutomatedIntent - Get Bot Response from an automated intent"

Input to Run Test Manually

Enter debugStandardBotBranchOverride into the Type a message field in the Test pane on the virtual agent's Properties page in Virtual Agent Hub.

Virtual Agent Pass Criteria

The virtual agent responds with overrideIntent as the intent and ReturnControlToScript as the next branch.

 

Default Test Label in Report

Test10

End Conversation

Behavior Definition: The virtual agent can appropriately signal the script that a conversation is complete without escalating to a live agent.

This behavior applies to voice and text virtual agents. Most virtual agents that are natively supported in CXone use this behavior.

The following table describes how triggering the end of the conversation works.

Event Details
Human Input (Chat and Voice)

Varies. The contact indicates that they are done with the conversation.

Trigger

Varies. Configure your virtual agent to recognize the signs that the conversation is complete. In your script, you should have distinct paths for the end of a conversation and escalation.

Virtual Agent Response

The virtual agent returns control to the script.

Expected Result BranchReturnControlToScript

StandardBot Test

End Conversation is StandardBot Test 11.

This test is for voice and text virtual agents.

Event Details
Configure Virtual Agent for Test

Configure your virtual agent to respond to the debugStandardBotEndConversation user input by changing the intent sent in the response to Override Intent and the next branch to ReturnControlToScript.

Variable Input to Run Test in Script

In the TestData object in the Config test data snippet:

AutoIntent=""

UserInput="debugStandardBotEndConversation"

CustomPayload=""

TestName="StandardBotEndConversation - Get end conversation result back from bot"

Input to Run Test Manually

Enter debugStandardBotEndConversation into the Type a message field in the Test pane on the virtual agent's Properties page in Virtual Agent Hub.

Virtual Agent Pass Criteria

The virtual agent responds ReturnControlToScript as the next branch.

 

Default Test Label in Report

Test11

Escalation

Behavior Definition: The virtual agent can escalate an interaction when appropriate by signaling to the script that the contact needs to speak to a live agent.

This behavior applies to voice and text virtual agents. Most virtual agents that are natively supported in CXone use this behavior. The only exception to this is Dialogflow ES, Amazon Lex V1, and Amazon Lex V2. For these exceptions, you can use the Branch Override StandardBot test to test escalation.

The following table describes how triggering escalation works.

Event Details
Human Input (Chat and Voice)

Varies. The contact indicates that they wish to be transferred to a live agent.

Trigger

Varies. Configure your virtual agent to recognize the signs that the conversation needs to be transferred to a live agent. In your script, you should have distinct paths for the end of a conversation and escalation.

Virtual Agent Response

The virtual agent returns control to the script.

Expected Result Branch: ReturnControlToScript

StandardBot Test

Escalation is StandardBot Test 12.

This test is for voice and text virtual agents.

Event Details
Configure Virtual Agent for Test

Configure your virtual agent to respond to the debugStandardBotEscalation user input by changing the intent sent in the response to Override Intent and the next branch to ReturnControlToScript.

Variable Input to Run Test in Script

In the TestData object in the Config test data snippet:

AutoIntent=""

UserInput="debugStandardBotEscalation"

CustomPayload=""

TestName="StandardBotEscalation - Get escalation message back from the bot"

Input to Run Test Manually

Enter debugStandardBotEscalation into the Type a message field in the Test pane on the virtual agent's Properties page in Virtual Agent Hub.

Virtual Agent Pass Criteria

The virtual agent responds with escalat as the intent and returns control to the script. The default pass criteria are: 

IF BotIntent.contains('escalat') && BotDiagnostics.contains('returncontroltoscript')

Note: Using escalat as the pass criteria allows the script to capture any intent name that begins with these characters. It eliminates the need to check for several variations, such as escalate, escalation, or escalating.This allows the test script to work with any virtual agent provider.

Default Test Label in Report

Test12