- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-01-2022 04:30 AM
Hello All,
We are on Rome version and using virtual agent live chat as well as walk up modules.
When agent is creating an incident from agent workspace for an interaction it should set contact type as Virtual Agent when type is chat however, it should set contact type as walk-in when type is walk up.
From KB I got to know that create incident UI action needs to be modified for this.
UI action is written on Interaction table, I have used below script however, its showing Virtual agent as contact type for walk up as well. Can anyone please correct this?
var inc = new GlideRecord("incident");
inc.initialize();
inc.caller_id = current.opened_for;
inc.short_description = current.short_description;
if(type =='chat')
{inc.contact_type = "6";}
if(type =='walk-up')
{inc.contact_type = "5";}
action.openGlideRecord(inc);
Please help to fix this one.
TIA
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-01-2022 04:36 AM
Hi,
the value of type on iteration is different, it doesn't have the -
So your code should be something like below
var inc = new GlideRecord("incident");
inc.initialize();
inc.caller_id = current.opened_for;
inc.short_description = current.short_description;
if(current.type =='chat')
{inc.contact_type = "6";}
if(current.type =='walkup')
{inc.contact_type = "5";}
action.openGlideRecord(inc);
-Anurag
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-01-2022 04:36 AM
Hi,
the value of type on iteration is different, it doesn't have the -
So your code should be something like below
var inc = new GlideRecord("incident");
inc.initialize();
inc.caller_id = current.opened_for;
inc.short_description = current.short_description;
if(current.type =='chat')
{inc.contact_type = "6";}
if(current.type =='walkup')
{inc.contact_type = "5";}
action.openGlideRecord(inc);
-Anurag
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2022 06:58 AM
Did this get fixed?
Am looking at the proposed solution but:
a) changing the ui action Create Incident is not working (Rome)
b) not sure why inc.contact_type is set above as a numeric when values are text, e,.g. walk-in
I believe the fix is actually in the UI Page incident_confirmation, not in the ui action?
see https://community.servicenow.com/community?id=community_question&sys_id=4210e36edb1be300b1b102d5ca961993