Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

How to send a notification before one day of SLA breaches

Amol Pawar
Tera Guru

Hi all,

 

I have a requirement where I need to create a notification before one day of SLA breaches. Please provide me with the steps of how can we achieve this.

 

Thanks,

Amol

1 ACCEPTED SOLUTION

Community Alums
Not applicable

Hi @Amol Pawar ,

we can't define conditions directly in  notification because notification can be triggered When event is fired or record is inserted or updated.

Here is an example for "Send notification 1 hour before SLA breaches" :

What you need to do is, you need Create a event(sla.breach.one.hour.before) on task_sla table in event registry and trigger it from run script activity before one hour as below

var breachTime = current.planned_end_time ;

gs.log("breachTime: "+breachTime);

var gdt = new GlideDateTime(breachTime);

gdt.addSeconds(-3600);

gs.log("reminder date:"+gdt);

gs.eventQueueScheduled ("sla.breach.one.hour.before" , current , gs.getUserID(), gs.getUserName(), gdt);

View solution in original post

3 REPLIES 3

Community Alums
Not applicable

Hi @Amol Pawar ,

we can't define conditions directly in  notification because notification can be triggered When event is fired or record is inserted or updated.

Here is an example for "Send notification 1 hour before SLA breaches" :

What you need to do is, you need Create a event(sla.breach.one.hour.before) on task_sla table in event registry and trigger it from run script activity before one hour as below

var breachTime = current.planned_end_time ;

gs.log("breachTime: "+breachTime);

var gdt = new GlideDateTime(breachTime);

gdt.addSeconds(-3600);

gs.log("reminder date:"+gdt);

gs.eventQueueScheduled ("sla.breach.one.hour.before" , current , gs.getUserID(), gs.getUserName(), gdt);

How to send notification before 2 days of SLA breach? Don't we need to add any if condition in the above mentioned Run Script?

Amol Pawar
Tera Guru

Thank you for your reply