- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2019 12:48 AM
I want to send an email to the assigned group 1 hour before SLA breaches.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2019 02:01 AM
No, we cant define conditions directly in notification because notification can be triggered When event is fired or record is inserted or updated.
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);
Please mark as Correct Answer and Helpful, if applicable.
Thanks!
Abhishek Gardade
Hexaware Technologies
Abhishek Gardade
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2019 02:56 AM
If 50% is less than an hour, I attached it directly and I'm getting the mail.
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2019 03:01 AM
Great!!! Glad that worked.
Abhishek Gardade
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2020 09:00 AM
Hi Abhishek
we have similar requirement that need to send a alert before 30 mins for planned date in change management
So how we can query this ? and write the scheduled job script ? on which condition >
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-27-2023 04:52 AM
Hi @AbhishekGardade ,
Could you please explain where do we need to add the above script?
I mean in email script or anywhere else?
Thanks,
Amol

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2019 01:41 AM
Add Notification Activity right after the timer activity, which will trigger the notification.
Regards,
Sanket