MUSIC

Plays a pre-recorded music file while a contact is waiting. You could use this action at the point in a script where the contact has chosen to speak an agent, to handle the scenario where no agent is currently available.

To learn more, see Actions Overview or explore other Studio Actions.

Supported Script Types

Phone

Properties

MusicFile
Allows you to select a pre-recorded music file to be played by the action. Studio includes 19 different music files, in .wavWAVeform audio file; used to store audio bitstreams such as call recordings. format, from which to choose. If you want to play a music file that you have uploaded, you can do so by using the PLAYLOG action instead.
StartOffset
Allows you to configure music to resume from the point at which it was interrupted. For example, you play a music file for 30 seconds, followed by a five second pause. Setting this property to 31 causes music playback to continue from where it stopped instead of starting over at the beginning of the file. The default value for this property is 0, which causes the file to replay from the beginning each time. There is no maximum value, but if you enter a value greater than the length of the music file, the file also resumes play at the beginning each time.
SecondstoPlay
Allows you to set the amount of time the script plays the .wav file. The default value is 0, which causes the file to play in its entirety and then take the OnComplete branch. If no OnComplete branch exists, the script follows the Default branch. The end of the music file will invoke the OnComplete branch even if you enter a value in this field that is greater than the length of the file.
InterruptMessages
Allows you to enter a string expression that periodically interrupts music with one or more short messages in the form of .wav files. Your expression, as shown in the following example, should use this syntax: Name of message file;SecondsToPlay.
Message1.wav;45 Message2.wav;60 Message3.wav;60

While this method works, it can cause issues. For example, if a message is later re-recorded and is longer than the original message, it is possible for one message to begin playing before the previous message has finished. Therefore, the preferred method to play music interrupted by periodic messages is to alternate MUSIC actions with PLAYLOG actions that provide the appropriate messages or prompts.

RepeatIndex
When the list of messages you have set in the InterruptMessages property has finished running, you can use this property to repeat the messages again.
DetectDTMF
Determines whether DTMFDual-Tone Multi-Frequency; DTMF signaling tones are generated when a user presses or taps a key on their telephone keypad. tones are acknowledged while the action is running. The default value is False, which means that DTMF tones are not be acknowledged even if the contact presses a key. If the value is set to True, DTMF tones are acknowledged and trigger the OnDigit branch of the script. 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 voice mail message.
Clear Digits
When a contact presses a key on their telephone keypad, the generated DTMF tone is stored in a buffer. When the ClearDigits property is set to True (the default value), that buffer is cleared when the action begins. Otherwise, the action would immediately detect a DTMF tone and invoke the OnDigit or OnDTMF branch even if the key press was associated with an earlier action.

Branches

Default
Branch 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.
OnComplete
This branch is taken if your selected MusicFile finishes playing.
OnPaused
This branch is not currently used.
OnDigit
This branch is taken if DetectDTMF is set to True and the contact presses a key during the action.

Tips and Tricks

You should never loop a MUSIC action back on itself (that is, connect a MUSIC action to itself with no other action in between).

Phone Script Example Using MUSIC

In this partial script example, music is played while the contact waits for an agent to take the call. After music plays for the period established in the SecondstoPlay property, the WAIT action introduces a pause before the music resumes. The MUSIC action has been renamed, using the Caption property, to indicate the .wav file specified in the MusicFile property (CruisingJazz.wav).

You could alternatively use the PLAYLOG action instead of the WAIT action, as described previously.

Would you like to download this example?