Whenever I receive a number of voice notifications at the same time, or call in to retrieve a number of alerts, xMatters presents the notifications in reverse-chronological order, even if some of the alerts are a result of (or related to) a much higher-priority, older alert. Is there a way to configure xMatters so that the highest priority events are presented first?
In the xMatters scripts, the @session::getNotifications method retrieves the list of waiting notifications from xMatters and presents them to the User. By changing the optional parameter for this method in the scripts, you can specify the order in which AlarmPoint will present notifications.
To change the order in which xMatters presents notifications:
- In the xMatters Developer IDE, open the callin (CALLIN) > CONTACT > callin and callout (CALLOUT) > CONTACT > callout scripts.
- In each script, locate the $notificationIds = @session::getNotifications() line.
- Add one of the following string parameters between the end parentheses to specify the order in which xMatters should present notifications:
- INITIATING_OLDEST: puts the initiating notification first, and then orders the remaining notifications from oldest to newest.
- INITIATING_NEWEST: puts the initiating notification first, and then orders the remaining notifications from newest to oldest.
- NEWEST: returns the list in chronological order, from newest to oldest. (This is the default setting, which is automatically used if this parameter is not specified.)
- OLDEST: returns the list in chronological order, from oldest to newest.
- Save and close the scripts, and check in your workspace.
Note that these instructions apply to the default, out-of-box scripts. If you have made changes to your deployment, you may need to change the getNotifications parameter in scripts other than those indicated above.
The following example, taken from the xMatters Online Developer's Guide, illustrates how a modified script might look if it was set to present the initiating notification first:
main: @recipient = @interaction::getRecipient($targetName) @phone::setLanguage($recipient.language) @session = @interaction::createUserSession($targetName) $notificationIds = @session::getNotifications("INITIATING_NEWEST") FOR ($notId : $notificationIds ) $contextResult = @interaction::retrieveInteractionContext($notId) IF ($contextResult) @interaction::runInteractionScript(@script, @session, @recipient, @phone) ENDIF ENDFOR @phone::play("phrase", "goodbye") @phone::hangup() exit
JDN-1081 Originally created by Don Clark