How to assign incidents depend upon the user location?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2018 05:31 AM
Hi all,
I have a requirement to assign the assignment group automatically for all incidents depends on the user location.I need a script for this.Please, suggest your ideas.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2018 05:36 AM
Hi Gokulraj,
You can create a datalookup rules for this instead of code.
Where is this mapping store?
Anyways if you want code then see below:
Business Rule:
BEfore Insert:
var gr = new GlideRecord('custom table where mapping store');
gr.addQuery('location field',current.caller_id.location);
gr.query();
if(gr.next())
{
current.assignment_group = gr.group_field in custom table;
}
Code is just for INFO. BUT use datalook up rules.
Thanks,
Ashutosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2018 05:37 AM
Hi Gokulraj,
You can do this with assignment rules quite easily.
Go to System Policy > Rules > Assignment and you can set them up in there. You can either create a rule for each location by dot-walking to the caller fields in the filter conditions or you can write a script, the script tab has an example format that you could very easily modify.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2018 05:55 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2018 05:57 AM
Hi,
Did you created Assignment rules?
If yes, then you have to add records there depending upon your requirement.
For example: Location is ABC then Assignment group is Service Desk.
Then go create new incident with location as ABC and see you assignment group will be Service Desk.
Thanks,