Develop a Basic Script
Required permissions: Scripts Create/Edit
To share ideas and collaborate with other scripters, you can visit the NICE CXone Community site. Contact your CXone Account Representative if you do not have access to the Community.
This page is designed to lead beginning Studio users through the basic workflow of scripting by creating a simple script. This script could be used by a small business as their main phone script that handles phone calls. The script will first verify that at least 1 agent is available to handle the call. Second, present a menu to the caller. Third, request an agent to handle the caller after their menu selection is made. And last, play on-hold music until the agent answers the call. The following script that you will create is quite simple, however, Studio offers many other features for you to customize your scripts, including hundreds of actions, custom audio files, automatic speech recognition (ASR), and more.
- Open a new Phone script (File > New > Phone > OK) in Studio.
- Drag and drop the following actions from the Tools tab onto the main canvas area: Begin, Countagents, If, Play, Hangup, Menu, Reqagent, Music, and Wait. You can search for each action in the Filter of this tab.
- Arrange the actions to match the following image:
View image
If you cannot view the following image, move to the next step which contains the sequence in which the actions must be placed.
- Connect the actions to match the previous image or according to the instructions listed in the drop-down below. To connect 2 actions, hover over the bottom-right corner of the action icon until you see an arrow, then click and hold while you drag the arrow to the next action and release. When connecting these actions on your canvas, select Default in the PickBranch window unless otherwise specified in the sequence instructions below, or shown in the previous image.
View sequence of connecting actions
- Begin > Countagents
- Countagents > If
- If > Play (select False in the PickBranch window)
- Play > Hangup
- If > Menu (select True in the Pickbranch window)
- Menu > Reqagent (in the PickBranch window, click the + icon to add a new Variable Branch Condition, then enter 1 and press OK)
- Reqagent > Music
- Music > Wait
- Wait > Music
Read a more in-depth explanation for the sequence (or "call flow") of these actions:
Every script starts with a Begin action. You can edit the title of an individual action that appears below the icon (right-click the action and edit the Caption), therefore some scripts might begin with a Begin action with a custom title, such as Inbound Sales or Outbound Sales. Next, the Countagents action counts how many agents are available. The If action either sends the caller to an automated message or a menu, depending on if an agent is available or not. Since this is a basic script, the menu only offers one option to the caller (to select 1 on their keypad); you can add many different menu options by adding variable branch conditions in the PickBranch window, which appears when you connect 2 actions. After the caller makes their menu selection, the Reqagent action sends the caller to an available agent. If an agent is not yet available, the Music and Wait actions play and repeat an audio file of on-hold music until an agent answers the call.
-
Configure the If action to determine whether or not agents are logged in to handle the call:
- Right-click the If action to open the Properties window (you can also select the action and open the Properties tab).
- Edit the Expression field by highlighting and deleting the default value, then entering AVAIL>0.
- Click outside of the Properties window to close the window.
Now this action will send the caller to the menu or to the automated message (which we will configure in the next step).
-
Configure the automated message in the Play action:
- Double-click the Play action to open the Play Properties window.
- Click the Synthesize Text button.
- In the Sequence Value field, type the message that you want callers to hear when no agents are available. For example, you could type: We are currently experiencing technical difficulties, please try again later. Another possibility is to use this sequence of actions as your after hours message when your organization does not have any agents online to handle the call. For that scenario, you could type: We are currently closed. Please try again tomorrow morning at 8:00 AM.
- Copy/paste the text from the Sequence Value field to the Phrase field.
- Click OK.
This action offers many other options of creating a prompt to play. This step used a simple text-to-speech method.
-
Configure the audio prompt to play in the Menu action:
- Double-click the Menu action to open the Play Properties window.
- Click the Synthesize Text button.
- In the Sequence Value field, type the message that you want callers to hear when no agents are available. For example, you could type: Press 1 to speak with a representative.
- Copy/paste the text from the Sequence Value field to the Phrase field.
- Click OK.
This action offers many other options of creating a prompt to play. This step used a simple text-to-speech method.
-
Select the on-hold music to play in the Music action:
- Right-click the Music action to open the Play Properties window.
- Select the MusicFile field.
- Click the drop-down carrot and select your desired WAV file that contains on-hold music. These files are pre-existing music files that NICE CXone provides to you. If you want to hear the music that you selected, you can do so when performing a test call to the script.
- Save and name the script (File > Save).
- You can test your script. See the testing and debugging section for more information.