OnCallRotation - getEscalationPlan(String groupID, GlideDateTime dateTime)

Gets a list of objects to escalate to, escalation plans that consist of either a user [sys_user] or notification device [cmn_notif_device], for a group's rota at the specified date and time.

The Escalation object contains the following fields:
  • Number order: the escalation order within the lineup
  • String userId: sys_id of the sys_user record or null
  • String deviceId: sys_id of the cmn_notif_device record or null
  • Boolean isDevice: true or false depending on whether the item to escalate to is a device or user
  • GlideDuration timeBetweenReminders: the time between reminders being sent
  • Number reminderNum: number of reminders to be sent for each item to escalate to
Table 1. Parameters
Name Type Description
groupID String The sys_id for the group to get the to escalate to from.
dateTime GlideDateTime The date and time when the escalation lineup should begin.
Table 2. Returns
Type Description
List A list of escalation objects to escalate to.
var rota = new SNC.OnCallRotation()
var gdt = new GlideDateTime();
gdt.addMonths(1);//Next month 
var escalationPlan = rota.getEscalationPlan("486ae95aeb201100fcfb858ad106fe40", gdt);
for(var i = 0;  i < escalationPlan.size(); i++){
    gs.log(escalationPlan.get(i).order + " " + escalationPlan.get(i).userId + " " +
       escalationPlan.get(i).deviceId + " " +  escalationPlan.get(i).timeBetweenReminders + " " +
       escalationPlan.get(i).reminderNum );