Routing Assignment Rules
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2025 09:20 AM
Hello I am trying to route assignment rule to a specific group if the physical location selected is not associated with a group with a class of "CFP". These groups are in the sys_user_group table. Is there a way to check this table and to only rout to groups that dont have a class of CFP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2025 07:56 AM
can you help with the script please?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2025 08:02 AM
@DreDay3000 it's customised process 😕 I miss the context...
How is the location evaluated? Based on Caller, Opened By, Assignment group's location, ...... or what is stored in "u_m2m_Groups_Locations"???
It will be two GlideRecords - check for the location - but whose? And this location to be searched in the custom table and it will either be true or false..
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2025 08:10 AM
Hi @DreDay3000 ,
As per my Understanding you need a script but why let go through that
* The standard assignment rule UI condition builder can’t do subqueries or lookups against sys_user_group to check “if there is NOT a group with class CFP for that physical location.”
* So: you use a script condition or scripted assignment rule.
How to do it: scripted assignment rule
In the assignment rule:
* Use the Script tab.
* Write a script to:
* Find if there is a group whose u_class (or class) = CFP and whose location matches the incident location.
* If found, return false → don’t apply this rule.
* If not found, return true → apply this rule and assign to your fallback group.
Then:
* In the Assign To tab of the assignment rule, pick the fallback group you want the incident assigned to when there is no CFP group.
Verify field names
* Check if your group table uses:
* class or u_class
* and location field exists and is used for matching.
* Update script accordingly.
Why this works:
* Script returns true → rule applies → incident gets routed to fallback group.
* Script returns false → rule skipped → you can have other assignment rules handle CFP cases.
Please appreciate the efforts of community contributors by marking appropriate response as Mark my Answer Helpful or Accept Solution this may help other community users to follow correct solution in future.
Thank You
AJ - TechTrek with AJ - ITOM Trainer
LinkedIn:- https://www.linkedin.com/in/ajay-kumar-66a91385/
YouTube:- https://www.youtube.com/@learnitomwithaj
Topmate:- https://topmate.io/aj_techtrekwithaj (Connect for 1-1 Session)
ServiceNow Community MVP 2025