Round Robin Assignment Rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2020 02:43 AM
How can I create an assignment rule on the task and incident table both so that the rule can assign incidents and the tasks to the a particular group in Servicenow.
Also, the assignment of the tickets (both task and the incident) should follow a Round Robin style of assignment.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-08-2021 10:16 AM
You may want to consider Advanced Work Assignment (AWA). It is one of the most powerful capabilities of Agent Workspace. AWA relies on Presence States to know which agents are currently available to handle tickets.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-01-2021 09:10 AM
Hi Amitroy,
One simple way to do this would be to use a script like this one below in a business rule that gets trigerred whenever a new incident / task get created. You would first need to create the system property "rr.last_assigned_to" to keep track of the last person to get an assignment. Then update line 3 with the sys_id of the group or groups the users are in.
(function executeRule(current, previous /*null when async*/) {
var GRPSYS_ID = '7965715edba02300c895d6aa489619dd'; //Put the sys_id of the assignment group (or groups comma separated) here. Or set this in a system property and grab it here.
var lstAssigned = gs.getProperty("rr.last_assigned_to"); //Get the sys_id of the user most recently assigned to by this rule.
//Make an array of all users in the group(s), ordered alphabetically by name:
var userList = [];
var userHasGroup = new GlideRecord('sys_user_grmember');
userHasGroup.addQuery('user.active', true);
userHasGroup.addQuery('group', 'IN', GRPSYS_ID);
userHasGroup.orderBy('user.name');
userHasGroup.query();
while (userHasGroup.next())
userList.push(userHasGroup.getValue('user'));
var nextUserIndex = userList.indexOf(lstAssigned) + 1;
if (nextUserIndex == userList.length)
nextUserIndex = 0;
var nextUser = userList[nextUserIndex];
current.assigned_to = nextUser;
gs.setProperty("rr.last_assigned_to", nextUser); //Update the property with the sys_id of the user most recently assigned to by this rule.
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-29-2021 08:47 AM
Hi Jamsta,
Thanks so much for the above the suggestion, but I'm not clear on the first part: how do I establish the rr.last_assigned_to system property and fill it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-29-2021 09:27 AM
Hi,
Go to the system properties table in you instance:
[Your instance].service-now.com/nav_to.do?uri=%2Fsys_properties_list.do
Click NEW. Give the new property the name rr.last_assigned_to, make sure the type is set to 'string', click submit and you're all set.
There is also some more info on system properties in the docs, here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-01-2021 06:03 AM
This works perfectly, thank you so much for your help!
I have found one more question, though. If I have multiple groups, each of which wants their own separate round robin assignment... I noticed when adding multiple group sys IDs to the business rule that assignment round robins between all members of all groups. If I want discrete round robins for singular groups, then I make a separate business rule for each, yes? Do I also need to create separate versions of rr.last_assigned_to for each rota?
Is there a better way to go about it, or am I headed down the right path with multiple business rules and system properties?