Incident assignment based on keywords associated with groups

Michal Sadowski
Mega Sage

Hey ServiceNow superstars!

The requirement is to auto-assign incidents, when they are first created, based on the presence of specific keywords in Short description or Description. One group will only have one assignment keyword. Second requirement is that this is easily maintainable in case keywords change or new groups are added that have new keywords associated. Third requirement is that it does not negatively impact performance.

Would it make sense to:

1.  Create a column in sys_user_group called Assignment keyword where keywords are stored for easy administration

2. Have a business rule on Inset that a) checks Short Description and Description for keywords b) if it finds a match, it assign the correct Assignment group...

 

Or would you approach it differently?

Also, below is how far I've come with the business rule. It's obviously hard-coded for one specific keyword-group pair. How would you go about making this dynamic?

(function executeRule(current, previous /*null when async*/) {

if (current.short_description.indexOf("#hardware")>-1) // "#hardware" would need to become a variable based on possible assignment keywords
{
  current.assignment_group.setDisplayValue('Hardware'); // 'Hardware' would need to become a variable based on Assignment group that matches the assignment keyword

} else {
 current.assignment_group.setDisplayValue('Help Desk');}	// Add your code here

})(current, previous);

Kind regards

 

 

4 REPLIES 4

Saurav11
Kilo Patron
Kilo Patron

Hello

Yes create a field om group table would be my approach as it is easily maintained

For the logic just use gliderecord to group table then query short description contqins the newly field name and populate assignment grp with the value returned

Please mark answer correct/helpful based on impact

scott barnard1
Kilo Sage

 

You can always create a ajax script include and pass the keywords back as parameters and return the assignemnt group based on whatever logic defines it

Sushma R1
Tera Expert
I would say use the field already exists on group table a similar one is present already 🙂

PRASHANTH  K CH
Tera Expert

Create new field on Assignment group table and Store the values(Keywords) on that field.

And Write Business rule on gliderecord to group table then query short description contains the newly field name and populate assignment grp with the value returned in Keyword on Short description.