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?
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!