Need Assistance Automating Assignment Group Cleanup in ServiceNow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Team,
I’m looking for guidance on implementing an automated cleanup process for Assignment Groups in ServiceNow. Below are the conditions we need to validate as part of the cleanup activity (to be run quarterly):
Cleanup Conditions Required:
- Groups with no members or only inactive members
- No tickets (INC, SR, PRB, CHG) assigned in the last 12 months
- Groups where associated user records have empty usernames and no last login date
- Remove members who have been inactive for more than 12 months
- Groups with no members AND no ticket activity in the last 12 months
- Additionally, before cleanup, check whether the group is linked to any Application Service based on CMDB/CI records
- Retain groups explicitly identified as SUP or APR (these should not be deleted)
Goal:
To build a script or Flow Designer automation that can evaluate the above conditions and help with quarterly assignment group cleanup.
Request:
Has anyone implemented similar logic or automated cleanup?
Looking for suggestions on:
- Best practices
- Query logic
- Scripted approach (Business Rule/Scheduled Script)
- Potential risks
- Sample scripts or pseudocode
IF POSSIBLE, PLEASE ATTACH SCREENSHOTS OF CONFIGURATION FOR BETTER UNDERSTANDING .
Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Better to go with Scheduled Script and couple of notifications for Group Managers, In case group manager is no longer active then check for associated Application Service linked to identify the owner however in case owner is also no longer active then follow the hierarchy till Technical Service then add some buffer before deactivation.
Other approach is to create certification for group managers with attestation questionnaires who have to review half yearly review it and failure to do so will lead to group deactivation post due date ignoring reminders.
Better to track it via Due date field and Exception that can help you in filtering the groups for deactivation.
- Best practices
- Extend the group table to capture the custom field or create custom table in scoped application to track activities.
- Query logic
- Try to filter with Group Type, Due Date and Exception that will help to filter group that should not be deactivated and closely monitored by platform or specialized teams.
- Scripted approach (Business Rule/Scheduled Script)
- Better go scheduled script job that will help you to calculate days filtering business days and holdidays.
- Potential risks
- Groups will be deactivated and persons will not be able to work upon incidents until group is activated again.
- Bear with groups having integration roles as this may fail integrations running via system accounts in case not tracked via group type.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @ankitmarwah if possible could you please provide me configuration steps , it will help me more
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hi nameisnani,
Is this requirement has come from Business or is it internal requirement.
If it is internal, Make sure you have proper business approval, without that you can not clean group in your prod instance.
For me best approch would be Group data certification using Certification filter, Certificate schedule. Where request will go to group manager, and they will validate each and every task. If group is no longer required, they will confirm you ,so that you can deactivate.
Note: Before doing this group data certification, if you see deactivated group manager, you need to find out correct group manager who is active, so that you can replace that for the group.
If you have business approval, Then Fix script/scheduled job will also work here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@Tanushree Maiti - this was approved from business approval - could you please pleaese help me here
provide configuration steps .

