SOLVED

Re: Send SMS with an emoji using Twilio webhook, comes through as plain text only?

Go to solution
KevinTruong
Level 2

Re: Send SMS with an emoji using Twilio webhook, comes through as plain text only?

Thanks @SanfordWhiteman I really appreciate the help.

 

I feel like I'm missing something incredibly obvious here though. How can the whole payload be URL encoded, and then the individual emoji token's encoding be set to none as you say in this comment? Wouldn't that break the emoji token?

SanfordWhiteman
Level 10 - Community Moderator

Re: Send SMS with an emoji using Twilio webhook, comes through as plain text only?

The whole payload isn’t URL-encoded. As you can see in the screenshot above, the Request Token Encoding is set to None. Therefore there's no secondary encoding pass done by Marketo. The encoding of each value is under your control (for better or for worse).

KevinTruong
Level 2

Re: Send SMS with an emoji using Twilio webhook, comes through as plain text only?

@SanfordWhiteman I think it has finally clicked for me. Posting up my final solution in case it helps anyone else reading this:

 

I found this site https://www.url-encode-decode.com/ that allows me to URL-encode a full SMS message with text and multiple emojis in one go:

 

KevinTruong_0-1702879480787.png

 

This pre-URL-encoded string can be pasted into a single token in Marketo making it compatible with my webhook format:

 

From=[phonenumber]&MessagingServiceSid=[account]={{lead.Mobile Phone Number:default=edit me}}&Body= Hi {{lead.First Name}}, {{my.SMS Message Body1}}

 

As long as the webhook is then set to Request Token Encoding = None as you say so it doesn't try to encode again, Twilio accepts it and sends the emojis properly.

 

Thanks so much for your help, I finally got there.