Play

This help page is for Desktop Studio. This information is also available for CXone Studio.

Plays one or more audio files as part of the interaction.

Play can use prerecorded audio files, text-to-speech (TTSClosed Allows users to enter recorded prompts as text and use a computer-generated voice to speak the content.), or a combination of both. The agent cannot hear what is played through this action. It only plays the audio for the contact. If you want the agent and contact to be able to hear the audio, use the Whisper action.

A common use case for this action is to play messages for the caller. For example, "Thank you for calling Classics, Incorporated" or "Your call may be recorded for quality assurance."

You can also use a Play action to deliver information to the caller by incorporating variables into the action sequence. For example, by bringing in data from a CRMClosed Third-party systems that manage such things as contacts, sales information, support details, and case histories. or order management system, you could use a Play action to construct an order update message such as "Your recent order of {numberOfItems} items, totaling {orderTotal}, was shipped on {shipDate]."

Dependencies

  • Play does not work after onAnswer unless the onHold event has fired.
  • You cannot choose a starting position or play time. Play starts the audio file from the beginning every time. It also plays the entire file or sequence unless DetectDTMF is enabled and the contact enters a DTMFClosed Signaling tones that are generated when a user presses or taps a key on their telephone keypad. tone.
  • 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."

  • For TTS prompts, a Voiceparams action is required if you want to specify the voice and language that the TTS services uses.
  • Audio files must be uncompressed WAV files with the following properties:

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

Supported Script Types

The icon for the Phone script type - an old-style phone handset with curved lines indicating sound coming out of it.

Phone

Comparison of Similar Actions

The following actions have similar functions, but with some key differences: 

  • 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.

Input Properties

These properties define data that the action uses when executing.

Property

Description

Caption

Enter a short phrase that uniquely identifies this action in the script. The caption appears on the script canvas under the action icon. The default is the action name.

Sequence

Define the prompt that the action plays. A prompt can be a prerecorded WAV audio file or text-to-speechClosed Allows users to enter recorded prompts as text and use a computer-generated voice to speak the content. (TTS).

If the prompt is an audio file, enter the file name enclosed in double quotes. For example, "greeting.wav". If the audio file is located in a different folder, include the path to the file. For example, if the script is in the root folder and the audio file is in a subfolder two levels down, enter "Subfolder\Subfolder2\Audio-file.wav". If the script is in a subfolder one level down from the root and the audio file is in a different subfolder on the same level, enter "\..\Subfolder\Audio-file.wav".

If the prompt is text-to-speech, enter the text you want the TTSClosed Allows users to enter recorded prompts as text and use a computer-generated voice to speak the content. service to read. Each segment must be enclosed in double quotes and include a string reference character to identify the type of information it is. For example: 

"%Your account balance is" "silence.wav"  "${accountBalance}"

For more information about formatting prompts in this property, including the string reference prefix characters to use, see the Prompts page. You can also double-click the action on the canvas to open the sequence editor to create your prompt.

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."

Phrase

Use this property to document the text that the prompt contains. The script doesn't use the text in this property. Because some prompts can be complex and contain multiple segments, it can be helpful to include the full text written without the formatting required by the Sequence property.

ClearDigits

When a contact presses keys on their phone, a DTMF tone is generated and stored in a buffer. ClearDigits allows you to determine how this action handles DTMFClosed Signaling tones that are generated when a user presses or taps a key on their telephone keypad. tones that are in the buffer when the action starts.

When enabled, this option clears the buffer when the action begins. Any key presses that happened earlier in the script will not be passed into this action. If you disable this option, the action processes and acts on any DTMF tones passed to the action through the buffer. Set to True to enable or False to disable. When DTMF tones are passed into this action, the script immediately takes the path for the OnDigit branch condition.

Set to True to enable this option or False to disable it.

DetectDTMF

Determines whether DTMFClosed Signaling tones that are generated when a user presses or taps a key on their telephone keypad. tones are processed while the action is running. The default value is True, which means that DTMF tones are processed if the contact presses a key and the OnDigit branch of the script is triggered. If the value is set to False, DTMF tones are not processed even if the contact presses a key. For example, you might play a message at the point a contact is placed in queue which says, "An agent will be with you shortly. To leave the queue at any time, press the star key". The OnDigit branch might then offer the contact the option to leave a voicemail message.

This property does not capture DTMF tones. If you need to evaluate an entered tone, use a Captureaction after this action to assign the tone to a variable. You can then evaluate the variable's value to determine which tone was entered.

Variable substitution is commonly used for this property.

Result Branch Conditions

Result branch conditions allow you to create branches in your script to handle different outcomes when an action executes.

Condition

Description

Default

The path taken unless the script meets a condition that requires it to take one of the other branches. It is also taken if the other branches are not defined.

OnDigit

The path taken when DetectDTMF is set to True and the contact presses a key on their phone during the action.

Tips & Tricks

  • The contact center agent cannot hear the audio from the Play action. If you want the audio to be played to both the caller and the agent, use the Whisper action.
  • Use the Phrase field to add an annotation or summary of the prompt's text.

Script Example

This is an example to show how this action can be used in scripts. It is not intended to be a complete script. Additional scripting may be required.

Play can be used in many different ways. In this example, the Hours of Operation profile determines whether the company is open, closed, or on holiday. If closed, one message will play. If on holiday, another message will play. If open, an agent will be requested.

Would you like to download this script?