Wednesday, October 31, 2012

Twilio integration : Trigger SMS messages from your online database

We are glad to add another premium feature in your favorite online database application for Google App Engine. iFreeTools is now integrated with Twilio to send out SMS messages, triggered as part of workflow actions (database change triggers) or from within the list view (manual trigger).

This facility is available as a preview in the free version, where the messages will get added as Notification Tasks with Preview status, while in the paid single-tenant deployment (starts at $99/year), the messages would be sent out to the mobile numbers with the task's status getting marked as Completed.

To make use of this SMS facility, you will have to first configure your App Settings (under Admin), to provide the Account SID and the Auth Token from Twilio, as shown below. If you also have a short-code configured for your use, you can specify the same to be used as the Sender ID, else you can provide your Twilio number (listed under the Numbers tab)


Your Account SID and Auth Token will be available under the dashboard tab on Twilio :
https://www.twilio.com/user/account



For the Sender ID, proceed to the Numbers tab and copy your Twilio number. If in case you have a short-code, you can provide the same in the App Settings in iFreeTools.



The Send SMS option will automatically list all the phone numbers available in the records, which have been marked with Other Rendering as Phone, in the attribute details page.




The option to Send SMS will be available in the list views for records which have a phone number, so that you can select the records and trigger an SMS manually, as shown in the image below..


The resulting page will work similar to how you can send out email-notifications using mail-merge like field values. The Send SMS option will also be available as part of the Workflow actions, so that you can trigger the SMS automatically when the records get added/updated/deleted, as shown below..


You can verify the contents and the status of the messages from under Notification Tasks, which will list all the notifications triggered from the application.



Phone number format (as per Twilio docs)

The phone number values need to be in the [+][country code][subscriber number including area code] format to work without issues. Other formats are not guaranteed to work with Twilio, as detailed below..

We strongly encourage E.164 number formatting for all phone numbers both in the ‘to’ and ‘from’ fields. This format is the internationally-standardized format for all phone numbers, and it includes all the relevant information to route calls and SMS messages globally. E.164 numbers can have a maximum of fifteen digits and are usually written as follows: [+][country code][subscriber number including area code]. Phone numbers that are not formatted in E.164 may work, but it depends on the phone or handset that is being used as well as the carrier from which the call or SMS is being originated. 
For example, to convert a US phone number (415 599 2671) to E.164 format, one would need to add the ‘+’ prefix and the country code (which is 1) in front of the number (+1 415 599 2671). In the UK and many other countries internationally, local dialing requires the addition of a 0 in front of the subscriber number. However, to use E.164 formatting, this 0 must be removed. A number such as 020 7183 8750 in the UK would be formatted as +44 20 7183 8750.
Hope you like the new Twilio integration. Keep sending in your feedback and suggestions on how we can make your online database application hosted on Google App Engine work better for you.