Basic Outbound Alert Campaign

 

The simplest outbound campaign is one that calls a number and plays a single message.  Below is an example of a basic announcement style campaign:

 

Figure 1: Campaign with a single message

 

 

To send this campaign with the API, first you will need to look up the campaign's menuid.  The menuid is a unique identifier for a campaign and is assigned to a campaign when it is initially created.  To look up the menuid, do the following:  

 

Figure 2: Looking up a campaign's menuid

 

 

Next, post the following XML to VoiceShot, substituting your values for menuid and number:

 

<campaign menuid="1-1234" action="0">

   <phonenumbers>

      <phonenumber number="8185550100" />

   </phonenumbers>

</campaign>

 

Upon successful submission to VoiceShot, you will receive the response:

 

<?xml version="1.0" ?> 

<campaign errorid="0" comment="ok" /> 

 

 

Your phone will then ring (say "Hello") and the MyMessage.wav sound file will play.  Note, there are many more attributes you can include with the phonenumber element.  Learn more.

 

Now, look at a few simple enhancements we can make to the XML above.  For example, suppose you want to send this announcement to multiple phone numbers:

 

<campaign menuid="1-1234" action="0">

   <phonenumbers>

      <phonenumber number="8185550100" />

      <phonenumber number="8185550117" />

      <phonenumber number="8185550152" />

   </phonenumbers>

</campaign>

 

You could also play a different sound file from your VoiceShot account, rather than MyMessage.wav:

 

<campaign menuid="1-1234" action="0">

   <prompts>

      <prompt promptid="1" filename="announcement2.wav" />

   </prompts>

   <phonenumbers>

      <phonenumber number="8185550100" />

      <phonenumber number="8185550117" />

      <phonenumber number="8185550152" />

   </phonenumbers>

</campaign>

 

The attribute promptid tells the system where in your campaign to play the sound file.  Since this is a very simple campaign, it has only one prompt who's promptid is 1 (the first prompt is always promptid 1).  To look up promptids, do the following:

 

Figure 3: Looking up Prompt Id

 

With a slight change, the example above can send a text to speech message rather than MyMessage.wav:

 

<campaign menuid="1-1234" action="0">

   <prompts>

      <prompt promptid="1" tts="This is a test message." />

   </prompts>

   <phonenumbers>

      <phonenumber number="8185550100" />

      <phonenumber number="8185550117" />

      <phonenumber number="8185550152" />

   </phonenumbers>

</campaign>

 

In the previous two examples, the sample campaign has acted as a template for the calls, with specifics such as the message played and the phone numbers dialed coming from the API interface.  Using this technique, a single campaign can be used for many different purposes.