How to assign tickets(sc_task and incident) to group member of group based on group member location

raj99918
Tera Contributor

Hi 

 

When ever sc tasks and incidents are triggered with empty group which state is one of open,WIP and onhold then need to configure the Queue Manager to assign all SCtasks & Incidents automatically within the ABC group group members who is available having state a 'True' this one I have achieved with queue manager but I have othe requirement like If the user who raised ticket is from a specific location(India,UK,UAS etc.) then the ticket should be assigned to group member for ServiceNow group "ABC" of the same location If not the assigned engineer from the specific location group is unavailable, the ticket should be reassigned to one of the engineers listed in the Queue Manager (True State). How can we implement this one

 

Thanks

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@raj99918 

see this link where I shared solution for something similar, please enhance your code as per that

set assignment group based on user location by using workflow 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

4 REPLIES 4

pavani_paluri
Giga Guru

Hi @raj99918 ,

 

Please try below approach: 

1. Add Location & Availability to Group Members
Make sure:All users in Group ABC have their Location set (India, UK, USA, etc.). All users have a checkbox field like "Available" set to true or false

2. Use a Script to Handle Assignment Logic
Since Queue Manager alone can’t handle this "check location → fallback" logic, we’ll use a script.You’ll need to ask your ServiceNow developer (or use yourself if you're a developer) to:
Create a Script Include with the logic:Get the ticket raiser’s location. Find available group members from the same location.
If found → assign Else → assign to any available group member

3. Trigger This Script from a Business Rule
Set up a Business Rule on Incident and SCTask that runs:Only when group is empty,Only if state is Open/WIP/On Hold
Before or After Insert (your choice)

The rule should call the script to assign the ticket.

 

Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Pavani P

Ankur Bawiskar
Tera Patron
Tera Patron

@raj99918 

see this link where I shared solution for something similar, please enhance your code as per that

set assignment group based on user location by using workflow 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@raj99918 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Ankur Bawiskar
Tera Patron
Tera Patron

@raj99918 

Would you mind closing your earlier questions by marking appropriate response as correct?

Members have invested their time and efforts in helping you.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader