Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Email notifications - status

RMendoza
Tera Expert

In ServiceNOW, is there a function to alert the manager via email if a task or item is open, unassigned, or have no activity beyond a certain number of days?  An email alert with a link directly to that task/item. 

1 REPLY 1

PoonkodiS
Giga Sage

you need “manager alert if a ticket is unassigned or stale for N days”, would implement the Scheduled-Job + Custom Event + Notification approach.

Scheduled Job:

var gr = new GlideRecord('incident');
gr.addQuery('assigned_to', ''); 
gr.addQuery('state', '!=', 'Resolved');  
gr.addQuery('sys_updated_on', '<=', gs.daysAgo(7)); 
gr.query();
while (gr.next()) {
gs.eventQueue('task.stale.unassigned', gr, gr.opened_by, gs.getUserID());
}

Create a Notification (via System Policy → Email → Notifications) to that event, and sends an email to relevant recipient(s), e.g. the manager

Body of the email include${number} of the record