Build SMS Notifications, Surveys, and Outreach with Twilio and TextIt

June 24, 2022
Written by
Eric Newcomer
Contributor
Opinions expressed by Twilio contributors are their own
Reviewed by

Digital Engagement TextIt Hero Image

Digital communications are key to improving program outcomes. Health workers improve birth registrations by using IVRs (Voice Surveys). Academic advisors strengthen their connection to students using SMS. Nudge campaigns improve patient outcomes in healthcare. Program officers deployed to war zones implement Needs Assessment surveys. And, across the board, teams implement digital Complaints & Feedback Mechanisms (CFM) to improve their processes.

Twilio offers the building blocks to create reliable and resilient communications over SMS, voice, and WhatsApp. And at Twilio.org, we see program teams working hard to serve their communities, often with very limited resources – and we’re excited to share our DIY solutions we learn from teams like yours.

In this post, we’ll explain how you can use TextIt’s campaign management software and Twilio Programmable SMS to set up a communication platform to instantly engage with people in 2-way communication.

Today’s solution: TextIt and Twilio SMS for Digital Engagement

Today, we will show you an example of setting up a healthy pregnancy text program. We will first send expectant mothers a broadcast message to enroll them in a prenatal program, and then send them periodic reminders to ensure healthy pregnancy (similar to a drip campaign).

We’ll show you how to register accounts with TextIt and Twilio, procure the phone numbers you’ll need, and contact your list. We’ll also run through how to time your messages, and test your flow.

Let’s dive in!

Prerequisites

  1. A Twilio Account - Signup here. You get some credits to start testing on a trial account, you will not need to put any payment method.
  2. Make a note of your Account SID and Auth Token, we will need it later.
  3. A 2-way SMS Twilio Number - Instructions on how to purchase a number can be found here.
  4. If you are not in the US, go to the SMS Geo Permission page and enable SMS for your country.
  5. A TextIt Account. Signup for a free account here.

If your country is not listed, contact us and we might be able to work with you for a private offering.

Step by Step

Before you create your messaging campaign, you must obtain participants' opt-in permission (user consent). The regulations for consent protect the consumer's right to privacy and differ by geography.

Upload a participant list

  • Download this sample contacts file (expectant_mothers.csv) file with names, phone numbers, and subscriber attributes we want to track: Expectant Mother CSV for TextIt Integration

    (In our case, due dates.) Please update the two rows with your data.

    If you add new columns, special attributes apart from Name and Phone number need to be prefixed with Field: e.g., Field:DueDate
  • Update the downloaded file with two contacts to test your survey. These numbers will get real messages, so please make sure you have access to them and test with them before you deploy your solution broadly.
  • In TextIt, Navigate to contacts 
Import contacts inside TextIt
  • On the Import Contacts screen, click Choose File and pick the clinic_signup.csv that you downloaded in the previous step
Import contacts from CSV
  • Preview the contacts – by default the group is called Expectant Mothers
Choosing a list in TextIt
  • The contacts are now created and you can message them, send them a survey, or open a helpline where they can reach you. For that we will create a survey (Flow) next.
Verifying contacts are created in TextIt

 

 

Create 2-way Registration Flow

TextIt has a straightforward Drag and Drop UI and the registration flow can be completed in minutes. For the sake of brevity, we are sharing a starter flow we created that you can import and expand for your own purposes.

Navigate to Flows to import the registration flow. The flow will send a message to all the contacts, validate the DueDate, and enroll them in the program.

Save this Registration Flow (registration_flow.json) file on your machine: Expectant Mother Registration Flow for TextIt

Click on the Flows -> Import button on the top right. When asked for a file, use the registration_flow.json file you saved.

Importing a registration flow in TextIt

TextIt steps to import registration

Once you upload the flow, you will be directed to Add a communication channel. We will connect to Twilio next.

Add a communication channel in TextIt

Connect your Flow to Twilio SMS

  • Get your Twilio Account SID and Twilio Auth Token by going to your Twilio Console. It should be on the landing page, see the image below:
Connect a flow to Twilio Programmable SMS
  • Ensure that you have completed the prerequisite step of buying a 2-way SMS Twilio number
  • In your TextIt Account, you should already be on the Project Workspace. If not, click here and click Add Channel
  • Pick the Twilio card from the options
Twilio setting inside TextIt
  • Enter the Account SID and Auth Token you saved earlier. Then, go to Next and pick the number
Enter Twilio credentials inside TextIt
  • When you click Save, you will see that the number you bought from Twilio already shows up
Choosing from existing phone numbers in TextIt

 

 

Test your Flow

  • In TextIt, Navigate to the Flows; you will see the “Expectant Mothers Registration” Flow
Picking our SMS list in TextIt
  • Open the Flow and review. We are confirming the subscription and the Due Date. Not all the paths (No and Other responses) are filled; you can practice later by completing the Flow.
Example registration flow inside TextIt
  • Pick our ‘Expectant Mothers Group’ for testing. You will see that you have received the message. 

The message will start with  “Sent from your Twilio Trial account”. This will disappear once you upgrade to a paid account 

  • You can also click the Green icon on the right to test the flow in the TextIt simulator
Starting a flow inside TextIt

 

Example registration flow inside TextIt shown on a phone

Schedule reminders for campaign

Now that we have a registration flow, we can create periodic reminders and messages that go out to registered participants. For our purposes, we will share week-by-week updates about pregnancy milestones along with tips for a healthy pregnancy.

We will show you how to set up the Week 14 reminder in this section. You can practice by creating other weekly reminders after.

  • Inside TextIt, navigate to Campaigns from the top menu. Click on Create Campaign. Enter a name for your Campaign (e.g., Pregnancy Reminders), then select the group to send the reminders (Expectant Mothers)
Create a campaign in TextIt
  • On the Pregnancy Reminders Click New Event
New Event in TextIt
  • Next, we will set up some scheduled reminders to remind the expectant mothers about nutrition, and other assorted tips.

 

Add a message similar to the following:

Week 14! Officially the second trimester! Around this time, moms-to-be think about telling friends & family the great news. @contact.name, how did you tell people?

It's far away, but there's a lot to cover before the baby arrives. Let's start with 2 tips for your carseat: 1) Install the base in the car so you can pop the carseat in & out. 2) Get a car seat that snaps into a stroller. It's so much easier. Want a specific recommendation? Reply CARSEAT

For the schedule, you can use the time relative to DueDate. Week 14 is 189 days before the DueDate.

Adding a message in a notification campaign inside TextIt

Testing and Troubleshooting Tips

For testing the flows, TextIt has a Flow Simulator that you can use when creating Flows. For testing reminders or campaigns, you can test by changing the Due Date with Last Seen On, and then change them back. This way you will get the reminders immediately instead of waiting a few weeks

Testing a SMS notification campaign in TextIt

Pricing

Twilio Pricing: Twilio has flexible pay-as you go pricing so you don’t have to sign any contracts. You can look up the price of each SMS by going to the pricing page and picking the country.

If you are a Social Impact organization you are eligible for product credit and exclusive discounts on Twilio – Apply here.

TextIt is free to start, and after that the pricing is based on the number of contacts you reach. TextIt also offers discounts for various causes. If you need procurement help, both TextIt and Twilio have LTA (Long Term Agreements) with many global NGOs.

Conclusion

As you can see, you can quickly add SMS campaigns to your program!

With TextIt, you don't need to limit yourself to just sending reminders. Instead of a single message, you can also schedule flows for your contacts to collect more data on how they are doing.

You don’t need to stop with SMS, you can also integrate Twilio WhatsApp or create powerful IVRs using Twilio’s Voice channel to maximize reach and impact. We have seen organizations use TextIt in very creative ways – everything from Needs Assessments, Complaints and Feedback Mechanisms, and Post Distribution Monitoring solutions to name just a few.

If you’re looking to enhance your TextIt integration, you can expand your program with Twilio’s channels. For example, add WhatsApp if you work in geographies like LATAM and India where WhatsApp is the prominent messaging channel. Or, create IVRs by adding Twilio Voice enabled numbers, which will help you reach part of the population that is not literate. We hope this was useful and we cannot wait to see what you build!  

Gunjan Gupta is the Principal Solutions Engineer at Twilio.org. Gunjan works with Social Impact organizations of all sizes to find solutions to challenging communication problems. She is committed to providing accessible solutions to the Program Management teams working on the ground. She can be reached at gugupta [at] twilio.com.

Eric Newcomer is a Co-Founder and one of the principal engineers behind TextIt. He and his team created TextIt to make it easier for organizations to quickly deploy powerful interactive messaging applications anywhere in the world without the need of a software company. TextIt support can be reached at support [at]textit.com.