how to send a email notification if ticket has not been updated for 3 business days
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2023 11:52 PM
Hello,
I want to trigger a email notification if ticket not updated for 3 business days. for this I'm using schedule job to send the notification. can someone help me with script?
Thanks in advance!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2023 12:00 AM
Hi @Lokesh Yanati ,
Please look into this community post which have the same requirement as you, except it 5 days instead of three days: https://www.servicenow.com/community/developer-forum/need-help-on-getting-tickets-not-updated-for-5-...
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Best regards
Anders
If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.
Best regards
Anders
Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2023 03:47 AM - edited 06-08-2023 03:47 AM
Hi @AndersBGS,
Thank you for the reply. I need to implement this requirement in Global, but GlideSchedule is not supported in Gloabl.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2023 04:50 AM
Hi @Lokesh Yanati ,
Ok, found another solution which refer to state, but would assume that it can be transferred into not updated: https://www.servicenow.com/community/developer-forum/how-to-send-notification-if-state-is-pending-fo... Without the glideschedule 🙂
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Best regards
Anders
If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.
Best regards
Anders
Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2023 12:03 AM
The script would be as below assuming the table is incident:-
var gr = new GlideRecord('incident');
gr.addEncodedQuery('active=true^state=2^sys_updated_onRELATIVEGT@dayofweek@ago@4^sys_updated_onRELATIVELT@dayofweek@ago@3');
gr.query();
if (gr.next()) {
gs.eventQueue("replaceeventname", gr);
}
If you want to understand the complete event functionality please check the below post:-
Please mark my answer as correct based on Impact.