On-call scheduling - How to send multiple reminders for the on-call scheduling rotation instead of only one?

cynlink1
Tera Expert

 

Details: Our company is using multi-provider SSO. It is my understanding (based on the documentation) that we can't use the on-call calendar subscription URL because basic authentication is still required to subscribe with the URL. So, we would like to configure the system to send more than one reminder via email notification. We are only allowed to enter one value in the 'Reminder lead time (days) field. What is the best way (recommended) to trigger additional reminders? For instance, we might want to send a reminder on the 30 day, 3 day, and 0 day marks.

Based on a response from ServiceNow support, I learned that on-call scheduling reminders are triggered by a scheduled job "On-Call Reminders" that runs daily. This scheduled job makes the following call:

```
new OnCallRemindersNG().sendReminders(null);
```
Looking at "OnCallRemindersNG" script include, I can see the "sendReminders" method code:
```
var reminderLeadTime = (JSUtil.notNil(rotaGR.reminder_lead_time) && (rotaGR.reminder_lead_time >= 0)) ? rotaGR.reminder_lead_time : 2;
this.log.debug("[sendReminders] rota reminderLeadTime: " + reminderLeadTime);

var rosterIds = [];
var rosterGR = this.getRosterGr(rotaGR.getUniqueValue());
while (rosterGR.next()) {
if (!rosterGR || rosterGR.rotation_start_date == "00000000")
continue;

if (JSUtil.notNil(rosterGR.reminder_lead_time) && (rosterGR.reminder_lead_time >= 0))
reminderLeadTime = rosterGR.reminder_lead_time;
```
They stated, I would need to customize this part of the code to loop through all your reminders. As an example, if you choose to have a list of days separated by semicolons, you can use javascript to split "rotaGR.reminder_lead_time" by ';" and then iterate through all of them to check if it applies."

My problem is that I do not have a lot of experience with scripting. I was hoping that someone may have already developed a solution for this requirement and would be willing to share the script with me OR offer me the guidance need to accomplish this task.

Thank you in advance!

6 REPLIES 6

mev
Tera Contributor

Hi there.. How did you reconstruct the URL it is sending?  What is the URL format?

Thanks,

Patrick

Daniel Peel
Mega Sage

I know this is realllllly late 🙂 but I wanted to say it looks like they have added features to Washington DC, if you haven't seen... that will let users download those cals even using SSO... we've wanted something like this forever as well... since, as you've mentioned with SSO we could not

https://docs.servicenow.com/bundle/washingtondc-it-service-management/page/administer/on-call-schedu...