Prompts

A prompt is a message that plays for the contact. Prompts can ask the contact to input information or simply convey information without asking for input. Prompts can be played by auto-attendants, interactive voice response (IVRClosed 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.) systems, and other voice processing tools. For example, when you call a business and hear a menu with options to "press 1 for Sales or 2 for Support," you are hearing a prompt.

Prompts are built into Studio scripts. To use them, you must use an action that supports prompts. Any action with a Sequence property supports prompts. This includes actions such as Play or Whisper, as well as ASRClosed Allows contacts to respond to recorded voice prompts by speaking, pressing keys on their phone, or a combination of both.-related action such as ASR or ASRMENU.

In CXone, prompts can be prerecorded audio files or text that's read by a text-to-speech (TTSClosed Allows users to enter recorded prompts as text and use a computer-generated voice to speak the content.) service. You have some options to create either type of prompt: 

  • To use prerecorded audio prompts, you can use a third-party recording application and upload the files to CXone. You can also use the recording feature built into the Prompt Manager tool. When you use audio files as prompts, you must configure the Studio action in the script to use the audio file.
  • For TTS prompts, you can use the Prompt Manager tool. The Prompt Manager provides an interface you can use to design the prompt. You don't need to configure the action to use a TTS prompt, because the Prompt Manager adds the prompt automatically.

All actions that support prompts have a Sequence property. This property holds the formatted commands the script uses when it plays the prompt. Instead of using the Prompt Manager to configure the action with the contents of the prompt, you can type the prompt directly into the Sequence property. If you use this option, you must format the prompt text properly.

If you use CXoneCloud TTS Service, you need to use the TTSVOICEaction in your scripts. You cannot create prompts for Cloud TTS using the Prompt Manager.

Studio Actions that Use Prompts

In CXone StudioStudio , the following actions allow you to use prompts:

  • Music—Plays a music file that only the contact can hear. You can choose from a list of provided music files. You can specify a specific starting and stopping point in the file. Doesn't support playing custom audio files.
  • Play—Plays custom audio (WAV) files or text-to-speech (TTSClosed Allows users to enter recorded prompts as text and use a computer-generated voice to speak the content.) prompts. The entire file is played. Only the contact can hear the audio.
  • Playlog—Plays custom audio (WAV) files that only the contact can hear. It allows you to select a specific starting and stopping point. Cannot play the music files that are built in to other actions, such as Music.
  • Reqagent—Plays custom audio (WAV) files or text-to-speech prompt that only the agent hears. The prompt plays before the agent and the contact are linked, so the prompt doesn't cause the contact to hear silence.
  • Whisper —Plays custom WAV files or text-to-speech prompts. You can set it to be audible by the contact only, the agent only, or both. The prompt plays after the agent and the contact are linked, so if the action plays for only the agent or the contact, the other party hears silence for the duration of the prompt.
  • Ziptone—Plays a tone for the agent after the contact and the agent are linked. The Reqagent action has a Ziptone property that plays a tone for the agent before the contact and agent are linked.

Additionally, the ASRClosed Allows contacts to respond to recorded voice prompts by speaking, pressing keys on their phone, or a combination of both.-related actions such as Asrmenu also allow you to include prompts.

Many of these actions support the Prompt Manager. When one of these actions is on the canvas, you can double-click the action to open the Prompt Manager. Use the options in this window to design the prompt that you want the selected instance of the action to play.

Some actions, such as Reqagent, have a Sequence property but aren't connected to the Prompt Manager. For these actions, you can add a Play action to your script as a way to access the Prompt Manager. You can create the prompt and copy it from the Sequence property. Then you can paste it into the Sequence property of the other action and delete the Play action from your script.

The TTSVOICE action allows you to use TTSClosed Allows users to enter recorded prompts as text and use a computer-generated voice to speak the content.. However, instead of using a sequence defined in a Sequence property, TTSVOICE connects your script with a third-party TTS provider. The text for the TTS prompt must come from other sources when using this action.

Audio File Requirements

Audio files used as prompts in CXone StudioStudio scripts must be uncompressed WAV files that meet the following specifications.

  • Bit rate: 64 kbps
  • Audio sample size: 8 bit
  • Channels: 1 (mono)
  • Audio sample rate: 8 kHz
  • Audio format: CCITT μ-Law

Text-to-Speech Voices and Languages

Text-to-speech (TTSClosed Allows users to enter recorded prompts as text and use a computer-generated voice to speak the content.) uses a synthesized voice to speak text. In CXone, you can use TTS to create prompts. When you want to use TTS in a script, you need to include a Voiceparams action in the script. This action lets you specify the voice and language that speaks the prompt. You don't need to include this action if you're using recorded audio prompts or if you're using the TTSVOICE action.

The information in this section does not apply to TTS provided by CXone CXone Cloud TTS Service. Cloud TTS allows you to use third-party TTS providers with CXone.

Prompt Manager

The Prompt Manager allows you to create audio and TTSClosed Allows users to enter recorded prompts as text and use a computer-generated voice to speak the content. prompts for your script to play for customers. You can access the Prompt Manager by double-clicking on an action that supports prompts. These actions include Menu, Play, and Whisper, as well as ASRClosed Allows contacts to respond to recorded voice prompts by speaking, pressing keys on their phone, or a combination of both.-related actions, such as Asrmenu.

You can use the Prompt Manager to: 

Formatting for Prompts in the Sequence Property

Sequence is a property in actions that support prompts, such as Menu or Play. It holds the information that the script uses to play a prompt or message to the contact. If you create the prompt using the Prompt Manager, the content of this property is already formatted correctly. If you enter the prompt directly into a Sequence property, you must apply the proper formatting manually.

Sequences

A sequence is a segment of a complete prompt. A prompt may be made up of only one sequence or it may have several sequences. Multiple sequences are required when your prompt includes more than one type of input. For example, if you include text and an audio file, the text and the file are each one sequence.

When typing out a prompt in Sequence, it's important to format each sequence properly. The formatting lets the script know what kind of information the sequence contains. Without the information, the script cannot tell the difference between an audio file and text that you want to be read by the TTSClosed Allows users to enter recorded prompts as text and use a computer-generated voice to speak the content. service. If you have text that must be read a certain way, such as money or dates, you can use special sequence formatting to define this need.

Each sequence is enclosed in a set of double quotes. Some sequences must also include a string reference character that lets the script know how to read the text in the sequence. The following sections contain more specific information about formatting sequences.

Audio Prompt File Names

For audio prompts, the Sequence property holds the name of the audio file. Format it by enclosing the name in double quotes. For example:  "greeting.wav". If you don't enclose the file name in double quotes, the script may not recognize it as a file name. 

For example, if a prompt audio file is called main greeting.wav, the script interprets main as text for the TTSClosed Allows users to enter recorded prompts as text and use a computer-generated voice to speak the content. service to read and looks for an audio file called greeting.wav. If greeting.wav exists, it plays that file. If greeting.wav doesn't exist, it results in an error. Enclosing the file name in double quotes avoids this situation.

Formatting for TTS Text

For text-to-speech (TTSClosed Allows users to enter recorded prompts as text and use a computer-generated voice to speak the content.) prompts, the Sequence property holds the text you want the TTS service to speak. You can click the ellipsis icon in the field to open the Script Editor window for more space to work. Format your prompt following these guidelines: 

  • Enclose the text in double quotes.

    "%Press 1 for account information. Press 2 for order status. Press 3 for billing. Or stay on the line to speak to an operator."
  • Use a string reference character to identify the type of text each sequence contains. There are string reference characters to identify ordinary text or text that you want spelled out. There are also characters to identify dates, numbers, money, and time. See the table in the section about using numbers, money, time, and so on in prompts.

  • If your prompt contains text that requires different string reference characters, the text defined by each reference character must be in a separate sequence. Each sequence must be enclosed in a set of double quotes. The Sequence property can hold many separate sequences. For example:

    "%Thank you for calling. Unfortunately we're currently closed. Our office hours are Monday through Friday" "!8 AM" "%through" "!5 PM" "%. Please call back."
  • You can include variables in a sequence. Enclose the variables in curly braces. If the variable holds a value that requires a different string reference character, use double quotes to define each sequence appropriately. For example: 

    "%As of" "@{today}" "%your account balance is" "${accountBal}." 
  • You can combine audio files and TTS text in one prompt. For example, you can use an empty audio file to add a longer pause between sentences. If you do this, edit the file so that it is the exact length of the pause you want.The audio file you include must be the exact length of the pause you want to add. Use the Prompt Manager in the legacy CXone Studio application or a third-party audio file editor to modify the file.
  • Sequences can be added to the Sequence property horizontally, as shown in the previous examples in this section, or vertically, like this:

    "%As of" 
    "@{today}"
    "%your account balance is"
    "${accountBal}."
  • Each sequence in the Sequence property has a limit of 300 characters. You can add additional sequences in the property field if the text you need to play is longer than that amount. For example, "%This is sequence one." "%This is sequence two."

At any time, you can open the Prompt Manager and continue to work on your TTS promptwork on your TTS prompt.

Numbers, Money, Dates, Time, and Letters in Prompts

Text-to-speech reads the text you provide literally. It doesn't recognize situations when you might want text read a certain way. For example, if you enter a date as 01/31/2022, you want it read as "January 31, 2022" not as "zero one slash thirty-one slash two thousand twenty-two."

Studio supports formatting to identify text you want the TTS service to read a certain way. The formatting consists of a string reference character added to the beginning of each sequence. There's a different character for each type of content, such as numbers or dates. For example, to have 01/31/2022 read as "January 31, 2022," prefix the text with the @ symbol and enclose it in quotes, like this: "@01/31/2022".

The following table shows the accepted formats and string reference characters Studio supports. It also provides examples that show how the TTS service reads each one. Use this formatting when adding prompts directly to the Sequence property or to the Synthesize Text field in the Prompt Manager.

Sequence Type Formatting Details
Audio File (WAV)

String reference character: N/A

Supported format: "filename.wav"

Example: "greeting5.wav"

Date String reference character: @

Supported formats:
mm-dd-yyyy
mm/dd/yyyy
Day of Week, Day Month
Day of Week, Month Day
Examples and how they're read:
"@1-23-2006": Monday January twenty third two thousand six
"@1/23/2006": Monday January twenty third two thousand six
"@Tuesday, 10 May": Tuesday tenth of May
"@Tuesday, May 10": Tuesday May tenth

Note: Date formats differ by language and country. Use the format that your contacts will recognize and understand.

Letters (Spelled Out) String reference character: none

Example: "2 May 2022 12:00:00 AM"
Read as: two M A Y two slash two zero two two one two colon zero zero colon zero zero A M

You can also have text spelled out by using a <spell> </spell> tag in a text entry. For example: 

"%I have your name as <spell>{Name}</spell>. If this is correct, press 1, otherwise press 2"

Money

String reference character: $

Example: "$3.50"
Read as: Three dollars and fifty cents

Numbers String reference character: #

Example: "#42"
Read as: Forty two

Time String reference character: !Supported formats:
hh:mm
hh:mm:ss

Examples and how they're read:
"!12:34 PM": Twelve thirty-four PM
"!12:45:15 PM": Twelve forty-five and fifteen seconds PM

Text String reference character: %

Example: "%Wednesday, April 27, 2022"
Read as: Wednesday April twenty-seven two thousand twenty-two

Variables

If you want to include a variable in a prompt, you must format it appropriately.

String reference character: Use the one appropriate to the type of information the variable holds.

If you include a variable in a sequence that contains other characters, you only need one string reference character at the start of the sequence. If the variable and the other characters are different types of information, such as money and text, create separate sequences. For example: 

"%I have your name as {firstName} {lastName}. Is this correct?"

"%Your account balance is:"
"$150.17"

Supported format: Enclose in double quotes and include the curly braces
Examples:
"@{today}"
"%{firstName}"
"!{time}"

Variables in Prompts

You can use variables in prompts. Ensure that the script is designed to pass the information you want to populate the variable with. If you're passing a date, time, number, or text that you want spelled out (such as to verify the spelling of a name), it needs to be formatted so that the TTSClosed Allows users to enter recorded prompts as text and use a computer-generated voice to speak the content. service reads it correctly.

You can include variables no matter which method you use to create the prompt: 

  • If you're using the Prompt Manager, click the button for the type of information the variable holds, such as Play Number or Play a Date. Add the variable to the Sequence Value field. The Prompt Manager adds the formatting to the variable.

  • If you're using the Sequence property of an action that supports prompts, enter the variable according to the format described in the table in the Formatting for Numbers, Money, Dates, Time, and Letters section. For example: "@{date}".

Beowulf, the Studio scripter at Classics, Inc, uses variables to select a language-specific version of a prerecorded audio prompt, to specify the path to the audio file, and to supply contact-specific data. He sets the following variables in a Snippet action: 


ASSIGN env = "PROD"
ASSIGN lang = "ENG"
ASSIGN promptPath = "Prompts\{env}\"
ASSIGN accountBalance = "$52.65"

Then he creates the following prompt in the Play action:


"{promptPath}YourAccountBalanceIs_{lang}.wav" "%{accountBalance}" "{promptPath}ToPayYourBillPress_{lang}.wav"