We are sending API driven SMS for things like product out of stock and order confirmation. The data being sent into our endpoint sometimes includes non GSM characters (like registered trademark), which fails the send. Normally, I would use something like a simple replace function to filter out those types of characters but MobileConnect is not letting me save the message with a non-gsm character, even when the character is in the ampscript so replace(TEXT,"®","") is not an option. How do you work around this?

  • What about following this approach, and adapt it into Ampscript: salesforce.stackexchange.com/questions/267247/… – Lukas Lunow Mar 10 at 16:14
  • nope - same issue. That requires that you declare a list of non gsm attributes in the code and then look for them in the message. I'm being blocked from saving the message with any non gsm character in the body, even if it's within the ampscript. – Matt Morris Mar 10 at 16:17
  • This is the other way around. This is a whitelist, not a blacklist – Lukas Lunow Mar 10 at 16:23
  • ah - yes, that would work - thanks for the answer here! I handled a bit differently but this is a good approach too. – Matt Morris Mar 10 at 16:40

Here's how I handled.
While I couldn't include the non GSM chars in the ampscript within the message, I can include them in a data extension. I built a data extension with key:value pairs and included a gsm compliant key and the non gsm value (example: key: 'reg', value: ®).
In the SMS ampscript, I'm looking the value up like this -

Set @reg = Lookup("NonGSMChars","Value","Key",'reg')

and am using the @reg value in my replace function -


Works like a charm!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.