Twilio Notifications in Ignition

Sarah wiped the grease from her hands and stared at the blinking red light on the SMS modem for the third time this week. The production line had been down for two hours, and nobody knew about it until the day shift supervisor made his morning rounds. Again.

"This is ridiculous," she muttered, pulling out her phone to call the equipment vendor. The automated voice cheerfully informed her that her call was important and that she was caller number twelve in the queue.

The SMS modem setup had seemed straightforward a year ago when corporate approved the factory's new alert system. Connect the everything to their Ignition system, tie in the SMS notification module, configure the phone numbers, and voilà—instant notifications when something went wrong. What they hadn't counted on was the modem's tendency to randomly disconnect from the cellular network, its inability to handle more than a handful of messages per hour, and its complete failure during a recent thunderstorm that left them with a flooded production floor and no warning alerts.

Sarah had spent countless hours digging in panels to check cable connections, rebooting the temperamental SMS modem, and explaining to frustrated managers why critical alerts were arriving three hours late—if they arrived at all. The SMS modem's web interface looked like it was designed in 2003, required Internet Explorer to function properly, and had a configuration menu that would make a seasoned engineer weep.

As she waited on hold, Sarah's colleague Mike walked over with his laptop. "Hey, check this out," he said, pulling up a website. "I've been reading about this Twilio thing. Apparently, you can send SMS alerts from Ignition with just some minor configuration, and it actually works reliably."

Sarah raised an eyebrow. After months of battling hardware failures and cryptic error messages, the idea of a cloud-based solution that promised 99.95% uptime sounded almost too good to be true.

But maybe, just maybe, it was time to drag their alert system into the 21st century...

What is Twilio?

From an Ignition perspective Twilio is a platform you can use to send text message, WhatsApp or voice alerts to any users of your system. The benefit to using Twilio compared to an SMS modem for “typical” text alerts is you don’t need a separate SMS modem plus SIM card with a monthly plan. This reduces the amount of moving pieces required to get alerts sent out to your team.

The one downside compared to a standard SMS modem is you will be charged on a usage basis, however the overall costs of using Twilio are small so unless you are sending out a lot of alerts you might find it is a cheaper option than a standard SMS modem.

Setting Up a Twilio Account

Twilio has a great walkthrough on everything you need to get started with a Twilio account here.

Basically you need to sign up with an account, set up a phone number to use for sending Ignition alerts, then if you are in the US or Canada go through the A2P10DLC certification process to enable sending messages on your account. From there you install the Alarm Notification and relevant Twilio notification modules on your Ignition gateway, set up your Twilio account in Ignition, and then set up an alarm pipeline to send alarm notifications.

If you want to send messages that aren’t related to alarms you can use the Twilio API along with some scripting, and/or if you’re using Ignition 8.3 you can tie into the Event Stream pipeline to set up API calls to send messages.

Easily Approved A2P10DLC Messaging Responses

Because marketers and spammers ruin everything, US cellular carriers now require you to go through a certification process on Twilio to make sure you aren’t going to use their system for nefarious purposes.

This is arguably the hardest part of any Twilio integration. Before this certification requirement you simply needed to set up a number and you were good to go. Now it requires filling out some forms describing how you are going to use Twilio. Given the somewhat “different” nature of sending messages to employees compared to having the general public opt-in to receive messages this process might throw you for a bit of a loop.

The first time we went through the certification process “we are going to use employer provided phones to send messages to employees” was denied no matter how we tried to spin it. After a few rounds of back and forth and a few calls with Twilio’s excellent tech support team we solved the puzzle and now have responses that get approved on the first attempt.

Because we believe in transparency, providing excellent customer service, and promote education and training we are going to share our responses to the A2P10DLC certification process below. (Note, yes we know it is a weird workflow, and in our experience doesn’t need to be setup for all of time, so you can set up a URL for viewing the privacy policy and opt-in image URL while you are getting approved, then take them down after you everything is good to go):

Campaign Information

Description

We use Twilio to send notifications for our customers to their employees who manage manufacturing processes. This information is related to alarm conditions or process abnormalities requiring users to intervene with the process itself. Alarms are generated by the process control and SCADA system, displayed in a control room or on the plant floor, and sent to users if they have not been acknowledged or addressed in a timely manner. User accounts receiving notifications will be managed by their employer and will only include any personally identifying information in their corporate account , completely independent of notifications. Typically users of the system will use a company owned mobile device. Users can opt-out of notifications if desired, although they will need to remain in compliance with corporate policies if they are required to receive alarms as part of their job duties. No marketing or promotional content will be delivered in these messages. Our privacy policy is as follows: https://twilio.cs-ignition.com/data/perspective/client/Corso_Systems_Privacy_Policy (Yes this link doesn’t go anywhere. If you need an example of our privacy policy that gets approved, along with the required SMS Opt-In section please check out the one on our site here.)

Sending messages with embedded links?

No

Sending messages with embedded phone numbers?

No

Sending messages with age-gated content?

No

Sending messages with content related to direct lending or other loan arrangement?

No

Message Sample #1

At {eventTime|hh:mm:ss}, alarm {name} at {displayPath} transitioned to {eventState}.

Message Sample #2

At 12:00:00 alarm Limit High Temperature Alarm at Facility/Device/Limit High Temperature Alarm transitioned to TRUE - Critical.

End User Consent

How do end-users consent to receive messages?

After users are created and assigned to a user account in their company's SCADA system they will be able to receive messages per their company's policy after agreeing to a consent popup shown here: 

Screenshot of a Twilio Opt-In Popup

This initial set-up uses already available information in their corporate account and their user account in the SCADA system is managed by the company and/or their IT department. The user's phone number is available through their corporate account, but the user must confirm their phone number via the popup to be able to sign up for SMS alerts. Once the user clicks sign up, their phone number, username, and a timestamp are stored with their user account to log their initial consent to SMS alerts. Upon the first message, to remain in compliance with Twilio's opt-in policy, the user will be required to reply to a text confirming that they wish to opt-into receiving alerts. This will ask them to consent to receiving SMS messages from Twilio Autodialer and that messaging and data rates may apply, the messaging frequency varies, and that they can unsubscribe at any time by deselecting the opt-in to receive SMS Alerts from their user options, or texting STOP to the number they are receiving messages from. If the user opts-out their employer will be notified as this may mean they are out of compliance with company policy for their specific job duties. This system is strictly used for corporate-based notifications, on private manufacturing operations systems and does not send information to the general public, only to employees of companies who have chosen to use Twilio to send notifications to their employees and/or contractors who need them to perform their job functions.

Opt-in Message

You have successfully been subscribed. Reply STOP to unsubscribe

Opt-in Keywords?

-

Opt-out Message

You have successfully been unsubscribed. You will not receive any more messages from this number. Reply START to resubscribe.

Opt-out Keywords

CANCEL END QUIT UNSUBSCRIBE STOP STOPALL

Help Message

Reply STOP to unsubscribe. Msg&Data Rates May Apply.

Help Keywords

HELP INFO (edited)

Toll Free Verification Information

Estimated Monthly Volume

1,000 messages

Use Category

Security Alert

Opt-In Type

Web Form

Use Case Description

This number is used to send notifications to employees who manage manufacturing processes. This information is related to alarm conditions or process abnormalities requiring users to intervene with the process itself. Alarms are generated by the process control and SCADA system, displayed in a control room or on the plant floor, and sent to users if they have not been acknowledged or addressed in a timely manner.

Message Content

At 12:00:00 alarm Limit High Temperature Alarm at Facility/Device/Limit High Temperature Alarm transitioned to TRUE - Critical.

Opt-in Workflow Image URL

Insert a URL to your verification popup here, typically we would host this in a cloud-based Ignition gateway used for Twilio verification with a publicly accessible URL.

Twilio Alarm Notifications Integration with Ignition

Once you have your A1P10DLC certification finalized you can get everything set up in Ignition. This is arguably the easiest part of the process, and we recommend following the Inductive Automation Twilio Help Documentation to get everything set up.

The one item to note is that you need to enter your phone number without a + sign, and include the country code, so for a US number it would be 15551234567.

Once you have everything set up in Ignition you can set up an alarm Pipeline and send a test alarm notification using Twilio!

Wrapping Up

If you have questions or need more help getting your Twilio integration with Ignition set up, please reach out and let us know! The value in this post is the A2P10DLC responses and we left the rest of the Ignition specific set up pretty light because we haven’t typically run into questions on that side of things.

We use Twilio for all of our Corso Care support notifications from our customer’s systems and our internal tools built on Ignition, and have only run into issues when the entire internet is experiencing problems like when Amazon Web Services goes down. Otherwise it has been a rock solid solution since we first implemented it in 2017!

Next
Next

Ignition 8.3