Best way to remind users of RITM pickups every 14 days
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2024 01:33 AM
Hello, we notice our users often forget to pickup what they ordered with a RITM. So i want the users to get a email reminder every 14 days when the RITM still has the status "pickup". Im not sure if the best way is to edit the flow, or set up an email notification.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2024 04:30 AM
@asd22 Execute the schedule job via execute Job button on the schedule job to check if the event and notifications are triggering. You can verify the event trigger from the event log and email from the sys_email table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2024 04:37 AM
im just unsure how the event is connected with the script i made in schedule job.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2024 04:38 AM
@asd22 Refer this article https://developer.servicenow.com/dev.do#!/learn/learning-plans/xanadu/servicenow_administrator/app_s... to know how you can trigger the event from the scheduled job script https://developer.servicenow.com/dev.do#!/learn/learning-plans/xanadu/servicenow_administrator/app_s....
You need to have a scripted scheduled job for this purpose.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2024 04:46 AM
this is the script i have to trigger the event:
var gr = new GlideRecord('sc_req_item');
gr.addEncodedQuery('sc_req_item.numberSTARTSWITHRITM^stage=utlevering'); // assuming the reminder needs to be sent for Incident records, please modify the query based on your requirement
gr.query();
while(gr.next()){
var createdDate = new GlideDateTime(gr.sys_created_on);
var today = new GlideDateTime();
var noOfDays = GlideDateTime.subtract(today, createdDate).getDayPart();
if (noOfDays == 7 || noOfDays == 14 || noOfDays == 21) {
gs.eventQueue('14dayreminder', gr, gr.sc_req_item,noOfDays);
}else{
//
}
}
i found it in another thread that had the same issue so tought it would work

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2024 05:13 AM
@asd22 First try to trigger event with a single record. If it triggers well then try to apply the remaining script.