We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Need Assistance Automating Assignment Group Cleanup in ServiceNow

nameisnani
Mega Sage

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:

  1. Groups with no members or only inactive members
  2. No tickets (INC, SR, PRB, CHG) assigned in the last 12 months
  3. Groups where associated user records have empty usernames and no last login date
  4. Remove members who have been inactive for more than 12 months
  5. Groups with no members AND no ticket activity in the last 12 months
  6. Additionally, before cleanup, check whether the group is linked to any Application Service based on CMDB/CI records
  7. 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!

5 REPLIES 5

Mark Manders
Giga Patron

You already asked this question: https://www.servicenow.com/community/developer-forum/automate-quarterly-assignment-group-cleanup-bas...

What did you try and where are you stuck? The Community is here to assist, not to do your job for you. How did you get to be a Mega Sage?


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark