- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2014 04:25 AM
HI All,
I was asked to create a round-robin type approach (Auto Assignment) for any incidents/tasks that come into our two level1 groups. What we are looking for is that if its sent to team A's group it will auto assign to the next team member in line, and same with Team B. I have searched the forums and found a post back from 2008 but it had been deleted by ServiceNow in 2010. Our company is new to ServiceNow (a couple months now), and I am guessing this is more of a script that would need to run, but currently do not have much experience in scripting. Has anyone had any luck with doing something like this? Any suggestions would be greatly appreciated!
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2014 03:07 PM
We have this in our instance. Here's the breakdown:
On sys_user, create a date/time field to track last ticket assigned. Also create a checkbox that will be used to determine if the user can receive a ticket. This can be your vacation exclusion logic.
1. Make an array (associative, key-value) to contain your users that will receive tickets and their corresponding last ticket assigned timestamp.
2. Find your assignment group, and query it's users.
3. Push those users and timestamp into the user array from 1. You can conditionalize here with the checkbox to make sure you are only pushing 'active' users into the array.
4. Sort the array by timestamp, return the user that has the oldest timestamp.
4.5. Update the user's timestamp.
5. assigned_to = returned user.
Please let me know if you have any questions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2016 06:29 AM
Hi David,
Hope you have figured out how to upload a PDF. Would you be able to share the details now ?
Alternatively you can send me an email - Sharanabasava.hugar@gmail.com
Thank you,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2016 04:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2016 07:14 AM
Thank you for the code, David!
Can you (or anyone else) please explain which section of the code updates the Assigned To field in the incident or task interface? Although my "last assigned" fields are updating on the user side, Assigned To isn't updating, so there's no visual indicator as to who actually has the ticket.
Will this automatic assignment still trigger email notifications to the new ticket handler?
I've used David's code almost to the letter.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2016 10:29 AM
Sure, it's in the Business Rule, and the code is: current.assigned_to = resolveTech();
resolveTech() is what starts the whole thing in motion.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2016 10:41 AM
Okay, thanks! It's been a long time since I've worked with JavaScript, so please pardon the questions...
The called function resolveTech should be finding the sys_id of the technician to handle the ticket. Assigned To should update with the sys_id of that technician.
It's the latter part which doesn't appear to be working for me.
1. I've added the table elements as defined by your exceedingly helpful guide.
2. I've flagged three technicians as round robin active; I'll call them Joe, Sam, and Paul. They're members of the Desktop group.
3. I submit an incident to the Desktop group. I can see Joe's "last ticket assigned" value is properly calculated and logged. If I submit more incidents, the round robin works beautifully, assigning tickets to the other techs and handing out values for "last ticket assigned" -- no problems at all with this part. I can never see anyone's names in the Assigned To field, though.
Any idea why that might be?
I'm on Helsinki, for what it's worth.