Capturing VA Conversation in Incident

chrish5
Giga Guru

Hi Community,

I've been creating virtual agent conversation and the end of conversations usually end with the customer being able to open an incident if they are not fully satisfied with the help provided.   Is there an easy way to capture the history of the conversation between the customer and the virtual agent in the incident created.  Right now it's just capturing basic information like the caller, short description, description and CI show below.  It would helpful to the Service Desk person receiving the incident to be able to see the entire conversation to see what resolution options were presented to the customer and what options the customer selected.  Can this be captured in the incident?

 

chrish5_0-1668783434198.png

 


Thanks,

Chris

3 REPLIES 3

Dharmaraj Binna
Tera Guru

Hi Chris,

 

You can achieve this by creating an after-update BR on the interaction table with the BR condition set to 

the transcript is not empty.

 

(function executeRule(current, previous /*null when async*/ ) {

// Add your code here
var query = "document_table=incident^interaction.number=" + current.number;
var gr = new GlideRecord("interaction_related_record");
gr.addEncodedQuery(query);
gr.query();
if (gr.next()) {

var inc = new GlideRecord("incident");
if (inc.get(gr.task.sys_id)) {
inc.work_notes = current.transcript + "";
inc.update();
}

}

})(current, previous);

 

Please mark this as the correct answer and helpful if it is resolved, or mark this helpful if this helps you to reach towards the solution.

 

Regards,

Dharmaraj

Hi Dharmaraj, 

I just used what you gave me straight up.  I'm not seeing anything being posted in related incidents work_notes.  This may be because I did not add any code/encoded query to what you provided.  What else needs to be added to this.  Sorry for my lack of coding experience.  

Hi Chrish,

Can you please let me know what is the Document type for the record created in the "interaction_related_record" table? You can put the incident number in task field as a filter to fetch the record.