Agent Chat - Copy Interaction to Incident
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2020 07:23 AM
When testing Connect Support, I think I recall being able to create an Incident (as a Quick Action) which carried across into the Incident record the chat dialogue (cant recall what happened to any attachments exchanged during the Connect Chat dialogue).
Now we have bypassed Connect support and moved to implement Agent Chat (via Agent Workspace). Now when you create an Incident from a Chat (Interaction), the chat dialogue is no longer transferred to the Incident and there is no apparent link to the Interaction within the Incident record so that initial exchange of information is 'lost'. If i look at the Interactions table, i can see within the individual Interaction the Incident is listed as a Related Task.
Is it possible to capture the Interaction (chat dialogue) within the Incident record?
Is it then possible to automatically set the Contact Type when creating the Incident from a Chat interaction?
- Labels:
-
Agent Workspace

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2020 07:38 AM
HI,
See my response below:
Is it possible to capture the Interaction (chat dialogue) within the Incident record? This is possible you need to go to Create Incident UI action on Interaction table and add this below line which will copy the whole conversation to incident worknote.
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);
}
Is it then possible to automatically set the Contact Type when creating the Incident from a Chat interaction?
See above code to set contact type as well.
Thanks,
Ashutosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-26-2020 01:09 AM
Hi Ashutosh,
Thanks for your response, however, while the contact type is being set, the chat transcript is not being copied into the Incident Work Notes.
Is this as a result of the Interaction transcript not being actually written to the Interaction record until the Chat is 'Ended'?
Ideally, I want the full transcript, including and conversation after the Agent has created the Incident, to be copied into the Incident record as well as any attachments received from the user and any sent by the Service Desk agent.
Is this possible?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-26-2020 01:57 AM
HI,
Yes the transcript is only available if the interaction is closed and not before that.
You have to write a BR on interaction table which will trigger after the state changes to closed complete and then it will copy the transcript from interaction to related task for that interaction.
Then the attachment then stored as media. It uses this APi /api/now/v2/cs/media
to send images.
Thakns,
Ashutosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-09-2021 10:54 AM
I'm looking to set this up. Here's my script. I already have everything else in my Create Incident UI Action and added this line below:
inc.work_notes = current.transcript;
All other fields get set as expected. I put current.transcript below current.short_description then moved it above and below current.work_notes.getJournalEntry(-1) and even commented out current.work_notes.getJournalEntry(-1) to confirm this was affecting the transcript from being copied over.
var inc = new GlideRecord("incident");
inc.initialize();
inc.caller_id = current.opened_for;
inc.short_description = current.short_description;
inc.assigned_to = current.assigned_to;
inc.assignment_group = current.assignment_group;
inc.contact_type = current.type;
inc.insert();
//copying worknotes and additional comments from IMS to INC
inc.work_notes = current.work_notes.getJournalEntry(-1);
inc.work_notes = current.transcript;
//copy attachments from IMS to INC
GlideSysAttachment.copy('interaction', current.sys_id, 'incident', inc.sys_id);
inc.update();
action.openGlideRecord(inc);
The transcript is not getting copied from the Interaction to the Incident. Is there something other than current.transcript I should use? Just to note, when I create a new Interaction, enter Work Notes in the Interaction then create the incident, inc.work_notes = current.work_notes.getJournalEntry(-1); successfully copies these Work Notes over.