Automatically setting assignment group if caller is from a certain state

kenneth2k1
Kilo Expert

Hi all:

I can't quite figure out how to automatically set the assignments group is the person reporting the incident/request is from a certain state. We have a number of users who should be assigned to a specific assignment group if their user account lists their city as Portland. It doesn't look like this can be done by an assignment rule, does this have to be worked into the workflow? If so, could you help me with the script syntax?  

Thanks for any help or insight on this!

1 ACCEPTED SOLUTION

Yes I had noticed that too



I fixed it, yet it still wasn't working as expected. First, I have discovered that there will need to be different methods for incidents and requests.



For example, for incidents, a business rule will get overridden by an assignment rule. And for requests, a business rule or client script will be overridden by a script that is run in a workflow. We have auto assignment happening by assignment lookup rules, assignment rules, and workflows depending on request or incident. So the answer is tricky.



2015-02-26_15-49-10.jpg



With servicenow help desk's help, we have been able to get a resolution by using an assignment lookup rule that runs on the incident table to assign to the desired group if the location is "Portland." The order is set so that it is before any other rule that sets an assignment group. So the other suggestions made in this thread might have worked, but there are multiple ways to auto assign the group, and these assignment data lookup rules always take precedent



...except with requests. Working with SN on those, since the technician was also having a difficult time determining what takes precedent over what, and what the proper way might be to set these (currently setting them in the workflow will probably be the solution).


View solution in original post

24 REPLIES 24

kenneth2k1
Kilo Expert

I did some looking around and do I need to use the System Policy > Rules > Assignment?



Looks like I would need to script it, since none of the conditions have the current user's location (state). I am not any good at this scripting, but I am guessing I need something that looks like this:



if (myUserObject.getLocation() == "Portland")


      current.assginment_group.setDisplayValue("PortlandSupport");



Again any help is appreciated on this. Thanks,


Yes - you should use an assignment rule for this case. Instead of using script, you can use the Conditions and group field.


Thanks for the reply. I set up the conditions on our requested items and incident tables and tested. It appears that the workflow for the request catalog item can set this based on a script, and it's overriding these. I am able to see that in the actual workflow.



For incidents, we appear to be using a "record producer," and it appears to be assigning based on rules much like the requests. But I can't find what workflow the "record producer" is using. How do I see the workflow that a record producer uses?



Thanks!


record producers don't trigger a workflow look for a variable names assignment_group   it should have one of the below setting it...



  • default value
  • client script
  • ui policy script