AMPScript validation errors in SMS Message Subscriber Preview but message sends successfully
Trailblazer Community

AMPScript validation errors in SMS Message Subscriber Preview but message sends successfully

Marketing Cloud Mobile

Last updated 16 days ago ·Reference W-7605961 ·Reported By 2 users

In Review

Summary
When a SMS Message using AMPScript would be split into multiple message due to character length, the Subscriber Preview in Content Builder adds HTML to the preview causing an AMPScript validation error to be displayed. The actual message does not contain this HTML and will send successfully.

Repro
1. Create a data extension for mobile sending from contact builder
2. Create a look up data extension, or use synchronized data sources, to look up rows for a message
3. Create an SMS Message in Content Builder where a variable is set on the sending data extension and a lookuprows function is set on the LookUpRows function and text is then outputted in the message. A message of this length should be displayed as multiple messages in Content Builder Preview
4. Save Message, and click Subscriber Preview.
5. An error appears in the preview such as the one below

Invalid characters appear at the end of the parameter value Function Call: LookupRows("Contact__c_Salesforce","Id</span></div><div class="text-bubble"><span>",@contactId)

6. Note that Content Builder has added "</span></div><div class="text-bubble"><span>" to the message causing it to fail
7. Now navigate to Journey Builder and add the SMS Activity in a Journey. Note that there is no HTML between Id and @contactId in the message itself.
8. Activate Journey and observe SMS is sent successfully

Workaround
Send a test SMS message in Mobile Connect instead of using the Content Builder Subscriber Preview.

Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.