Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to assign incidents depend upon the user location?

gokulraj
Giga Expert

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.

27 REPLIES 27

matcher and setter.PNG



What is the use of matcher and setter?


Hi,



Matcher means your input fields ex: If impact is high and Urgency is High, then Priority is Critical.




So, in your case location will be matcher and assignment group will be setter field.




Thanks,


Hey Ashutosh Munot



Exactly ,but I don't know how to match that from where the matcher and fitter value will be available.?


HI,



You have to decide which location will have which assignment group.



Once you have that then you have to create this entries in this datalook up table.



See below link, this will help you.


Create custom data lookups



Thanks,


Mark it correct or Helpful


Dude, do yourself a favour and just create an assignment rule, they're literally designed to fulfil your requirement.



You can dot-walk into the user table to find the users location and then select the group they should be assigned to in the assign to tab.



find_real_file.png



You can either create a rule for each location or you can script multiple conditions in the script tab using syntax like below:



if (current.caller.location == "value 1")


current.assignment_group.setDisplayValue("assignment group 1");


else if (current.caller.location == "value 2")


current.assignment_group.setDisplayValue("assignment group 2");


else if (current.caller.location == "value 3")



etc etc