Skip to content

Commit 0f69f5d

Browse files
Create Readme.md
Auto assign unassigned incidents
1 parent d416c9c commit 0f69f5d

File tree

1 file changed

+16
-0
lines changed
  • Server-Side Components/Scheduled Jobs/Auto-Assign Unassigned Incidents Older Than 30 Minutes

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
This scheduled job automatically assigns unassigned incidents in ServiceNow to a random active user from the incident’s assignment group, but only if the incident is at least 30 minutes old.
2+
It ensures timely triaging of new incidents and avoids backlog accumulation caused by unassigned tickets.
3+
4+
How It Works
5+
6+
Identify Eligible Incidents
7+
Fetch all incidents from the incident table whereassigned_to is empty (unassigned) and assignment_group is not empty
8+
9+
Find Active Group Members
10+
For each incident, look up the related group (sys_user_grmember table).Join with the sys_user table. This allows filtering users based on their active status.
11+
12+
Random Assignment
13+
From the list of active members, pick a random user. Assign that user to the incident’s Assigned To field
14+
15+
Update & Log
16+
Update the incident record in the database. Log success or skip messages to the system log

0 commit comments

Comments
 (0)