Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Paragraph or Line Breaks in SMS Treatments do not work

SA-104059

Summary



An SMS Treatment is created with Paragraph Line Breaks. The treatment does not transpose on using the SMS Shape in the Pega Marketing Offer Flow or Sending Seed Test, and displays incorrectly on the device.

For example, 

The below Treatment, 

"Hello,

This is a test message with paragraphs

The End"

displays as, "HelloThis is a test message with paragraphsThe End"



Error Messages



Not Applicable


Steps to Reproduce

  1. Create an SMS Treatment with Paragraph or Line Breaks

    For example,

    "Hello,

    This is a test message with paragraphs

    The End"

     
  2. Send an SMS Message using Seed Test. The treatment displays as below:

    "HelloThis is a test message with paragraphsThe End"


Root Cause



PegaMarketing does not handle line breaks (such as, <br /> tag or any other equivalent) because all SMS Providers do not support them.
In the PegaMKT-Work-Offer.DeliverSMS activity, a Java Function is present with the below line, which removes line breaks,
getStreamResults = getStreamResults.replaceAll("\\s+", " ");


Resolution



Perform the following local-change:
  1. Save As the PegaMKT-Work-Offer.DeliverSMS activity to a custom ruleset.
  2. Remove the below line to support the functionality of sending SMS with line breaks.

    getStreamResults = getStreamResults.replaceAll("\\s+", " ");

Published March 27, 2020 - Updated December 2, 2021

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us