How can I copy agent chat transcript to incident work note?

Chaitanya Kanti
Kilo Contributor

Is there any way to copy the interaction transcript to the Incident work notes? I tried the below-mentioned code in create incident UI action on interaction table and not working. And I am also trying to move the attachments attached in the chat to incident tickets. Please let me know how to solve these issues.

if(current.update()){
	var inc = new GlideRecord("incident");
	inc.initialize();
	inc.caller_id = current.opened_for;
        inc.work_notes = current.transcript;
	inc.contact_type = current.type;
	inc.short_description = current.short_description;
	action.openGlideRecord(inc);
}
13 REPLIES 13

Hi Nayan, I was trying this solution and realised it works only if there is an existing relationship between the interaction and incident.

Creation of record on 'interaction_related_record' table is event driven, hence we cant depend on the above BR if the incident is not already created.

Hi Vijay,

 

I am not sure what you mean here? I have written this BR in our project and it is working perfectly fine. So when you create an incident from an interaction record, OOB creates a relationship between interaction and that task record that an incident in this case.

So when interaction gets closed this BR will update the same. Thanks.

 

Regards,

Nayan

Hi @Nayana ,

 

I have tried the solution but the transcription is getting added twice. 

did you find the solution why transcription is added twice?

Hi, there,

Can you please make sure you have added the proper conditions in the BR?

In my BR, below are the conditions being added.

 

NayanMahato_0-1680649989613.png

Regards,

Nayan