Build the future of communications.
Start building for free

Common SMS Problems and How to Solve Them, Part 1

Twilio_Website_Blog_Toll-Free-SMS

Most of us don’t think to question whether or not the pictures or emojis in our text message will get through to the person on the other end. Nor do we pause to break up a long message into several parts in order to ensure messages go through in the correct order. Rather, we expect exactly what seems like the obvious: that our message will be received exactly as it was sent regardless of what is sent.

But, these expectations can actually be very challenging for a developer to address in their SMS applications. The reality is that SMS delivery, even when it comes to sending messages over 160 characters, is not as simple as it seems. Basic consumer demands can require a good deal of code for developers to solve.

We’re going to take you behind the scenes of messaging in a 3-part series to take a look at some of the things that can throw a wrench in an SMS, and how to solve them in your application. In this part, we’ll focus on how inbound concatenation plays a key role when you receive long messages.

The Wrench: Receiving Out of Order Messages

When someone sends a long text message (over 160 characters), they might assume the message will be sent (and received) as a unit. This is a common misconception.

In reality, the longer message will actually need to be split into multiple fragments before it’s sent. What this fragmenting means is that the message is at risk of being received out of order. For example, if the last “fragment” is much smaller than the first two, it may get to the end user first since the shorter message is sent the fastest.  The end result? Unless something is built into an application to reassemble messages received, end users may see out of order messages.

The Solution: Auto-assembly with Twilio Inbound Concatenation

Concatenation offers developers a solution to reassemble messages that are broken up into parts. One way an inbound concatenation feature can work is to offer developers UDH (User Data Headers, or ordered labels for messages) so that the developer can use those headers (eg, 1, 2, 3, 4) to build a reassembly solution. In this scenario, developers need to use code to successfully grab the right message when it arrives and put it in the right order before the recipient gets it.

With Twilio, inbound concatenation means something a bit different. It can be a burden to developers who build out UDH logic, and can take up valuable time they could spend building out an SMS application. We know time and development cycles are precious, so we take care of the reassembly for you without requiring you to use UDH.

On the backend, we automatically identify the order in which the messages were received, and systematically reorder them on your behalf. Check out the examples below (courtesy of Lewis Carroll’s The Jabberwocky) to get a better idea of how this kind of concatenation impacts delivery:

Concat

Twilio Inbound Concatenation with Auto-Assembly

NumSegments: 4

SmsStatus: received

Body: ‘Twas brillig, and the slithy toves Did gyre and gimble in the wabe: All mimsy were the borogoves, And the mome raths outgrabe. “Beware the Jabberwock, my son! The jaws that bite, the claws that catch! Beware the Jubjub bird, and shun The frumious Bandersnatch!” He took his vorpal sword in hand; Long time the manxome foe he sought So rested he by the Tumtum tree And stood awhile in thought. And, as in uffish thought he stood, The Jabberwock, with eyes of flame, Came whiffling through the tulgey wood, And burbled as it came! One, two! One, two!

vs.

Standard Concatenation with UDH

NumSegments: 4

SmsStatus: received

1: ‘Twas brillig, and the slithy toves Did gyre and gimble in the wabe: All mimsy were the borogoves, And the mome raths outgrabe. “Beware the Jabberwock,

4: s of flame, Came whiffling through the tulgey wood, And burbled as it came! One, two! One, two!

2: my son! The jaws that bite, the claws that catch! Beware the Jubjub bird, and shun The frumious Bandersnatch!” He took his vorpal sword in hand; Long t


3: ime the manxome foe he sought So rested he by the Tumtum tree And stood awhile in thought. And, as in uffish thought he stood, The Jabberwock, with eye

You can see that when this long message is sent without Twilio concatenation, it is jumbled out of order. The 4th message sends faster than the second and third. Twilio concatenation, at the top, solves fragmented sending by reassembling the message automatically so that developers don’t need to use additional code to send long messages to most US carriers.
To read more about how to to send and receive an SMS on Twilio with concatenation, check out our how to doc here. See you next week for a second peek at common behind the scenes monkey wrenches with SMS, and how you can use Twilio features to solve them.
,

Authors
Sign up and start building
Not ready yet? Talk to an expert.