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,

I'm the author of Queue Manager. Queue Manager does have the concept of 'availability' for queues. If a user (or their manager) visits the 'My Queues' or 'My Managed Queues' module in the left nav, you can set the available flag to true/false for a given user. The workload calculation and assignment is only calculated across members of the queue that are currently available.

At present, there is no option to set a schedule on a particular queue or user. Availability depends on a user manually checking in/out of a queue. You could setup scheduled jobs to automatically set the flag for users, or the app could be updated to accommodate a schedule.

Queue Manager hasn't been updated since 2014, and I'm very glad it's still adding some value in the field. I have received a few enhancement requests in recent weeks, and I'd love to add them to the app. I cannot promise a time frame, but I will update this thread if an update becomes available.

Thanks!

itstk
Tera Contributor
Hello Ben:

Thanks for your contribution. As you comment you can not do the balancing for the hours of work of each operator. However, is there any service complement that allows me to fulfill this need?

ben_hollifield
Tera Guru

The platform would be your service complement. You could setup a basic scheduled job to make the users 'available'/'unavailable' according to your schedule. Another user had success using Chuck Tomasi's Scriptless Scheduled Jobs app to do this, so you may want to look into that.

itstk
Tera Contributor

Hello Ben:

I'm new to servicenow, what would the script be like to call a user's schedule and be compared to the current date and time? Since I see that the name of the schedule is the one associated with the user (sys_User table -> cmn_schedule) but the name of the schedule is linked to the table cmn_schedule_span -> cmn_schedule. Please your support or someone from the community to help me with this.