Auto Assign - HR Case Count

Terence Riley
Tera Contributor

Currently, when an HR case is auto-assigned to one of our agents, it counts all active cases, including cases in the Awaiting Acceptance state.  We would like to remove Awaiting Acceptance from the case count.  What would be the best way to accomplish this?

1 ACCEPTED SOLUTION

@Terence Riley 

 

How about adding a line after the 240th line that checks for the case state, something like count.addQuery('state', '!=', 'state_value');

you could also try count.addEncodedQuery("state!=state_value");

 

*state_value for the Awaiting Acceptance

 

if my answer has helped with your question, please mark my answer as an accepted solution and give a thumbs up.

 

Kind regards

Misgana D.

View solution in original post

9 REPLIES 9

Misgana D Dauro
Giga Guru

Hello @Terence Riley,

 

Am guessing you are using AWA (Advanced Work Assignment) for auto-assigning cases to an agent if that's the case you need to add a condition in your queue to exclude cases that are in the Awaiting Acceptance state.

 

if my answer has helped with your question, please mark my answer as an accepted solution and give a thumbs up.

 

Kind regards

Misgana D.

No, I am not using AWA.  I am using the OOB  automatic case assignment feature/Auto Assign Business Rule to assign an HR case to an agent. It assigns the case to the agent with the least number of Active cases assigned. I believe the case count is in the Assignment script include "hr_AssignmentUtil".  See line 240 in the image below.  It is counting Active cases.  How can we exclude cases in the Awaiting Acceptance state even though they are active?

 

 

TerenceRiley_0-1695736328180.png

 

@Terence Riley 

 

How about adding a line after the 240th line that checks for the case state, something like count.addQuery('state', '!=', 'state_value');

you could also try count.addEncodedQuery("state!=state_value");

 

*state_value for the Awaiting Acceptance

 

if my answer has helped with your question, please mark my answer as an accepted solution and give a thumbs up.

 

Kind regards

Misgana D.

We would like to avoid changing the fundamental/OOTB/core scripts.  Is there another workaround?

Terence Riley
Tera Contributor

Here is the product documentation link to Assignment and matching rules in HR.

 

https://docs.servicenow.com/bundle/utah-employee-service-management/page/product/human-resources/con...