Assignment Rules

Jon23
Mega Sage

I would like to use an assignment rule to assign an incident to the correct service desk group based on the callers geo location contained in the users record.

Any help on how to script this would be greatly appreciated - all my attempts have failed.

1 ACCEPTED SOLUTION

Jon23
Mega Sage

I have successfully used the following script to assign the group based on the users location.

var gr = new GlideRecord('sys_user');

if (gr.get(current.caller_id)){
var sd = gr.u_service_desk_geo;
current.assignment_group = sd;
}

However I am still having trouble setting the cmdb_ci value with the assignment rule script;

current.cmdb_ci = 'GSA';


View solution in original post

9 REPLIES 9

TJW2
Mega Guru

In your condition select 'Related Records'; very bottom of list and blue. This allows you to dot walk to related records.
Then select 'Caller'; this give you the User record field
Then select 'GEO Location'


Terri, thank you for your reply.

I initially tried using the related field and dot walking but for some reason it did not appear to work, also by using this method i would have to create an assignment rule for each service desk location.

Would using a script be more efficient as each users geo location value is their regions service desk group.


You could use a 'before' Business Rule. Assuming the GEO Location is a reference to the Groups table you could do the following:
current.assignment_group = current.caller_id.u_geo_location;

Is the Geo Location a reference to the Groups table?


Perfect, this works correctly when placed in the assignment rule and is cleaner looking than the get glide.record method I had used.