Prompts

The information on this help page applies to both CXone Studio and Desktop Studio.

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. They can also 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're hearing a prompt.

Prompts are built into Studio scripts. To use them, you must use an action that 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.

If you use CXoneCloud TTS Hub, you need to use the TTSVOICEaction in your scripts. In CXone Studio, it's the cloud TTSaction. You cannot create prompts for Cloud TTS Hub using the sequence editor.

Ways to Create Prompts

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.

To create prerecorded audio files to use in prompts: 

To create text-to-speech prompts to be read by the built-in CXone TTS service: 

  • Use the sequence editor tool. You can access this tool from any action that supports prompts. The sequence editor provides an interface you can use to design the prompt.
  • Create the prompt directly in the Sequence property of any action that supports prompts in Desktop Studio or CXone Studio.

To create prompts to be read by a third-party TTS service, use CXoneCloud TTS Hub.

Sequences

A prompt consists of one or more segments called sequences. Sequence defines the parts of a prompt. Some prompts might have only one sequence, but others could have several. Multiple sequences are necessary when:

  • The length of the text for the prompt is longer than 300 characters. Each sequence has a limit of 300 characters. You can add additional sequences if the text you need to play is longer than that amount. For example, if you need to play text that's 540 characters long, you can add two Text to Speech sequences with the text split between them.
  • The prompt contains dates, time, money, numbers, or text that you want to be spelled out letter by letter. These special types of content require their own sequences. The special sequences include identifiers so the TTS service knows how to read them correctly.
  • The prompt includes a combination of TTS and prerecorded audio files.
  • You want to split the prompt up to make it easier to read in the Sequence Editor or the Sequence field.

You can add sequences in the Sequence Editor or directly in the Sequence property field of actions that support prompts.

Sequence Editor

The sequence editor 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.

In Desktop Studio, double-click an action that supports prompts to open the sequence editor. In CXone Studio, click the Open Editor button in the properties of an action that supports prompts. This includes actions such as 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 like Asrmenu. The following images show the sequence editor in Desktop Studio and CXone Studio.

You can use the sequence editor 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 prompt's sequence definition. The script uses the sequence definition to play the prompt for the contact.

Sequences must be formatted properly. The formatting lets the script know what kind of information the sequence contains. If you create the prompt using the Sequence Editor, the content of the Sequence property is already formatted correctly. If you enter the prompt directly into a Sequence property, you must apply the formatting manually.

Each sequence must be enclosed in double quotes. Some kinds of sequences must also include a special character that lets the script know how to read the text in the sequence. The following sections contain detailed information about formatting sequences.

Audio Prompt File Names

For audio prompts, the Sequence property holds the name of the audio file to be played. 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. If the file name includes a space, it could result in unexpected prompt behavior.

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 and following best practices for file names 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. 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. Examples are included in the table. If no string reference character is included, the TTS service reads the text using default pronunciations.

  • If your prompt contains text that requires multiple 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. Currently, you cannot edit prompts in CXone Studio.
  • In Desktop Studio, sequences can be added to the Sequence property horizontally, as shown in the previous examples in this section, or vertically, as shown in the following example. The orientation doesn't impact how the prompt is read. To add a sequence vertically, click the ellipsis A set of three dots in a horizontal row. next to the Sequence property to open a small field editor window.

    "%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 sequence editor and continue to work on your TTS prompts (in Desktop Studio or CXone Studio.

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

Text-to-speech reads the text you provide literally. It doesn't recognize situations where text could have alternate ways of being read. 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 uses special formatting so you can 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 sequenceClosed A segment of an audio prompt played for the contact.. 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 Sequence Editor.

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:04:00 AM"
Read as: two M A Y two zero two two one two colon zero four colon zero zero A M

You can also have text spelled out by using a <spell> </spell> tag in a text sequence. 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 sequence editor, click the button for the type of information the variable holds, such as  Play Numbers or Play a Date (in CXone Studio, Play or Date). Add the variable to the Sequence Value field (in CXone Studio, Play Order Sequence). You can include other text with the variable, as long as it's the same type of information.

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

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 a Play action placed after the Snippet:

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

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. 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 in Desktop Studio or the Cloud TTSaction in CXone Studio.

The information in this section does not apply to TTS provided by CXoneCloud TTS Hub. To learn about supported languages, refer to the documentation of the provider you use with Cloud TTS Hub.

Studio Actions that Use Prompts

In Studio, the following actions allow you to use prompts:

  • MENUMENU : Plays a prompt or a pre-recorded audio file for the contact and creates a menu of options for them to choose from.
  • PlayPlay : 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.
  • PlaylogPlaylog: 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.
  • ReqagentReqagent: 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.
  • WhisperWhisper: 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.

Additionally, the ASR-related actions such as Asrmenu also allow you to include prompts.

Many of these actions support the Sequence editor. Some actions, such as Reqagent, have a Sequence property but aren't connected to the Sequence editor. For these actions, you can add a Play action to your script as a way to access the Sequence editor. 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 TTSVOICEaction(Cloud TTS in CXone Studio) allows you to add TTSClosed Allows users to enter recorded prompts as text and use a computer-generated voice to speak the content. to your scripts. However, this action is used with CXoneCloud TTS Hub. Cloud TTS Hub allows you to use third-party TTS providers. This action doesn't use the Sequence editor, so the text for the TTS prompt must come from other sources when using TTSVOICE.

Audio File Requirements

Audio files used as prompts in Studio 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