Add On-Call Manager to Watchlist for P1 and P2 Major Incidents During Non-Business Hours and Notify

rmishra4395
Tera Contributor

Hello Team,

 

Please help me the below scenario?

Acceptance Criteria 1:

Given a major incident is created in ServiceNow,
When the priority assigned to the major incident is P1 or P2,
Then the agent assigned to the major incident ticket must be prompted to add the on-call manager to the watchlist during non-business hours (5:01 PM CET to 7:59 AM CET), including weekends and bank holidays.

 

Acceptance Criteria 2:

Given a major incident is created in ServiceNow, and the initial priority assigned is P3, P4, or P5,
When the priority is upgraded to P1 or P2, and the ticket is assigned to NOC,
Then the agent assigned to the major incident ticket must be prompted to add the on-call manager to the watchlist during non-business hours (5:01 PM CET to 7:59 AM CET), including weekends and bank holidays.

Important: A daily reminder must be sent to the agent to ensure that an on-call manager is added to the watchlist, as the on-call manager's availability is dependent on their working hours.

 

The teams to be notified during business and non-business hours are outlined in the following table:

 
Incident PriorityBusiness Hours (8:00 AM CET - 5:00 PM CET)Non-business Hours (5:01 PM CET - 7:59 AM CET, Weekends, and Bank Holidays)

P1 and P2

Incident_Manager (Group)

On-call Manager (Individual) + Incident_Manager (Group)

P3 and P4

Incident_Manager (Group)

Incident_Manager (Group)

P5

Incident_Manager (Group)

Incident_Manager (Group)

1 REPLY 1

Mark Manders
Mega Patron

You can create a schedule for the 'Out of Office hours, including weekends and Bank Holidays' and utilize that in a BR:

 

var scheduleName = 'Non-Business Hours'; // !!Replace with the name of your schedule!!
var schedule = new GlideSchedule(scheduleName);

var now = new GlideDateTime();

if (schedule.isInSchedule(now)) {
    gs.addInfoMessage("This action is occurring during non-business hours. Please ensure to add the on-call manager to the watchlist.");
}

You need to set the BR to trigger on create/update of the MI when priority is 1 or 2 and watchlist = empty.

For the reminder: create a flow that runs daily, checking on open P1/P2 MIs and use 'send notification' to trigger the notification.


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