You have likely seen shortcode messages all over TV shows, commercials, print ads, and even in movie theater advertising. Shows like American Idol now use shortcode messages to vote for your favorite performer. Other companies use it for automated replies or to signup for on-going contests and sweepstakes. The real power is being able to capture a user’s phone number and be able to do marketing and advertising back to the customer or to provide an improved customer service experience. Here at Vitelity we use a variation of this for customer service (see article).
Vitelity offers two different methods for responding to SMS shortcode messages:

  • Auto Response
    Simply responds with a pre-selected block of text. Good for replying with basic information such as store hours and contact information
  • HTTP Forwarding
    This method takes the message along with the caller’s phone number, shortcode, and shortcode message (keyword) and will do an HTTP post to a URL that you select.

Auto Response

Even though Auto Response doesn’t save any data for you, it is a simple way of using shortcode messaging for certain applications. To see an example of an Auto Response, text Vitelity to 99629. In response you will get a canned message about Vitelity and a link to the Vitelity website.

HTTP Forwarding

HTTP forwarding offers the ability to capture and save user information for future use. You will need some programming ability to create code on your own server to process the messages. To see an example of an HTTP forwarded response, text Contest to 99629. In response you will get a reply containing the different fields that can be captured by your script.

Setting Up ShortCode Messaging Services

To setup shortcode messaging, log into your portal and go to the SMS tab. From here you can manage your shortcode keywords.

Setting Up Auto Response

To setup an auto response message you need to create the keyword. Once you have the keyword created click on the link to manage existing keywords and select the keyword to modify.
Enter the text for the auto response message and then click on the OK button. Updates happen immediately so as soon as you finish saving your changes the keyword is active and ready to reply.

Setting Up HTTP Forwarding

There are two sides to setting up HTTP Forwarding. First you have to set the HTTP Forward URL in the SMS configuration. Secondly you will need a script on your own server to process the requests. When the message is sent to your server it is sent as an HTTP POST message with the following fields:
number – DID number that sent the text message to your keyword
message – Message that user sent
shortcode – Shortcode message was sent to
If you would like to send a reply back to the user, whatever response is delivered by your HTTP server can be sent back to the user if it is wrapped in tags. The following is a block of PHP code that will simply echo back the variables that were sent in:

$sms_msg = <<<SMS
SMS Results
Sender Number: {$_POST["number"]}
ShortCode: {$_POST["shortcode"]}
Message: {$_POST["message"]}
echo $sms_msg;

autoreply-250x128” alt=”autoreply-250×128″ width=”250″ height=”128″ class=”alignright size-full wp-image-500″>
The response will look like the example shown here. By taking the form fields you could easily save the data to a database and use that to send the caller additional content later on.
We hope that this has given you an insight into how to use our shortcode messaging service. If you do something really interesting with us, please let us know.