Introduction
Adding SMS as a communication method to a system is often very useful, for instance you don’t have issues with spam filtering, it doesn’t require the person to make an immediate response like a phone call, so it’s great for alerts and triggers.
Another good application for SMS (text messaging) which is often over looked is the ability to use it as a method to update a system or retrieve information without needing any equipment other than a mobile phone, any one would work. This is done using a short code.
Consider this example:
You own a fictitious “temporary employment agency” with several hundred people on your books. Your client has asked you to fulfill a specific job such as a receptionist. You send an SMS:
Receptionist cover required for 2 weeks 4 hr per day @ £10 per hr, location Bristol. Reply with “more 4567a” for more info.
The last bit (more 4567a) is the information that allows us to automate things, the keyword more is used to identify you, and the code would be a reference to the job. The potential candidate could then reply where by (in this case) you could :
- Send more details from the job description
- Update the database that this person is a likely candidate
- The person has expressed interest in the receptionist job, we could make an assumption that they maybe interested in other receptionist jobs so you could start creating groups that could be used for later targeting.
Implementation
So how do we set up the SMS gateway and send messages? Fortunately it’s easy.
First you need an account (it’s free) and automated. You’ll get the user name and password you need plus you get some free sends. You will also need to ask for the API URL.
Next use the out bound API (sometimes called an SMS gateway) for your message. This is a simple HTTP GET request which can either be sent via http or https. You will need to url encode the message.
http://<request the url>?username=myUsername&password=myPassword&number=447777777777&message=Receptionist+cover+required+for+2+weeks+4+hr+per+day+%40+%C2%A310+per+hr%2C+location+Bristol.+Reply+with+%22more+4567a%22&orig=88802
You can try the above in any old browser.
There is an example class (in PHP 5) that would do this for you
Next we want to use the incoming response from the recipient
This is the bit where we need to speak to or email the company, a keyword is required (which is free) on the 88802 short code, in our example we are using the word “more”. You then supply Text Marketer with a URL on your domain that will get notified with the parameters once a response is received. For example www.mydomain.com/myscript.php
If the applicant replied with “more 4567a” you would receive an HTTP GET like this http://www.mydomain.com/myscript.php?number=4477777777&message=more+4567a&network=ORANGEUK
It is then up to you how you use this information, the example gives a few ideas.