Skip to main content
Version: 6.12

Twilio Message Gateway

Patriot supports sending WhatsApp and SMS messages via your Twilio account. Due to restrictions on message content sent via the WhatsApp platform only automated messages generated from a pre-approved message format are supported. It is also possible to send Facebook Messenger messages via this module but beware there are restrictions; including on sending to Facebook Messenger users who have not first initiated contact with you.

Prerequisites

  • The Twilio module must be registered
  • You must have an active Twilio account which is correctly configured for the types of message (WhatsApp and/or Facebook Messenger and/or SMS) that you wish to send from Patriot.

Twilio Account Setup

Please refer to Twilio documentation and support for detailed guidance on account setup. The required setup will depend on the types of message you wish to send, for WhatsApp and Facebook Messenger there are additional steps including having (or applying for) a Facebook for Business account.

For WhatsApp messaging you must submit to Twilio your proposed message templates and wait for them to be approved by WhatsApp before sending any messages. WhatsApp does not allow sending an initial message to a user unless it matches one of the pre-approved templates on your account.

Patriot Task Setup

System Menu Item > Tasks > Task Settings

Please read TASK SETTINGS for general information about adding tasks and general task settings.

note

If your Twilio account supports sending multiple types of messages (e.g. SMS, WhatsApp and Facebook Messenger), and you wish to send multiple types of messages from Patriot, then you must add one Patriot Twilio task for each message type. The Sender ID in each task must be set to an appropriate value for the message type. It is recommended that you include the message type in the task Description (which is displayed to operators when making response plan assignments).

add Add a new instance of the Twilio task by selecting it from the Task Type drop down list.

next

Click the next button to continue. The Twilio task settings form will be displayed.

Twilio Task Settings
Twilio Task Settings

Account SID found on your Twilio Account Dashboard

Auth Token found on your Twilio Account Dashboard

Prefix to be applied to all messages sent out via the task. If you are using the task to send WhatsApp messages, you may wish to enter the prefix whatsapp: - otherwise you must enter the prefix whatsapp: each time you enter a user's WhatsApp number in a user contact number field. Likewise, if you are using the task to send Facebook Messenger messages, you may wish to enter the prefix messenger: but note that if you do this then it may be difficult to determine which of your users support receiving WhatsApp/Facebook Messenger messages.

Sender ID is the origin number that messages from this task will be sent from. The number must be linked to your Twilio account. If you are sending WhatsApp messages then this should include the whatsapp: prefix. If you are sending Facebook Messenger messages then this is your Facebook page ID with the prefix messenger:

Message Formats must be configured if you are using the task to send WhatApp messages. Your Patriot Message Formats must exactly match the pre-approved Message Templates on your Twilio Account. It is recommended that you use an Handle Bars template to define your Message Formats for WhatsApp. If you attempt to send a message that does not exactly match a template on your Twilio account then a Fail to Send (65,102) signal will be logged against the client account with an error message displayed in the signal raw data.