When an end user requests to get connected to live agent through Virtual Agent chat, the live agent can see the VA conversation transcript, including Knowledge articles user was presented with. However, some transcripts don’t list the knowledge articles, instead they show an error “OutputHtml content can not be transcribed”. 


Parsing error when trying to convert the following html to an image for agent. This is due to the content snippet for article is ending with an invalid HTML tag


Check which knowledge article that is returned when searching for the term is causing the issue.

Steps to identify the bad knowledge article :

  1. Find the sys_cb_topic/ sys_cs_topic which is being used to return the contextual search results.
  2. For each of the knowledge article that is returned when the search is performed, run the below script from scripts background :


var search_context_sys_id = '69a05b3853001300a9a2664906dc343f'; //this will be the sys_id of the contextual search used in the topic (variable name is search_context_sys_id)
var search_term = "email";  //search term used in virtual agent chat
var contextualSearch = new sn_itsm_va.VAContextualSearchUtil();
var response =, search_term);
var success = contextualSearch.processSearchResponse(response);
if (!success) {
var relevantSearchResults = contextualSearch.processGeneralResults(response, 20,0);
var kbResultCount = relevantSearchResults.length;
var search_kb_json_string = JSON.stringify(relevantSearchResults);
var kbJsonObj = JSON.parse(search_kb_json_string);

gs.print(kbJsonObj[0].snippet.substring(0,240));  // replace index of kbJsonObj with 0,1,2 etc based on the number of the articles returned



(For example in the above image, notice that only one article is returned. So we need to use kbJsonObj[0] to get the snippet for this article)

Check for the articles which are ending with an invalid tag in the print statement for snippet. (like <B)

3. Go to the knowledge article identified in Step 2, do a checkout on it and update the HTML content of it to remove the additional spaces so that the snippet would end with a valid html tag.

4. Publish the article with the modifications. Verify that the chat_queue_entry that is created now has the valid transcript in the worknotes.



Article Information

Last Updated:2020-01-03 10:30:39