Auto Assign HR case based on Alphabetical List

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2024 07:43 AM
I have a requirement to auto assign a case to a particular HR agent based on an alphabetical list. For example:
1. Agent 1 handles cases with a subject person with last name of A-M.
2. Agent 2 handles cases with a subject person with last name of N-Z.
How would I go about setting this up? Assignment rules? Advanced Work Assignment? I am just not sure of the best way to do this nor how to do it. Thanks!
- Labels:
-
Human Resources Service Delivery

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2024 07:57 AM
Hi @Cathy Ball I would caution this process due to the query it will require adding overhead to performance and other factors. Not that this query to look at the name will bring the system to its knees, but you are now using additional logic that concerns me. In addition to this, AWA offers some very nice features to accommodate for Capacity, Skills and the like so setting up something like this will totally impact any adoption of the features we use to make assignments very precise (like the PI suggestions and Agent Affinity). Again, just trying to give some guidance to keep you on a good path to consume the many features we offer to deliver a great experience.
Regards,
Mike

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2024 09:25 AM
@Cathy Ball Business rule can be one of the ways to achieve this.
I have created one sample for you which you can try on one of your dev/sandbox instance to test.
Here is the script.
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var userLastNameChar = current.subject_person.last_name.toUpperCase().charAt(0);//get subject person's first letter of last name
var firstAssigneeRange = ['A','B','C','D','E','F','G','H','I','J','K','L','M'];
var secondAssigneeRange = ['N','O','P','Q','R','S','T','U','V','W','X','Y','Z'];
if(firstAssigneeRange.indexOf(userLastNameChar)>-1){
current.setValue('assigned_to','7a8929983b9c445052ca655593efc440'); //Replace with sys_id of Agent 1
}
else if(secondAssigneeRange.indexOf(userLastNameChar)>-1){
current.setValue('assigned_to','3a8965143b1c445052ca655593efc4e6'); //Replace with sys_id of Agent 2
}
})(current, previous);
Hope this helps.