Play

The Play Rule will play a message to the person who is calling.

Structure

We will have one element which is called messageParts which will be common to many rules.

<play id="play_1" label="Say Welcome">
    <!-- messageParts -->
</play>

Learn more about the messageParts.

The Play Rule has no attributes so let's get busy with the following examples.

Examples

We will make some examples to let you know how the Rule works and see all the possibilities you have with this Rule.

Basic Play Rule

In the first example below we are just playing back a sound file named "Welcome". The XML is described below

<play id="play_1" label="Say Welcome">
    <soundFile soundLabel="Welcome"/>
</play>

Play Rule with multiple Sounds

Inside the play rule you can specify multiple Sound Files to be played back concurrently. This way you can make sentences with different Sound Files you have uploaded in our system. For example:

<play id="play_1" label="Say Welcome">
    <soundFile soundLabel="Hello"/>
    <soundFile soundLabel="Bob"/>
    <soundFile soundLabel="How Are you?"/>
</play>

In addition to the above it is also possible to make some, or all, of the Sound Files dynamic. In this way you can have different values dependent upon the Link to which the template is assigned. An Example below:

<play id="play_1" label="Say Welcome">
    <soundFile soundLabel="Welcome"/>
    <soundFile soundLabel="?" soundGroup="names"/>
    <soundFile soundLabel="Tell me a secret."/>
</play>

Result

Error Result

HTTP CodeError StringResolution
400
Rule ID Empty 
Set the value of the id attribute
400
Rule Label Empty 
Set the value of the label attribute
400Rule ID Not Unique in Play RuleThe value of the id attribute is used for an other rule. This must be unique in the Call Flow
400Sound File Does not exist in Play RuleCorrect the Sound Label or the Sound Group for that file so that it matches an existing Sound File in the account