Assignment of ticket for workload and work schedule

itstk
Tera Contributor

Hello,
I have a problem with the car assigning a ticket to a group, which is assigned by workload and according to the work schedule of each operator.
I'm using queue manager, but this assigns me to all the operators of a group by workload but there is no way to set the work schedule.

For example. I create a ticket and this assigns me to someone from the group configured in queue manager but when some of these operators ends their turn and only one is left in charge, the system keeps balancing the load for everyone. How can I make this balancing depend on the working hours of each operator?

 

1 ACCEPTED SOLUTION

ben_hollifield
Tera Guru

Hey itstk,

Fortunately, there is a working API for comparing schedules to times in ServiceNow - this will do much of the work for you. In order to see if the current date/time falls into a particular schedule, you would do something like this, where isInSchedule is true/false:

var sched = new GlideSchedule([scheduleSysId]);
var now = new GlideDateTime();
var isInSched = sched.isInSchedule(now)

Armed with that bit of code, the best approach is probably to update the 'QM - Process Queue Manager Rules' business rule to look at this flag when calculating the queue weights for the 'available' members of the group. There is already a step in the rule to remove any 'unavailable' resources - you could simply add your logic there.

I hope that helps!

View solution in original post

5 REPLIES 5

ben_hollifield
Tera Guru

Hey itstk,

Fortunately, there is a working API for comparing schedules to times in ServiceNow - this will do much of the work for you. In order to see if the current date/time falls into a particular schedule, you would do something like this, where isInSchedule is true/false:

var sched = new GlideSchedule([scheduleSysId]);
var now = new GlideDateTime();
var isInSched = sched.isInSchedule(now)

Armed with that bit of code, the best approach is probably to update the 'QM - Process Queue Manager Rules' business rule to look at this flag when calculating the queue weights for the 'available' members of the group. There is already a step in the rule to remove any 'unavailable' resources - you could simply add your logic there.

I hope that helps!