Webhooks Use Case: Sending Text Messages

Overview

Multi-channel marketing is a very effective way to reach your target audience. In addition to voice, direct mail and email, text messaging, or SMS, is another channel that can be added to your Lead Liaison marketing campaign. Text messaging is affordable. At fractions of a penny, texting can deliver direct results with high open/conversion rates. Lead Liaison partners with Twilio to deliver text messages. The instructions below highlight how text messaging can be setup and integrated with Lead Liaison. 

Instructions

Text messaging is setup in Lead Liaison in 3 easy steps:

  1. Create a Twilio account and deposit funds. 
  2. Create a Webhook in Lead Liaison that calls Twilio's service.
  3. Create an automated process and add the Webhook as an action in your workflow.

Step 1: Create a Twilio Account

Follow the directions below to create your Twilio account

  • Go to www.twilio.com, create an account and deposit some funds. In this example, we added $20. Pricing for sending each text message is covered here
  • When you create your Twilio account you'll receive a dedicated phone number that you own. Text messages will be sent from your Twilio number. 
  • Once your account is created take note of your Account SID and Auth Token. Both of these values can be found by clicking Dashboard at the top of your Twilio account. You'll see something like the below. Keep this page open in your browser. You'll need the SID and Token to plug into your Lead Liaison Webhook Call. 

Step 2: Create a Webhook in Lead Liaison that Calls Twilio's Service

To create a Webhook in Lead Liaison go to Settings > App Setup > Webhooks > Add Webhook and follow the instructions below. 

  • Make sure to add the Webhook app to your instance if it's not already installed. Click the App Cloud link on the top of the page, locate the Webhook app and install it. 
  • Click Add Webhook
  • A popup similar to the one below will appear

  • Enter in the following values for each field
    • Webhook Name: Anything you want. This name will be what you'll use to search with when you add the "Call Webhook" action. In our example, we'll use SMS Campaign - 20% Off as the name of the Webhook. 
    • Description: Anything you want. 
    • URL: Use the following URL but replace the text in red with your SID and Token as shown in Step 1. Your URL should look like the one in the screenshot below. 

https://{{INSERT ACCOUNTSID}}:{{INSERT AUTHTOKEN}}@api.twilio.com/2010-04-01/Accounts/{{INSERT ACCOUNTSID}}/Messages.json

    • Request Type: POST
    • Template: Copy and paste the template below. Make sure to replace the areas in red with your messaging. Each field is further described below:
      • Body: This is the text message itself. Use the person's first name for personalization. By using the "Insert Field" button we can tell Lead Liaison to insert the value from Lead Liaison's Standard Field, called "First Name". This value is represented by %%FirstName%%.
      • To: This is the person's mobile phone that you'd like to text. By using the "Insert Field" button we can tell Lead Liaison to insert the value from Lead Liaison's Standard Field, called "Mobile Phone". This value is represented by %%MobilePhone%%. 
      • From: This is your Twilio phone number. 

Body=Hi %%FirstName%%, Lead Liaison would like to offer you 20% off. Use coupon 12345 before May 1st, 2014 to receive your discount&To=+1%%MobilePhone%%&From=+14692155531

    • Request Token Encoding: FORM/URL
    • Response Type: XML

Step 3: Add Your SMS Action to a Workflow

Create any automated process and drag & drop the "Call Webhook" action to the canvas. 

Tip: Add Criteria Before Sending Your SMS

Wrap criteria around the Webhook Call that will send the SMS to make sure Twilio is not called if no mobile phone number exists.

Your action might look something like the screenshot below:

Test Your SMS Call

We recommend testing your SMS call in two ways.

  1. Test your Twilio SMS call by creating a new Webhook with the full Template as described above. In place of the URL use a RequestBin URL. This test process is described in our documentation here
  2. Test your Twilio SMS call by creating a new Webhook with the full Template as described above. This time use the live Twilio URL. 

In each case, after the Webhook has been created click "Test Webhook" under the Actions column. Select a Prospect whose information you'd like to use. The Prospect should have a mobile phone number on their record. After selecting the Prospect from the dropdown click the "Submit" button. You should see a response similar to the one below (for Test scenario #2):

Voila!

Your text messages are delivered from your Twilio phone number. 

Initial Receipt of SMSOpening Text Message

Customizing Replies

Replies Cost Money

Inbound text messages and outbound text messages cost money. In the US for Long Code numbers inbound/outbound messages cost the same. If you setup a reply message the reply message is considered an outbound message. If the recipient replies to your Twilio number the reply is considered an inbound message. For example, sending a customer a text message, then they reply, then you send a standard reply would count as three (3) text messages.

Recipients could reply to your message. By default, they'll receive the following text message as a reply from your Twilio phone number:

Thanks for the message. Configure your number's SMS URL to change this message. Reply HELP for help. Reply STOP to unsubscribe. Msg&Data rates may apply. 

To customize the reply message do the following:

TwiML
<Response>
<Message>Your custom reply message will go here!</Message>
</Response>
  • Your input will look like this:

  • In your Twilio account, enter the "Resulting URL" you created in the previous step into the "Request URL" field. 

Turn Off Replies

To turn off replies to inbound text messages leave the "Request URL" field empty.

HELP and STOP (Unsubscribing)

Long Code numbers used for text messaging in the US are not regulated. As a result, it's not required to tell recipients they should unsubscribe. Only Short Codes have these requirements. However, Twilio Long Code numbers do allow recipients to get HELP or STOP communication from your Twilio number. If the recipient replies with HELP they will get a standard response and replying with STOP will stop all text messages from being sent. Lead Liaison suggests adding the following line to your first text message sent to a recipient:

Reply HELP for help.Reply STOP to unsubscribe.

Things to Keep in Mind

  • Most carriers limit 250 unique text messages per day using a Long Code phone number.
  • Twilio limits texts from a Long Code number to 1 per second. Messages can be queued though. Up to 4 hours of messages will be queued. 
  • A Twilio Long Code number costs $1/month/number.
  • Use multiple Long Code numbers for higher volume messages. 
  • Short Codes are available. Tips on Short Codes:
    • Limited to 30 messages per second by Twilio. 
    • Better for branding and marketing. 
    • Must apply for a Short Code. Takes 12 to 16 weeks for the application process. 
    • Short Codes available in CA, US and UK. 
    • Costs $1,000/month for a Short Code.
    • Short Codes are highly regulated




 

  

© 2021 Lead Liaison, LLC. All rights reserved.

13101 Preston Road Ste 110 – 159 Dallas, TX 75240 | T 888.895.3237 | F 630.566.8107 www.leadliaison.com | Privacy Policy