Sending MMS text to avoid concatenation issues

Sending MMS text to avoid concatenation issues

Greetings,

When sending text messages longer than 160 characters you may run into situations where certain carriers (Sprint and Verizon in particular) are not able to receive the text as one message, rather it breaks it up into multiple texts, and often out of order.  One solution to get around this issue is to send the message as MMS (Multimedia Messaging Service) instead of SMS (Short Message Service).  See link for more details on the concatenate issue and possible work arounds -  https://www.smallbusinesstech.net/concatenated-sms/.

An MMS can be triggered by attaching a pic to the message.  However if you are using the standard integration setup for you messaging service in Creator (i.e. Twilio like I'm using), there is no place to include a picture in the call to that service, only the message text:

<SMS Response> = twilio.sms.send("<sms notification name>","<to>","<message>");

One solution (I'm sure there are others) I found to include the pic in the text message call to Twilio is to create a postUrl call to the service from scratch.  When you make the call, you can include the pic via the "MediaUrl" key-value pair.  

MyMap = Map();  // create map for request information ("To", "From", "Body" & "MediaUrl") of the text
MyMap.put("To","+19999999999");  // phone number you are sending text to
MyMap.put("From","+15555555555");  // phone number message is sent from, must be your Twilio phone number
MyMap.put("Body","Hey");  // text to include in message
MyMap.put("MediaUrl","www.picturelocation.com");  // location for pic to include in message
MyHeader = Map();  //create map for header information
EncodeCred = zoho.encryption.base64Encode("<Account SID>:<AuthToken>");  // encrypt Twilio Acct Credentials using base64 Encryption
MyHeader.put("Authorization","Basic " + EncodeCred);  // add credentials to Header map for the Authorization Basic key-value 
response = postUrl("https://api.twilio.com/2010-04-01/Accounts/<Account SID>/Messages.json/",MyMap,MyHeader);  // make postUrl call to Twilio with text and header map arguments at the end of the call

Hope this helps,
Thanks