Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

NotifyNow (Legacy)- Global

The legacy NotifyNow API provides functionality for sending emails, sending SMS messages, and setting up conference calls.

Use this when you want to use Notify functionality with applications on your system.

Note: This API is included with the legacy Notify functionality. For APIs included in the current Notify feature, see the Notify, NotifyAction, NotifyPhoneNumber, and NotifyClient APIs.

Parent Topic:Server API reference

NotifyNow - addConferenceCallParticipant(String conferenceCall, String participant)

Adds ad-hoc users to an ongoing conference call.

When the method is called with a phone number for the participant parameter and there is exactly one sys_user record that matches the phone number, that sys_user record will be related to the participant. The participant's phone number field will be left blank because the phone number is in the sys_user record. If there are several sys_user records that match the phone number, or if there are no results, the participant's phone number field will be filled in, and there will be no stored reference to sys_user because the user is not known.

NameTypeDescription
conferenceCallString or GlideRecordThe sys_id or GlideRecord of an active conference call.
participantString or GlideRecordThe sys_id or GlideRecord of a user with an E.164-compliant phone number, or an E.164-compliant phone number.
TypeDescription
GlideRecordThe participant record of the new participant that was added to the conference call.
// add a new participant by conference call sys_id (string) and phone number (string) 
var nn = new SNC.NotifyNow();
gs.log(nn.addConferenceCallParticipant('d193b242eb020100a04d4910f206fe39', '+31612345678'));
// add a new participant by conference call sys_id (string) and user record (GlideRecord)
var user = new GlideRecord('sys_user');
user.query('user_name', 'myUserName');
if (user.hasNext() && user.next()) {
    var nn = new SNC.NotifyNow();
    gs.log(nn.addConferenceCallParticipant('d193b242eb020100a04d4910f206fe39', user));

    // you could have added the user by sys_id as well:
    // nn.addConferenceCallParticipant('d193b242eb020100a04d4910f206fe39', user.getValue('sys_id'));
} else {
    gs.log('no such user');
}
// add a new participant by conference call record (GlideRecord) and phone number (string)
var conferenceCall = new GlideRecord('notifynow_conference_call');
conferenceCall.query('title', 'IA0001001');
if (conferenceCall.hasNext() && conferenceCall.next()) {
    var nn = new SNC.NotifyNow();
    gs.log(nn.addConferenceCallParticipant(conferenceCall, '+31612345678'));
} else {
    gs.log('no such conference call');
}

NotifyNow - convertLocalPhoneNumberToE164(String userID, String phoneNumber)

Converts a local phone number to an E.164-compliant phone number based on a user's location.

NameTypeDescription
userIDStringThe sys_id of a sys_user record to get location information from.
phoneNumberStringThe phone number.
TypeDescription
StringThe E.164-compliant phone number.
var localPhoneNumber = '01784 221600';
var userName = 'Heath Vanalphen';

var user = new GlideRecord('sys_user');
user.get('name',userName);
var E164Number = new SNC.NotifyNow().convertLocalPhoneNumberToE164(user.getUniqueValue(), localPhoneNumber);
gs.log('converted: ' + localPhoneNumber + ' to ' + E164Number + ' based on ' + user.getValue('name') + 
     '\'s location (' + user.getValue('location') + ')');

NotifyNow - getConferenceCallParticipants(String conferenceCallId, Boolean isCallable)

Returns all participants for a conference call.

NameTypeDescription
conferenceCallIdStringThe ID of the conference call.
isCallableBooleanAn optional flag to return either only the users you can call (true) or those you cannot call (false).
TypeDescription
GlideRecordThe participants
var nn = new SNC.NotifyNow();
var user = nn.getConferenceCallParticipants('c2e91710eb120100f34087b9d106fe37');

while (user.hasNext() && user.next()) {
    if (user.getValue('participant')) {
        gs.log('user: ' + user.getValue('sys_id'));
    } else {
        gs.log('phone number: ' + user.getValue('phone_number'));
    }
}
var nn = new SNC.NotifyNow();
var user = nn.getConferenceCallParticipants('c2e91710eb120100f34087b9d106fe37', true);

while (user.hasNext() && user.next()) {
    if (user.getValue('participant')) {
        gs.log('user: ' + user.getValue('sys_id'));
    } else {
        gs.log('phone number: ' + user.getValue('phone_number'));
    }
}
var conferenceCallId = '32b11430eb1201003cf587b9d106feb8';

// get all participants
gs.log('all conference call participants:');
var nn = new SNC.NotifyNow();
var user = nn.getConferenceCallParticipants(conferenceCallId);
gs.log(user);

// get all callable participants
gs.log('all conference call participants we can call:');
user = nn.getConferenceCallParticipants(conferenceCallId, true);
gs.log(user);

// get all un callable participants
gs.log('all conference call participants that are already in an active session and whom we cannot call:');
user = nn.getConferenceCallParticipants(conferenceCallId, false);
gs.log(user);

NotifyNow - getFrequentlyCalledUsers(Number limit)

Returns a number of frequently-called users, up to the limit parameter, in alphabetical order.

NameTypeDescription
limitNumberThe maximum number of results.
TypeDescription
GlideRecordThe frequently called users in alphabetical order.
var nn = new SNC.NotifyNow();
var fc = nn.getFrequentlyCalledUsers(10);

while (fc.hasNext() && fc.next()) {
    gs.log("got user " + fc.getValue('name') + ' - ' + fc.getValue('sys_id'));
}

NotifyNow - getPreferredE164SMSNumber(GlideRecord user)

Returns a user's preferred E.164-compliant phone number for SMS messages.

NameTypeDescription
userGlideRecord or StringThe user record or the sys_id of a user to get the E.164-compliant phone number from.
TypeDescription
StringThe E.164-compliant phone number or null.
var userID = "<user sys_id>";
var E164Number = new SNC.NotifyNow().getPreferredE164SMSNumber(userID);
gs.log('the preferred phone number for sending SMS notifications is ' + E164Number + ' for user with id: ' + userID);

NotifyNow - getPreferredE164VoiceNumber(GlideRecord user)

Returns a user's preferred E.164-compliant phone number for voice calls.

NameTypeDescription
userGlideRecord or StringThe user record or the sys_id of a user to get the E.164-compliant phone number from.
TypeDescription
StringThe E.164-compliant phone number or null.
var userID = "<user sys_id>";
var E164Number = new SNC.NotifyNow().getPreferredE164VoiceNumber(userID);
gs.log('the preferred phone number for setting up voice calls is ' + E164Number + ' for user with id: ' + userID);

NotifyNow - getPreferredEmailAddress(GlideRecord user)

Returns a user's preferred email address

NameTypeDescription
userGlideRecord or StringThe user record or the sys_id of a user to get the email address from.
TypeDescription
StringThe email address or null.
var userID = "some user sys id";
var email = new SNC.NotifyNow().getPreferredEmailAddress(userID);
gs.log('the preferred email address for sending email notifications is ' + email + ' for user with id: ' + userID);

NotifyNow - getReadyState()

Indicates whether Notify is set up correctly or not.

This method can only be accessed by administrators or users with the notifynow_admin role. Users with all other roles get the message False when trying to run the function in a script.

NameTypeDescription
None  
TypeDescription
BooleanTrue if Notify is set up correctly, otherwise false.
var nn = new SNC.NotifyNow();
gs.log(((nn.getReadyState()) ? "OK" :  "NOT OK"));

NotifyNow - getStatus()

Returns the current status of Notify configuration.

This method can only be accessed by administrators or users with the notifynow_admin role. Users with all other roles get the message Unauthorized when trying to run the function in a script.

NameTypeDescription
None  
TypeDescription
StringOne of the possible status messages.
StatusDescription
NO\_NUMBER\_MESSAGEThe account does not have a telephone number set up. Ensure that you set up the telephone number for the account.
NO\_ENDPOINTS\_MESSAGEThe account does not have its endpoints set up correctly. Ensure that you set up the endpoints for the account.
ACCOUNT\_OK\_MESSAGEThe account is active and ready for use.
ACCOUNT\_NO\_AUTHThe Twilio AuthToken is not valid.
ACCOUNT\_NOT\_CONFIGUREDThe Twilio AccountSID or AuthToken is not valid.
var nn = new SNC.NotifyNow();
gs.log(nn.getStatus());

NotifyNow - initiateConferenceCall(String[] conferenceCallParticipants, String conferenceCallTitle)

Initiate a new conference call.

NameTypeDescription
conferenceCallParticipantsStringOne or more users, conference call participants, identified by the sys_ids from the sys_user table or E.164-compliant phone numbers.
conferenceCallTitleStringTitle of the conference call. This parameter has a maximum length of 40 characters.
TypeDescription
GlideRecordThe conference call record, or null if there was an error.

This initiates a conference call with E.164-compliant phone numbers for participants, without the optional source record parameter and and does not send any conference call details via SMS or email.

var participants = ['+31205655548', '+31205655552', '+31652825393'];
// set up conference call
var nn = new SNC.NotifyNow();
var conferenceCall = nn.initiateConferenceCall(participants, "testing12");
gs.log('started conference call: ' + conferenceCall.getUniqueValue());

NotifyNow - initiateConferenceCall(String[] conferenceCallParticipants, String conferenceCallTitle, GlideRecord sourceRecord, Boolean private)

Initiate a new conference call.

NameTypeDescription
conferenceCallParticipantsStringOne or more users, conference call participants, identified by the sys_ids from the sys_user table or E.164-compliant phone numbers.
conferenceCallTitleStringTitle of the conference call. This parameter has a maximum length of 40 characters.
sourceRecordGlideRecordSource record to associate to the conference call such as an incident or problem number.
privateBooleanValue to control if a conference call is private. This value defaults to false.
TypeDescription
GlideRecordThe conference call record, or null if there was an error.

This initiates a conference call with participants that have a E.164-compliant phone number and participants from the sys_user table and sends conference call details via SMS and email to all participants.

// define phone number participants
var participants = ['+31205655548', '+31205655552', '+31652825393'];

// we also want to add two Dutch sys_user participants
var user = new GlideRecord('sys_user');
user.addNotNullQuery('mobile_phone');
user.addQuery('mobile_phone', 'STARTSWITH', '+316');
user.setLimit(2);
user.query();

// add users to the participant array
while (user.hasNext() && user.next()) {
    gs.log('adding user ' + user.getValue('name') + ' with phone number ' + 
             user.getValue('mobile_phone') + ' to the participant array');
    participants.push(user.getUniqueValue());
}

// define a source record to associate with the conference call
var source = new GlideRecord("cmdb_ci");
source.query("asset_tag", "P1000167");
if (source.hasNext() && source.next()) {
    // set up conference call
    var nn = new SNC.NotifyNow();
    var conferenceCall = nn.initiateConferenceCall(participants, "testing 1 2", source);

    // check if the conference call was successfully created
    if (conferenceCall != null) {
        gs.log('started conference call: ' + conferenceCall.getUniqueValue());
    } else {
        gs.log('could not start the conference call :(');
    }
}

NotifyNow - isCallable(String participant)

Determines whether a user is callable or not.

A user must have a valid phone number to be callable. A user who is already in an active session is not callable.

NameTypeDescription
participantString or GlideRecordA sys_user or notifynow_participant record, or an E.164-compliant phone number.
TypeDescription
booleanWhether this participant can be called or not.
var nn = new SNC.NotifyNow();
gs.log('by number: ' + nn.isCallable('+31612345678'));

var user = GlideRecord('sys_user');
user.query('sys_id', '13d39544eb5201003cf587b9d106fea9');
if (user.hasNext() && user.next())
  gs.log('by user: ' + nn.isCallable(user));

var participant = GlideRecord('notifynow_participant');
participant.query('sys_id', '33b11430eb1201003cf587b9d106feb9');
if (participant.hasNext() && participant.next())
  gs.log('by participant: ' + nn.isCallable(participant));

NotifyNow - isSMSCapable()

Checks if the telephone number associated with the Twilio account is capable of sending SMS messages.

NameTypeDescription
None  
TypeDescription
BooleanWhether the telephone number associated with the Twilio account is capable of sending SMS messages.
gs.log('The twilio number is SMS capable: ' + ((new SNC.NotifyNow().isSMSCapable()) ? 'yes' : 'no'));

NotifyNow - isSMSCapable(String userID)

Checks if a user is able to send SMS messages.

NameTypeDescription
userIDStringThe sys_id of the user you want to check for an SMS-capable phone number.
TypeDescription
BooleanIf the user can send SMS messages.
gs.log('the user is able to send SMS messages (e.g. has a SMS device): ' + ((new SNC.NotifyNow().isSMSCapable('<user sys_id>')) ? 
     'yes' : 'no'));

NotifyNow - isVoiceCapable()

Checks if the telephone number associated with the Twilio account is capable of setting up phone calls.

NameTypeDescription
None  
TypeDescription
BooleanWhether the telephone number associated with the Twilio account is capable of setting up phone calls.
gs.log('the Twilio number is Voice capable: ' + ((new SNC.NotifyNow().isVoiceCapable()) ? 'yes' : 'no'));

NotifyNow - isVoiceCapable(String userID)

Checks if a user is able to make voice calls.

NameTypeDescription
userIDStringThe sys_id of the user you want to check for a voice-call capable phone number.
TypeDescription
booleanWhether the user has a voice-call capable phone number.
gs.log('the user is able to send SMS messages (e.g. has a SMS device): ' + 
     ((new SNC.NotifyNow().isVoiceCapable('someuserid')) ? 'yes' : 'no'));

NotifyNow - kick(GlideRecord participant)

Removes a participant from a conference call.

NameTypeDescription
participantGlideRecordThe conference call participant to remove from the call.
TypeDescription
BooleanTrue if the participant was removed, otherwise false.
var participantId = "<participant sys_id>";
var participant = new GlideRecord('notifynow_participant');
participant.get(participantId);
if (participant.isValid()) {
     // kick participant
     result = new SNC.NotifyNow().kick(participant);
     gs.log('participant kicked: ' + result);
}

NotifyNow - mute(GlideRecord participant)

Mutes a participant on a conference call.

NameTypeDescription
participantGlideRecordThe conference call participant to mute.
TypeDescription
BooleanTrue if the participant was muted, otherwise false.
var participantId = "<participant sys_id>";
var participant = new GlideRecord('notifynow_participant');
participant.get(participantId);
if (participant.isValid()) {
     // mute participant
     result = new SNC.NotifyNow().mute(participant);
     gs.log('participant muted: ' + result);
}

NotifyNow - sendEmailQuestion(String emailAddress, String question, GlideRecord sourceRecord, String emailSubject)

Send an email question to an email address.

The sendEmailQuestion method produces a question body and requires users to click a link to indicate their choice.

NameTypeDescription
emailAddressStringEmail address to send the question to.
questionString or GlideRecordThe question record to send or the sys_id of a question record.
sourceRecordGlideRecordAn optional source record to associate to the SMS question, such as an incident.
emailSubjectStringOptional text to override the default email subject.
TypeDescription
StringThe conversation sys_id.

This example demonstrates using the default email subject.

var user = GlideRecord("sys_user");
user.get("email", "someone@somedomain.com");

new SNC.NotifyNow().sendEmailQuestion(user.getValue('email'), "b6b34500bf3111003cf585ce2c0739ce", user);

This example uses dot-walking and specifies a source record and email subject.

new SNC.NotifyNow().sendEmailQuestion("someone@somedomain.com", "b6071733bf1111003cf585ce2c07390f", current, 
        "Please answer this question");

This example uses dot-walking and specifies an email subject but no source record.

new SNC.NotifyNow().sendEmailQuestion("someone@somedomain.com", "b6071733bf1111003cf585ce2c07390f", 
        "Please answer this question");

NotifyNow - sendSMS(String phoneNumber, String smsBody)

Sends an SMS message to an E.164-compliant mobile phone number.

Notify supports international numbers. Using this method with a number that does not support sending SMS messages results in an error being logged.

NameTypeDescription
phoneNumberStringThe E.164-compliant phone number to send the message to.
smsBodyStringThe message to send, maximum 1600 characters.
TypeDescription
void 
new SNC.NotifyNow().sendSMS("+31612345678", "This is a message without source record");

NotifyNow - sendSMS(String phoneNumber, String smsBody, GlideRecord source)

Sends an SMS message to an E.164-compliant mobile phone number.

Notify supports international numbers. Using this method with a number that does not support sending SMS messages results in an error being logged.

See also: Advanced configuration for SMS.

NameTypeDescription
phoneNumberStringThe E.164-compliant phone number to send the message to.
smsBodyStringThe message to send, maximum 1600 characters.
sourceGlideRecordThe source record to associate with this SMS message.
TypeDescription
void 
var source = new GlideRecord("my_table");
source.query("my_field", "my_value");

if (source.hasNext() && source.next()) {
    // send a text message
    var nn = new SNC.NotifyNow();
    var message = "this is just a test";
    var number = "+31612345678";
    nn.sendSMS(number, message, source);
}

This example uses dot-walking and the current record as the source record.

new SNC.NotifyNow().sendSMS("+31612345678", "this is a test", current);

NotifyNow - sendSMSQuestion(String phoneNumber, String question, GlideRecord sourceRecord)

Sends an SMS question.

NameTypeDescription
phoneNumber An E.164-compliant phone number to send the message to.
questionString or GlideRecordThe question record to send or the sys_id of a question record.
sourceRecord An optional source record to associate to the SMS question, such as an incident.
TypeDescription
StringThe conversation sys_id, or null if the SMS was not sent successfully.
var question = new GlideRecord("notifynow_question");
question.query();

// get the first question
if (question.hasNext() && question.next()) {
    // send the sms question
        var number = "+31612345678";
    var nn = new SNC.NotifyNow();
    nn.sendSMSQuestion(number, question.getUniqueValue(), current);
}

NotifyNow - umute(GlideRecord participant)

Unmutes a participant on a conference call.

NameTypeDescription
participantGlideRecordThe muted conference call participant to unmute.
TypeDescription
BooleanTrue if the participant was unmuted, otherwise false.
var participantId = "<participant sys_id>";
var participant = new GlideRecord('notifynow_participant');
participant.get(participantId);
if (participant.isValid()) {
     // unmute participant
     result = new SNC.NotifyNow().unmute(participant);
     gs.log('participant unmuted: ' + result);
}