Render html links in Virtual Agent Table response (scripted)

Joseph Warner
Tera Guru

When I include a link, e.g., <a href="path/to/my/uri">Hello</a>, in the Virtual Agent Table response script, the link is displayed as plain text. How to allow Virtual Agent to render the link?

find_real_file.png

Below is my response configuration.

find_real_file.png

 

I have set the glide.html.sanitize_all_fields system property to false.

find_real_file.png

5 REPLIES 5

Joseph Warner1
Tera Contributor

I ended up using the Script response instead of the Table response, since I could not get links to work in Table response.

To make the table look decent visually, I added CSS to:

1. The html document <head>

2. Inline styling for the <table> itself

 

Script output response:

(function execute() {
  .....
  var html = '<html><head><style> td { margin: 15px 15px 15px 10px; padding: 10px 10px 10px 0px; text-align: left; }; th { text-align: left; margin-left: 0px; }; </style></head><body>';
  ....
  html += '<table border=1 frame=void rules=rows style="width: 78vw;"><thead style="text-align: left; color: #406770;"><tr>';
  ....
  html += '</table>';
  ....
  return html;
})()

 

Some of the CSS would simply not work correctly in the <head> section, so I placed in inline, otherwise I would have placed all of the CSS in the <head> section.