Music

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

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.

All properties of this action accept variable substitution.

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.

MusicFile

Select the audio file from the drop-down. A selection of 20 music files in WAV format are provided. If you want to use a custom music or audio file, use the Playlog action. Variable substitution is commonly used for this property.

This property must be configured. If this field is left empty, it can cause issues on the server.

StartOffset

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.

SecondstoPlay

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.

InterruptMessages

Allows you to have the music periodically interrupted with one or more short messages. For example, you might thank contacts for waiting or remind them about self-service options available on your website.

Enter the name of the message file followed by the number of seconds of the MusicFile to play after the message. If you have different messages that you want to play, include them all. Use the following syntax in this field: <NameOfFile.wav>;<SecondsToPlay>. For example: 

Thanks.wav;20 HelpYourSelf.wav;20 Reminder.wav;20

This method works but has some risks associated with it. For example, if one of the audio files you use is re-recorded and is now longer than it was originally, it's possible that one message will begin to play before the previous one finishes. The preferred method of implementing interrupt messages is to alternate Music actions with Play or Playlog actions that provide the messages or prompts.

You can record your messages using a third-party application and upload it to CXone.

RepeatIndex

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

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.

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.

OnComplete

The path taken when the selected audio file plays from start to finish. This can also happen when SecondsToPlay is set to 0 or if it's set to a value larger than the length of the file.

OnPaused

This branch condition is not currently used.

OnDigit

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?