Music

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

The Music action plays a music file for the contact.

Plays a music file for the contact. Music is typically used for hold music when contacts are in a queue or holding scenario. You can select from a default list of music files. This action doesn't support any kind of custom audio file. You can choose how much of the file plays, as well as how many seconds into the file the music starts to play.

The prerecorded music files available through the Music action are licensed tracks created by professional musicians. They are subject to periodic relicensing. Occasionally, the license on a file may not be available for renewal. When this happens,NICE CXone provides a replacement track of a similar genre. Replacement music will work seamlessly in your existing 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.. NICE CXone provides advance notice of changes to music files so you can review the replacement and change your selection.

Dependencies

  • Does not work after the onAnswer event unless it's part of an onHold event.
  • Never connect a Music action to itself to create a loop. If you want the music to repeat, use a Wait action configured with a short pause, such as half a second. Connect Music to Wait and then back to Music.
  • The default files available with Music can be up to five minutes long.

Supported Script Types

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.

All properties of this action accept variable substitution.

Property

Description

Add Caption

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

Music File

Allows you to select a pre-recorded music file to be played by the action. Studio includes 20 different music files, in WAV 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.

You can use a variable for this property.

Start Offset

Allows you to have the selected audio file start playing from a point you specify instead of from the beginning. Enter the number of seconds from the beginning of the file where you want the action to start playing the audio. Variable substitution is commonly used for this property.

For example, if you have a loop of two Music actions and a Wait action, you could have the first Music action play from the beginning of the file. If you the first Music action plays for 30 seconds and you want the second Music action to resume playing at the point where the first one stopped, set StartOffset to 30.

The default value for this property is 0, which causes the file to play 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 action plays the file from the beginning.

Seconds To Play

Allows you to play a portion of the selected audio file. Enter the number of seconds of the file that you want to play.

The default value is 0, which means the music file plays from the beginning to the end. When this happens, the OnComplete branch condition is met and the script takes that path.

There is no maximum value, but if you enter a number greater than the length of the file, the script takes the OnComplete branch path.

The Default branch condition is met when SecondsToPlay is set to anything greater than zero and less than the total length of the file.

Variable substitution is commonly used for this property.

Interrupt Messages

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 Play or Playlog actions that provide the appropriate messages or prompts.

Repeat Index

Set this property to the number of times you want the InterruptMessages to repeat. If you didn't configure an interrupt message, you can omit this property.

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. When enabled, the action to processes and acts on DTMF tones. The action doesn't capture the tones. When disabled, the action ignores DTMF tones even if the contact presses a key on their phone.

For example, you might play an interrupt message while the contact is on hold that says "An agent will be with you shortly. If you would rather leave a voicemail so we can call you back, press the star key." DetectDTMF would need to be set to On so the action could process the contact's key press.

In Value Mode: Click to No disable this option. Click to On to enable the action to detect and respond to DTMF tones.

In Expression Mode: Enter false to disable this option. Leave set to true to enable the action to detect and respond to DTMF tones.

When this property is enabled and a contact presses a key, it triggers the Digit branch.

You can use variable substitution in this property. To do that, set this property to Expression mode A set of open and closed parentheses with an x in between., then enter the variable in the field. Enclose the variable in curly braces ( { } ).

Clear Digits

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 Digit branch condition.

In Value Mode: Click to No disable this option. Leave set to Yes to clear the DTMF buffer.

In Expression Mode: Enter false to disable this option. Leave set to true to clear the DTMF buffer.

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.

For Music, this branch is also taken when SecondsToPlay is set to anything greater than zero and less than the total length of the selected MusicFile.

Complete Path taken when the recording is played to completion.
Paused

This branch condition is not currently used.

Digit

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

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.

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?