ServiceNow Virtual Agent: Script/Method to append customized long transcript to Interaction Table?

eleveneric
Tera Contributor

Hi all,

Currently I'm working on the Virtual Agent, I need to add more details for the conversation between users and VAs before handing over to a real representative.

 

Here is the processing:

After user type the query, I will make api calls to some endpoint and get the response to show, my question is:

After I get the response and assign like var name "apiResponse":

 

if using the following directly in the script, it is not append to the transcript inside Interaction table and I even can't find the API_Response value fron background script.

var apiResponse = some result from API Endpoint;

var transData = JSON.stringify({ apiResponse: apiResponse });
gs.getSession().putClientData('API_Response', transData );
 
If using transcript function inside custom control, it showing error Custom ControlData content can not be transcribed. If due to size limiation(the api response might be large), is there any alternative way to save?
 
Would appreicate if any help.
0 REPLIES 0