Some PDIs are currently unavailable, and PDI actions are paused. View the latest updates here. Read More

Self Service Incident based on capacity

dhivyal94299399
Tera Contributor

Hello community,

I'm trying to assign an incident based on condition and capacity.
For ex: Via business rule, whenever an incident is created, based on certain factors automatically group A is assigned to incident when created.
My requirement is that whenever an incident has Assignment group A, then based on caller's country it should be changed to assignment group B and also assign to field should get populated based on capacity. 
Note: this is not a single group, there are multiple groups based on country and other factore

I tried using AWA queues for incident but it didn't work. Kindly assist me here

Regards,

2 REPLIES 2

yashkamde
Giga Sage

Hello @dhivyal94299399 ,

 

Also for this use case you can use Business Rule which will handle group assignment based on country.

Create an After Business Rule on the incident table:

(function executeRule(current, previous) {

    var callerSysId = current.caller_id.toString();

    if (!callerSysId) return;

    var userGR = new GlideRecord('sys_user');
    if (userGR.get(callerSysId)) {
        var country = userGR.getValue('country');
        var groupMap = getGroupByCountry(country);
        
        if (groupMap.groupSysId) {
            current.assignment_group = groupMap.groupSysId;
            current.assigned_to = '';
        }
    }

    function getGroupByCountry(country) {
        var countryGroupMap = {
            'US': 'sys_id_of_group_US',
            'IN': 'sys_id_of_group_IN',
            'UK': 'sys_id_of_group_UK',
            'DE': 'sys_id_of_group_DE'
        };
        
        return { groupSysId: countryGroupMap[country] || null };
    }

})(current, previous);

 

Also instead of hardcoding, maintain a custom table like u_country_group_mapping with fields : country, assignment_group, fallback_group. Query it dynamically.

 

If my response helped mark as helpful and accept the solution.

Tanushree Maiti
Tera Patron

Hi @dhivyal94299399 

 

Refer: 

https://www.servicenow.com/community/csm-forum/how-to-configure-awa-for-incident-assignment-based-on...

KB0862506 Newly created incidents are getting assigned to the assignment group automatically 

 

https://www.linkedin.com/posts/divyakanth-tirumalasetty_servicenow-servicenowdeveloper-automation-ac...

 

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti