Message encoding
If a message body only contains ASCII characters when sending and receiving messages, then a message segment may contain up to 160 characters for a single message. If the message length exceeds 160, then the messages are split into multiple segments with a maximum of 140 characters each. If the message body contains one or more non-ASCII characters then the message segment may contain up to only 70 characters. To find the type of encoding used in a message, see Look Up a Message Detail Record. Flowroute's Message Detail Record (MDR) contains a message_encoding field indicating the type of encoding used for that message, described in the following table:
Message Encoding | Total Characters | Encoding | Characters Per Segment |
---|---|---|---|
0 | 160 or less total | ASCII | 160 |
0 | greater than 160 total | ASCII | 140 |
8 | Any total length | UCS-2 | 70 |
In the following MDR example, the message_encoding field is set to 0, indicating that ASCII was used; therefore, allowing 160 characters per segment:
{ "data": {
"attributes": {
"body": "Hey, nice marmot!",
"direction": "outbound",
"timestamp": "2016-04-14T21:10:27.366645+00:00",
"amount_nanodollars": 4000000,
"from": "12062092844",
"message_encoding": 0,
"type": "messages",
"has_mms": false,
"to": "19515557918",
"amount_display": "$0.0040",
"callback_url": null,
"message_type": "long-code"
},
"type": "message",
"id": "mdr1-a83257f4f9c04a4089daeeb050af99cd"
}
}
Message Cost
The cost of the message is determined by the number of characters in the message body depending on the encoding type.
For example, if the message body were 80 characters long and encoded as message_encoding: 8, then you would be charged for two (2) SMS texts (80 character length/70 character segment limitation).
For example, if the message body were 160 characters long and encoded as message_encoding: 0, then you would be charged for one (1) SMS texts (160 character length).
For example, if the message body were 320 characters long and encoded as message_encoding: 0, then you would be charged for three (3) SMS texts (320 character length/140 character segment limitation).
Message concatenation
For outbound messages, Flowroute has a max concatenation limit of 5 segments. Do note that if the mobile carrier has a message length limitation, or if you send more than the 5 * characters-per-segment, the message might be truncated. Flowroute will automatically break the message down into appropriately sized segments and add concatenation headers to those messages. As long as the message is sent to a carrier that supports concatenation headers, the message will be delivered to the mobile phone as one continuous message. If the carrier does not support concatenation headers, the message will be received in multiple parts.
For inbound messages Flowroute will reassemble the message and deliver it to the endpoint as one continuous message if concatenation headers are received. You will still be charged per message segment; however, the message will appear both at the endpoint and in the MDR as one long message. If concatenation headers are not received, each message segment is delivered separately along with a unique message ID for each received segment.
Carrier Support for Concatenation Headers
At this time Sprint and T-Mobile are the only US mobile carriers that we are aware of that do not support concatenation headers.