- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2020 01:30 AM
Hello,
There is an OOB automatic assignment of HR Case to a member of group who has the least task. But I notice that the case can be assigned to the same person who opened it.
Is there a way to prevent this?
Thanks so much. Appreciate all the help.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2020 07:27 AM
Hi Evren,
I have adjusted the business rule and this is working for me with the default Matching rules:
(function executeRule(current, previous /*null when async*/) {
if (current.skip_auto_assign)
return; // assignment will be done via other means than this BR (e.g., workflow, manual)
// see "Matching Rules" menu item / module to configure assignment rules
var matchingRuleProcessor = new global.MatchingRuleProcessor();
var agents = matchingRuleProcessor.processAndGetCandidates(current, '2' ,'' ,'' ,true);
if (agents && agents.length > 0) {
current.assigned_to = agents[0];
if (agents[0]==current.opened_by && agents[1]){
current.assigned_to = agents[1];
}
else{
current.assigned_to = agents[0];
}
gs.addInfoMessage(gs.getMessage('{0} was assigned to {1}.', [current.number, current.getDisplayValue('assigned_to')]));
} else
gs.addInfoMessage(gs.getMessage('No agents meet the auto-assignment criteria for {0}', current.number));
})(current, previous);
Can you try one last time? It is looking at the opened by, if that is the Agent it was initially assigning, it will assign to the 2nd result if we have it, that is what you want right?
As a fallback, if no secondary agent is found, it will use the default assignment and assign that agent.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2020 07:27 AM
Hi Evren,
I have adjusted the business rule and this is working for me with the default Matching rules:
(function executeRule(current, previous /*null when async*/) {
if (current.skip_auto_assign)
return; // assignment will be done via other means than this BR (e.g., workflow, manual)
// see "Matching Rules" menu item / module to configure assignment rules
var matchingRuleProcessor = new global.MatchingRuleProcessor();
var agents = matchingRuleProcessor.processAndGetCandidates(current, '2' ,'' ,'' ,true);
if (agents && agents.length > 0) {
current.assigned_to = agents[0];
if (agents[0]==current.opened_by && agents[1]){
current.assigned_to = agents[1];
}
else{
current.assigned_to = agents[0];
}
gs.addInfoMessage(gs.getMessage('{0} was assigned to {1}.', [current.number, current.getDisplayValue('assigned_to')]));
} else
gs.addInfoMessage(gs.getMessage('No agents meet the auto-assignment criteria for {0}', current.number));
})(current, previous);
Can you try one last time? It is looking at the opened by, if that is the Agent it was initially assigning, it will assign to the 2nd result if we have it, that is what you want right?
As a fallback, if no secondary agent is found, it will use the default assignment and assign that agent.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2020 07:50 AM
Hi Willem, it's working now. It assigns to the other member of the group with the same skills.
This is good for me. Thank you so much.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2020 01:38 AM
Hi
Check the assignment rules (Routing and Assignment -> Assignment rules). If this is handled from here, then you can add a condition to not assign to the opened by user.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2020 03:00 AM
Hi asifnoor,
I've seen the assignment rules and it just assigns to the group. The assignment of members are done when the state of the case is on "Ready".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2020 02:51 AM
Hi,
The base system uses the automatic case assignment feature to assign an HR case to an agent. It attempts to assign an agent with the least number of cases assigned, has the skills required by the case, and matches the location of the subject person.
Check below link
If my answer helped you in any way, mark answer as helpful and correct.
Thanks and regards,
Megha