how to send a email notification if ticket has not been updated for 3 business days

Lokesh Yanati
Tera Contributor

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!!!

7 REPLIES 7

AndersBGS
Tera Patron
Tera Patron

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/

Hi @AndersBGS,

 

Thank you for the reply. I need to implement this requirement in Global, but GlideSchedule is not supported in Gloabl.

 

Thanks

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/

Saurav11
Kilo Patron
Kilo Patron

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:-

 

https://www.servicenow.com/community/developer-forum/creating-schedule-job-to-send-notification/m-p/...

 

Please mark my answer as correct based on Impact.