Howdy!
Does anyone have experience with using Twilio to send dynamic SMS messages in bulk? For example, we're running a program this summer where we'll need to notify ~30k people that they will be participating in a demand response event for the day. In order to do this, we'll be changing a data value on the contact record via API, which will, in turn, trigger a campaign to call the Twilio webhook. I know sometimes calling a webhook for each person takes awhile for the campaign to run through everyone. If this is a time-sensitive message, does anyone have any better ideas on how to set this up?
Any tips are much appreciated!
Solved! Go to Solution.
AFAIK the Twilio limit (regardless of shortcode or full sending #) is 100 concurrent inbound requests to the API per API key. You'll never have to worry about this w/a Marketo webhook because Mkto will only parallelize ~8 concurrent requests.
The shortcode difference comes into play after the webhook stage is complete and relates to how fast Twilio pulls messages off its internal queue and actually sends outbound via SMS. At that stage, a shortcode is vastly better because they'll send the outbound SMS at 100 messages per second if you have a shortcode but only 1 per second if you do not -- in other words, you get 100x faster delivery with a shortcode.
So for high-volume, time-sensitive sends, the key is to get things into Twilio faster than a webhook's inherent speed limitation. In this case it's better to use the Notify service, which can send all your messages with a single API call. The way to use Notify in this case is to run everyone who qualifies through a webhook that only adds them to a Notify "segment"; you can run this webhook the day before the send, for example, or whenever you know someone should be added to the future send. Then on the day of the send you only call the webhook once, telling it to notify everyone who's been added. (You can send the webhook in the context of a special lead you dedicate for this purpose, so you can use the Marketo batch scheduler as you usually do.)
Do you have a shortcode? You should discuss this with Twilio because the webhook has some sort of limit like 20 per second or 20 per min. I know SMS providers tend to throttle SMS as well w/o shortcode....which is very expensive.
You could handle the throttle with some level of randomization and waiting to slow down the webhook call.
Is there a reason you want SMS vs. Email?
I'm in the process of provisioning the shortcode, but we will be using this going forward.
We'll be using email for these notifications as well. We're also allowing people to opt into SMS alerts. Technically someone could receive an email and an SMS. We're looking to determine whether the SMS alerts are impactful in our results. We're not marketing anything with it, simply an alert to let them know something will be happening that day in their home.
AFAIK the Twilio limit (regardless of shortcode or full sending #) is 100 concurrent inbound requests to the API per API key. You'll never have to worry about this w/a Marketo webhook because Mkto will only parallelize ~8 concurrent requests.
The shortcode difference comes into play after the webhook stage is complete and relates to how fast Twilio pulls messages off its internal queue and actually sends outbound via SMS. At that stage, a shortcode is vastly better because they'll send the outbound SMS at 100 messages per second if you have a shortcode but only 1 per second if you do not -- in other words, you get 100x faster delivery with a shortcode.
So for high-volume, time-sensitive sends, the key is to get things into Twilio faster than a webhook's inherent speed limitation. In this case it's better to use the Notify service, which can send all your messages with a single API call. The way to use Notify in this case is to run everyone who qualifies through a webhook that only adds them to a Notify "segment"; you can run this webhook the day before the send, for example, or whenever you know someone should be added to the future send. Then on the day of the send you only call the webhook once, telling it to notify everyone who's been added. (You can send the webhook in the context of a special lead you dedicate for this purpose, so you can use the Marketo batch scheduler as you usually do.)
"The shortcode difference comes into play after the webhook stage is complete and relates to how fast Twilio pulls messages off its internal queue and actually sends outbound via SMS. At that stage, a shortcode is vastly better because they'll send the outbound SMS at 100 messages per second if you have a shortcode but only 1 per second if you do not -- in other words, you get 100x faster delivery with a shortcode."
What's the reason for that do you reckon? What difference does it make to Twilio whether they're sending from a shortcode or a real number or phrase? Surely the underlying technology (SMS) is exactly the same?
or is as simple as "shortcode = a premium service"?
Supposedly there's a legal angle in that without a shortcode, you're not supposed to send "app-to-person" messages. So with a long code you're throttled to 1 per second because that's (perhaps generously) the max speed a person could send out messages from a handset. If you need to send at true machine speed, you have to pay more.
I imagine the carriers do throttle non-shortcode SMSes accordingly, but they don't technically have to as like you said it's the same protocol.
@Nicholas_Manojl I work at a CPaas company called Telnyx and the reason we throttle long code numbers is to prevent bad actors from easily signing up for our portal and sending a bunch of spam to people before we catch them.
If you want to increase your throughput on long code you can make a case to our sales team who will increase it if your use case is legitimate.
The reason why you can send more messages per minute with short code or toll-free numbers is because you have to go through a verification process to obtain these numbers and specify how you will opt people in and out.
I discuss the throughputs of different number types as well as their different pros and cons (international capability, number cost, message cost, 2 way capability) in this post if anyone wants more detail: https://theworkflowpro.com/marketo-sms-marketing/
Thanks, Sanford. When you say Notify segment, is this segment located within Twilio's platform and not Marketo?
"(You can send the webhook in the context of a special lead you dedicate for this purpose, so you can use the Marketo batch scheduler as you usually do.)"
Also, what do you mean by this statement?
Thanks, Sanford. When you say Notify segment, is this segment located within Twilio's platform and not Marketo?
Right, this is a Twilio-specific meaning of "segment." Not related to Mkto segments.
"(You can send the webhook in the context of a special lead you dedicate for this purpose, so you can use the Marketo batch scheduler as you usually do.)" Also, what do you mean by this statement?
This is the concept of a "Resource Lead": a person in your Marketo db that represents a process or service rather than a human.
It's similar to the idea of Conference Rooms, Copiers, and Printers being resources in a Microsoft Exchange or other collaboration environment, alongside the actual people.
You create a Resource Lead by calling it by the name of a program, campaign, special process, etc. Like here you would call the lead "Resource: Demand Response 2018-06-01 SMS" or something like that. Then you only need to schedule that single lead to request the bulk-based webhook campaign, since you only call the webhook once.