How to send a notification when sla breaches before 24 hours of time?

Satish Bau
Giga Contributor

How to send a notification when sla breaches before 24 hours of time?

4 REPLIES 4

Not applicable

Hi Satish,

You need to create a SLA Workflow on task_sla( or check the default SLA workflow in OOB version), it has SLA percentage timers that send warning and breach alerts to users.

Mark if Correct/Helpful

Thanks

Ajay

find_real_file.png

www.dxsherpa.com

Satish Bau
Giga Contributor

How to achieve this through scheduled job

Not applicable

Hi Satish,

  1. Create a new Scheduled Job, set Run - Daily and set time
  2. In Script field write below code :

 

var gr = new GlideRecord('task_sla');
gr.addEncodedQuery("original_breach_timeRELATIVELT@hour@ago@24^active=true");
gr.query();
while (gr.next()){
gs.eventQueue('your_event_name',gr);
}

 

Events and Email Notification - ServiceNow Wiki

Creating a Scheduled Job - ServiceNow Wiki

 

Thanks

Ajay

find_real_file.png

Satish Bau
Giga Contributor

Thanks.