Twilio
The Easy Services Booking - Send SMS (Twilio) plugin sends the SMS templates to your clients through Twilio.
What you need
- A Twilio account (twilio.com).
- Your Account SID and Auth Token from the Twilio Console.
- A Twilio phone number or an approved sender ID to send from.
- A phone number field in your booking form. The default form has Mobile with the variable name
mobile.
Set up the plugin
Go to System > Manage > Plugins, search for Twilio and open the plugin. It is installed disabled.
| Setting | What it does |
|---|---|
| Send on Create | Send on_event_created right after a client books |
| Send on Validate | Send on_event_validation when a pending booking is confirmed |
| Send on Reminder | Send on_event_reminder with the reminder email |
| Twilio Account SID | From the Twilio Console |
| Twilio Account Token | The Auth Token from the Twilio Console |
| Default country code to add | The country code without +, for example 44 |
| Strip leading 0 | Yes removes a leading 0 from the number, as in 07700 900123 |
| Mobile # customfield | The Variable Name of the phone field, for example mobile |
| The sender number or ID | Your Twilio number, for example +447700900123, or an approved sender ID |
Set Status to Enabled and save.
How the number is built
Easy Services Booking removes every character that is not a digit from the client's number, removes a leading 0 if Strip leading 0 is Yes, and then puts + and the Default country code to add in front. The country code is always added, so ask clients to enter their number without the country code, or leave the setting empty and ask them to type the full international number without +.
Example: with 44 and Strip leading 0 on, 07700 900123 becomes +447700900123.
Good to know
- Messages are sent only when the booking has a number in the phone field. Without one, nothing is sent.
- In a Twilio trial account you can only send to verified numbers.
- See SMS templates for the texts and the tags you can use.