How to send HTML in Digital Messaging client channel API

I am looking to be able to send richer content through the client channel API when utilising a chat bot.

By default, it appears that all HTML content setup in a paragraph rule is stripped out when the chat bot responds on the client channel API - I would like to be able to provide some simpler tags such as formatting, links and lists.

@Phill99J

I hope you can use Pega Push to send the links. Please find the document below to configure Page Push.

@RameshSangili Hi, I am specifically looking for chat bot messages, not pushing content as CSR’s. Thanks

@Phill99J Try checking pyGenericTemplate DT . you can modify it as per your requirement.

Also try to see the Digital message configuration.

you can also check mixins.

@Abhishek942 Hi - thanks for this. The Custom DT approach did the trick - this maintains the captured HTML elements rather than stripping out like text.

@Phill99J Thanks for the update. Yes I tried having a simple html like this earlier and it works.

But when I tried to include a more complex html (like a table) it doesn’t work. Like the one below,

<table border='1'><tr><th>Header</th></tr><tr><td>Row 1</td></tr><tr><td>Row 2</td></tr><tr><td>Row 3</td></tr></table>

So was just wondering if you tried embedding a table or something similar.

@ShreeramK4150 Not personally - best to open a new, unsolved question and see if anyone has.

@Phill99JWe are looking to implement a similar use case. Would you be able to share how you embedded HTML into the custom DT.

@ShreeramK4150 Hi, you can just include HTML content inside the response properties within the custom DT when creating outbound messages. In theory this could be sourced from anywhere such as Paragraph etc. Please see below quick example.

Content in the example 1.1.1 step is:

"<p>Sample HTML Content<br /> <br /><strong>Test strong</strong><br /> <br /><a href=\"http://www.google.co.uk\" target=\"_blank\">Test URL</a></p>"

@Phill99J Thanks for your update. Appreciate it.