Actions in Scripts
Actions are the building blocks of CXone StudioStudio scripts. A script is a network of actions that route and manage customer traffic for your contact center. Each action has a specific purpose, and together they define what a script accomplishes. There are actions that play audio files, instruct the script to wait, request an agent, and much more.
Each action represents code that has already been written. This means you don't need to be a scripting expert to create simple scripts in CXone StudioStudio. If you want to create more complex scripts, however, some custom scripting is required.
In the following image of an example script, you can see a series of actions linked by connectors. The description of this script shows how each action serves a specific purpose in the script.
This script shows a basic inbound phone script. A description follows the image.
- When a contact calls this organization, the script starts (Begin action) and counts the number of available agents (Countagents action).
- If (If action) the number of agents is zero, the script follows the path that goes up, labeled False. A message plays (Play action) and the system disconnects the call (Hangup action).
- If (If action) the number of available agents is greater than zero, then an IVR Automated phone menu that allows callers to interact through voice commands, key inputs, or both, to obtain information, route an inbound voice call, or both. menu (Menu action) offers the caller the option to connect to an agent (Reqagent action). This IVR menu offers only one option. More complex menus can offer multiple options, each with a different result.
- The contact waits until an agent comes on the line. During the wait, music plays in 30 second intervals (Music and Wait actions).
Events are similar to actions, except that they execute only when a specific trigger occurs. Event triggers include things such as a call being answered, transferred, or put on hold. For example, Onanswer is an event that triggers when a request for interaction is answered, such as a contact answering a live agent's phone call or a live agent answering a contact's chat question.
When an event is triggered, any script execution that may have been happening before the trigger occurred is terminated. The script proceeds from the event action.
The following example script demonstrates the Onanswer event. The script sets up a basic inbound IVR with menu options for Sales, Support, and Technical Support. The Onanswer event is in the bottom left corner of the script. It's not connected to the main part of the script. Instead it's separate, indicating that it's an event action. As soon as an agent answers the interaction, the script jumps to Onanswer and sends a message to the agent. The message is configured in the Messages action.
Location of Studio Actions
Studio actions are found on the Tools tab and the Framework tab. The Framework tab isn't available for all users by default. It's an option that your CXone Account Representative must enable for your tenant High-level organizational grouping used to manage technical support, billing, and global settings for your CXone environment.
The Tools tab contains the most common actions used for scripting. On this tab, actions are organized on a palette that has several default categories, such as standard, system, and speech. On the Tools tab, you can choose to view all actions or have them organized into their categories. You can also choose to sort the actions alphabetically or view them in their default order.
The Framework tab is a complete list of all available actions. Actions on this tab are organized in a tree structure of folders. Each folder is a category. You can expand a folder to see the actions it contains. The Framework tab isn't enabled by default. You can request access to the tab by contacting your CXone Account Representative.
Action Availability and Media Type
Some actions are visible in CXone StudioStudio only if the product or feature they're related to is enabled for your
All actions are visible on the Framework tab at all times, even if the media type is incompatible with the active script. Studio prevents you from adding an action to a script that has an incompatible type.
Palettes and Categories
On the Tools tab, actions are organized with palettes. There's one palette by default, but you can create custom palettes. Palettes allow you to customize the organization of actions in Studio. For example, you could create palettes for different scripts you work on, or you could create a palette for actions you use a lot and another for actions you only use sometimes.
Each palette must have at least one category. Categories allow you to further organize the actions in the palette. The default palette has several categories, such as system, events, web, and Personal Connection. You can choose to view the actions in a palette by category, or you can choose to view all of the actions at once. Additionally, you can sort actions alphabetically or by the default order they were added to the palette.
Most actions have a set of properties that you can configure. Some properties are required, while others are optional. Properties are how you customize the action to do what you need it to in your script.
You can view an action's properties when it's on the script canvas. The properties appear on the Properties
- ToolName—The name of the action. This is a system property and cannot be changed.
- Category—The location of the action on the Framework tab. This is a system property and cannot be changed.
- ActionID—The ID of the action in the script. IDs are assigned in the order actions are added to the script. The ID is a system property and cannot be changed, except by deleting the action from the script and adding it back. If you delete an action from a script, all connectors that link to and from the action are deleted too.
Caption—The label for the action that appears on the script canvas. You can change the caption so that it describes the action's function in the script. This helps scripts be easier to understand and troubleshoot. They are also used in IVR Automated phone menu that allows callers to interact through voice commands, key inputs, or both, to obtain information, route an inbound voice call, or both.reporting.
You may want to use the setting from one of an action's other properties as the caption. For example, you can give a Music action the name of the music file it plays. You can type the information into the Caption field, or you can copy the value of the property and paste it into the Caption field. To do this, click the name label of the property and press CTRL+C, then click the Caption label and press CTRL+V.
Some actions have
You can cut, copy, and paste actions in your scripts. When you add an action by copying and pasting into your script, make sure that you update the actions properties if needed.
Branches and Conditions
The flow of a script is defined by connecting actions to each other. Sometimes an action has only one possible outcome, so it's connected to one other action. When an action has more than one possible outcome, you can create a path for each possibility. These paths are called branches.
Branches allow you to design your script to handle all kinds of different possibilities, such as errors, unexpected key presses, or what to do when a phone call isn't answered. You can also use branches to build choices into your script, such as creating a menu that prompts the contact to choose an option.
Each time you create a branch, you must choose the condition for the branch. The condition defines what has to happen for the script to follow that path. All actions have at least one condition, Default. Some actions have more than one condition available. There are some actions that support custom conditions, which allow you to define what must happen for the script to take that path.
Every action in your script should have a branch that uses the Default condition, even if you're connecting the action's other branches. When an action has more than one path, the Default branch is the one taken when none of the other conditions are met. This is important to keep contacts from getting stuck at that point in the script in the event that something unexpected occurs.
When you connect two actions, you're prompted to select the
It's important to be on the lookout for dead ends in your scripts when an action has multiple branches. Dead ends can happen when branches are missing or not configured properly. For example, a Music action needs to be connected with a Wait action. Wait allows you to specify how long the Music action plays before resetting and repeating. Without Wait, Music plays indefinitely.
Multiple Connections to the Same Action
You can create multiple connections to the same action. This is necessary when there is more than one condition that can result in the script ending up at the target action. Instead of adding a copy of the target action to the script once for each condition, you can create three branches that all end at the same action.
In the following image, you can see an example of a script with three branches that go from the Hours action to the Hangup action. Each branch has a different conditions to address three scenarios where the contact center is closed.
Connectors are lines that connect two actions. The connector's arrow points in the direction of the flow of the script.
The following items are some key facts about connectors:
- Click the connector icon in the lower right corner of the action icon and drag it to the second action. Drop it in the center of the second action.
- When you move an action to a different place on the canvas workspace, the connector moves with the action. It doesn't change shape, but it moves to the nearest side of the stationary action. It the length of the connector changes, too.
You can change the shape of the connector so that all branches are easy to see. This helps make your script more readable and easier to update.
If you need to change the branch that a connector uses, you must delete the connector and add it again.
Delete a connector by clicking on the arrow in the center of the line and pressing the Del key on your keyboard.
Types of Connectors
There are three types of connectors and they each look slightly different on the canvas. Learning to identify them can help you understand a script at a glance. The following example of a script shows the three types.
The types of connectors are:
- Default—This is a connector that uses the Default branch condition. It's a solid black line without a label. In the example image, the connector linking
Begin to Menu and Menu to Playare default connectors.
- Regular—This is a connector that uses any branch condition except Default. It's a dashed grey line with a label. The label matches the condition the branch uses. In the example image, the connector linking
Loop to Menuis a regular connector. Its label is Repeat, which is the name of the branchassigned to the branch.
- Custom—This is a connector that uses a variable branch condition. It's a solid gray line with a label. The label matches the name of the custom condition assigned to the branch. In the example, the connectors linking from Menu to each of the Reqagent actions on the right are custom connectors. Their labels are 1, 2, and 3, which are the names of the
variableconditions assigned to each branch.