How to auto-assign an incident ticket to an specific support group after normal working hours?

feibian
Kilo Contributor

Hi Everyone

I would like to know if Is there a way I can route to an specific group of high/critical tickets that are received outside of normal working hours?

Scenario:  

7 am to 7 pm tickets should be routed to "AAA support group"

7 pm to 7 am and weekends high/critical tickets should be routed to "BBB support group"

Your help on this will be appreciated

Fabian GR

1 ACCEPTED SOLUTION

Neither of those will work, for two different reasons.



Use the below, EXACTLY as is:



var g = new GlideRecord('cmn_schedule');


g.addQuery('name', 'Normal working hours');


g.query();


if (g.next()) {


    var sched = new GlideSchedule(g.sys_id);


    var d = new GlideDateTime();


    if (sched.isInSchedule(d))


        current.assignment_group.setDisplayValue("C360 Ops Triage");


    else


        current.assignment_group.setDisplayValue("PEGA-Coverage Review");


}


View solution in original post

16 REPLIES 16

Neither of those will work, for two different reasons.



Use the below, EXACTLY as is:



var g = new GlideRecord('cmn_schedule');


g.addQuery('name', 'Normal working hours');


g.query();


if (g.next()) {


    var sched = new GlideSchedule(g.sys_id);


    var d = new GlideDateTime();


    if (sched.isInSchedule(d))


        current.assignment_group.setDisplayValue("C360 Ops Triage");


    else


        current.assignment_group.setDisplayValue("PEGA-Coverage Review");


}


Bingo!!!! It worked



Thank you some much for all your support, you rock!!!


Great! Happy to help



Please remember to mark my last reply as the correct answer so others can find and use this thread in future.



Sent from my iPhone


Dave Smith1
ServiceNow Employee
ServiceNow Employee

Fabian Galdamez wrote:



Scenario:



7 am to 7 pm tickets should be routed to "AAA support group"


7 pm to 7 am and weekends high/critical tickets should be routed to "BBB support group"


As a matter of interest... what happens if a ticket is routed to BBB group at 6am and an hour later they go off-shift?   Is that ticket ignored for 12 hours until BBB group come back on-shift?


Good point Dave,



I appreciated your observation on this