Play

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

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

Play can use pre-recorded 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 Whisperaction.

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

Properties

Property Details

Sequence

Define the prompt that the action plays. A prompt can be an 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 prompt is TTS, click the ellipsis button and enter the text you want the TTS service to read. Each segment must be enclosed in double quotes and include a prefix 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, see the Prompts page. You can also double-click the action on the canvas to open the Prompt Manager 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.

The default is True, which clears the buffer when the action begins. Any key presses that happened earlier in the script will not be passed into this action. Set the action to False if you want this action to process and act on any DTMF tones that are passed to this action through the buffer. When DTMF tones are passed into this action, the script immediately takes the path for the OnDigit branch condition.

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.

Branches

Branch Details

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.

Comparison of Similar Actions

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

(missing snippet link)

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.

Phone Script Example Using Play

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?