The NotifyOnTaskClient API provides methods for sending SMS messages or starting/managing a conference call for various telephony service providers, such as Zoom and Webex.
Any UI can consume the NotifyOnTaskClient API by explicitly including the NotifyOnTaskClient UI script.
Using the NotifyOnTaskClient API you can:
Start a conference call
End a conference call
Add participants
Perform actions that are available through the telephony driver such as:
mute/unmute participants
remove participants from a conference call
add participants to a conference call
start a conference call
end a conference call
The Notify (com.snc.notify) plugin requires a separate subscription. For additional information on activating the Notify plugin, see Activate Notify.
Adds the specified participants to a specified conference call.
Name
Type
Description
data
Object
Object that describes the conference call.
data.addToWorkNotes
Boolean
Flag that indicates whether to add information about the participants that were included in the conference call in the work notes field of the associated record. For this functionality to work, you must also specify values in the data.table and data.sysId parameters. These parameters identify the record in which to add the work notes.
Default: false
data.confId
String
Sys\_id of the conference call. Table: Notify Conference Call \[notify\_conference\_call\]
data.items
Array
Information for each participant to include in the conference call.
Phone number of the participant. If this value is passed in conjunction with either the id or notifyParticipantId parameter, this value supersedes the phone numbers in the user/participant record and is used to place the call.
data.message
String
Message that is read aloud when a user answers the call, such as, "P1 incident has been created please login to instance."
data.serviceProvider
String
Required. Name of conference service provider, such as Zoom or Webex.
data.sysId
String
Sys_id of the source record to associate with the conference call. For example, if a conference call is held to discuss a specific incident or problem, put the sys_id of the incident or problem record in this value. This sys_id is stored in the Source column of the NotifyConference Call [notify_conference_call] table and can later be tracked.
This parameter is used in conjunction with the data.Table, data.addToWorkNotes, and allowMulticonference parameters.
You should configure this value when the conference call is initially created through a "start" action. If required, you can also set this value through this method.
data.table
String
Table that contains the source record to associate with the conference call. A source record can be any record, such as an "incident" or "problem", that is the topic of discussion in the conference call. This table name is stored in the Table column of the NotifyConference Call [notify_conference_call] table and can be tracked.
This parameter is used in conjunction with the data.sysId, data.addToWorkNotes, and allowMulticonference parameters.
You should configure this value when the conference call is initially created through a "start" action. If required, you can also set this value through this method.
Type
Description
Object
Results of the conference action.`.status`: Status of the conference action. - Data type: Boolean - Possible values: - true: Conference action succeeded - false: Conference action failed `.successMessages`: If *status* is true, success message\(s\), else empty. - Data type: Array of Strings `.warnMessages`: If *status* is false, any warning messages thrown during processing. - Data type: Array of Strings `.errorMessages`: If *status* is false, any error messages thrown during processing. - Data type: Array of Strings
The following code example shows how to call this method.
Performs the specified conference call action, such as starting/ending a conference call or joining, removing, muting, or unmuting participants from a conference call.
You can start a new conference call and add participants within a single call to this method or call the method multiple times to start the call and then manage participants separately. In addition, through the passed in data object, you can configure the method to:
Save pointers in the conference call record to the specific record (source record), such as an incident or problem, that is the topic of discussion for the conference call.
Allow/disallow multiple conference calls for a source record.
Automatically log the participants that were in the conference call in the Work notes field of the source record.
Have a message read aloud when a participant answers an outgoing call from the conference.
Name
Type
Description
action
String
Defines the conference call action to perform.The following are the available conference call actions:
end: Terminates the conference call identified in data.confId.
join: Adds the participant specified in the data.items array to the conference call identified in data.confId.
kick: Removes the participant specified in the data.items array from the conference call identified in data.confId.
multiJoin: Adds the participants specified in the data.items array to the conference call identified in data.confId
multiKick: Removes the participants specified in the data.items array from the conference call identified in data.confId.
multiMute: Mutes the participants specified in the data.items array on the conference call identified in data.confId.
multiUnmute: Unmutes the participants specified in the data.items array from the conference call identified in data.confId.
mute: Mutes the participant specified in the data.items array on the conference call identified in data.confId.
selfJoin: Adds the currently logged in user to the conference call (no entry in data.items required.)
start: Starts the conference call identified in data.confId.
unmute: Unmutes the participant specified in the data.items array from the conference call identified in data.confId.
data
Object
Object that describes the conference call.
data.addToWorkNotes
Boolean
Flag that indicates whether to add information about the participants that were included in the conference call in the work notes field of the associated record. For this functionality to work, you must also specify values in the data.table and data.sysId parameters. These parameters identify the record in which to add the work notes.
Default: false
Actions for which this parameter is valid:
join
multiJoin
selfJoin
start
data.allowMulticonference
Boolean
Flag that indicates whether to allow multiple conference calls for a specific record at one time. For this functionality to work, you must also specify values in the data.table and data.sysId parameters. These parameters identify the record that is allowed to have multiple conference calls.
Default: false
Actions for which this parameter is valid:
start
data.confId
String
Sys_id of the conference call. Table: Notify Conference Call [notify_conference_call]
Actions for which this parameter is required:
end
join
multiJoin
selfJoin
Note: Participant actions such as mute, unmute, and kick don't require this parameter to be set as the method obtains this information from the Notify Conference Call Participant [notify_participant] table.
data.fromNumber
String
Service provider number to call into for the conference call. Locate this value in the Number or Phone number column of the Notify Phone Number \[notify\_number\] table. Actions for which this parameter is required: - start
data.isNewConference
Boolean
Flag that indicates whether this is a new or an existing conference call. Valid values: - true: New conference call - false: Existing conference call Default: false Actions for which this parameter is valid: - start
data.message
String
Message that is read aloud when a user answers the call, such as, "P1 incident has been created please login to instance." Actions for which this parameter is valid: - join - multiJoin - start
data.items
Array
Information for each participant to include in the conference call. Valid array values:
id: Sys_id of user; located in the User [sys_User] table.
Valid actions: join, multiJoin, start
notifyParticipantId: Sys ID of the Notify participant; located in the Notify Participant [notify_participant] table.
phoneNumber: Phone number of the participant. If this value is passed in conjunction with either the id or notifyParticipantId, this value supersedes the phone numbers in the user/participant record and is used to place the call.
Valid actions: join, multiJoin, start
email: Email address of the participant.
Valid actions: join, multiJoin, start
data.serviceProvider
String
Required. Name of conference service provider, such as Zoom or Webex. Actions for which this parameter is required: - all
data.sysId
String
Sys_id of the source record to associate with the conference call. For example, if a conference call is held to discuss a specific incident or problem, put the sys_id of the incident or problem record in this value. This sys_id is stored in the Source column of the NotifyConference Call [notify_conference_call] table and can later be tracked.
This parameter is used in conjunction with the data.Table, data.addToWorkNotes, and allowMulticonference parameters.
Actions for which this parameter is valid:
start
data.table
String
Table that contains the source record to associate with the conference call. A source record can be any record, such as an "incident" or "problem", that is the topic of discussion in the conference call. This table name is stored in the Table column of the NotifyConference Call [notify_conference_call] table and can be tracked.
This parameter is used in conjunction with the data.sysId, data.addToWorkNotes, and allowMulticonference parameters.
Actions for which this parameter is valid:
start
Type
Description
Object
Results of the conference action.`.status`: Status of the conference action. - Data type: Boolean - Possible values: - true: Conference action succeeded - false: Conference action failed `.successMessages`: If *status* is true, success message\(s\), else empty. - Data type: Array of Strings `.warnMessages`: If *status* is false, any warning messages thrown during processing. - Data type: Array of Strings `.errorMessages`: If *status* is false, any error messages thrown during processing. - Data type: Array of Strings
The following example shows how to create a function to call doConferenceAction() to manipulate the participants in a conference call by passing in the action and the participants.
/**
*
* @param {string} action - action to perform on the conference object or participant object
* @param {Array} participants;
*/
function doConferenceAction(action, participants) {
var data = NotifyOnTaskClient.getNotifyActionTemplate();
data.serviceProvider = 'Telephony'; // e.g 'Zoom', 'WebEx'
data.confId = 'Active conference sysId';
data.items = participants;
NotifyOnTaskClient.doConferenceAction(action, data).then(function (result) {
var kickActionResult = result[0];
if (kickActionResult.status)
console.log(action + ' succeeded');
else {
kickActionResult.warnMessages.forEach(function (msg) {
console.warn(msg);
});
kickActionResult.errorMessages.forEach(function (msg) {
console.error(msg);
});
}
}, function (errMsg) {
console.log(errMsg)
});
}
// kick participants
doConferenceAction('kick', [{notifyParticipantId: 'notifyParticipantSysId'}]);
// kick multiple participants
doConferenceAction('multiKick',
[{notifyParticipantId: 'notifyParticipantSysId'},
{notifyParticipantId: 'notifyParticipantSysId'}]);
// Mute participants
doConferenceAction('mute', [{notifyParticipantId: 'notifyParticipantSysId'}]);
doConferenceAction('mute', [{notifyParticipantId: 'notifyParticipantSysId'}]);
doConferenceAction('multiMute',
[{notifyParticipantId: 'notifyParticipantSysId'},
{notifyParticipantId: 'notifyParticipantSysId'}]);
// self join to any confernece.
doConferenceAction('selfJoin', [{id: 'logged in userId'}]);
NotifyOnTaskClient - endConference(Object data)
Terminates the specified conference call.
Name
Type
Description
data
Object
Object that describes the conference call.
data.confId
String
Sys_id of the conference call.
data.serviceProvider
String
Required. Name of conference service provider, such as Zoom or Webex.
Type
Description
Object
Results of the conference action.`.status`: Status of the conference action. - Data type: Boolean - Possible values: - true: Conference action succeeded - false: Conference action failed `.successMessages`: If *status* is true, success message\(s\), else empty. - Data type: Array of Strings `.warnMessages`: If *status* is false, any warning messages thrown during processing. - Data type: Array of Strings `.errorMessages`: If *status* is false, any error messages thrown during processing. - Data type: Array of Strings
function endConferenceCall() {
var data = NotifyOnTaskClient.getNotifyActionTemplate();
data.serviceProvider = 'Telephony'; // e.g 'Zoom', 'WebEx'
data.confId = 'Active conference sysId';
NotifyOnTaskClient.endConference(data).then(function (result) {
var endActionResult = result[0];
if (endActionResult.status)
console.log('Conference has been ended');
else {
endActionResult.warnMessages.forEach(function (msg) {
console.warn(msg);
});
endActionResult.errorMessages.forEach(function (msg) {
console.error(msg);
});
}
}, function (errMsg) {
console.log(errMsg);
});
}
NotifyOnTaskClient - getNotifyActionTemplate()
Returns a JSON data template to use with the doConferenceAction() method. Using this template automatically structures the data object so that you don't have to manually create it.
Call this method prior to calling the doConferenceAction() method. For the desired conference call action, set the desired parameters within the template, and then pass the template in the doConferenceAction() call. For additional information on the valid parameters for each action, see doConferenceAction().
Note: This is a helper method. You can also manually construct this object and pass it into the doConferenceAction() method and have the same outcome.
Name
Type
Description
None
Type
Description
data
Object that describes the conference call.
data.addToWorkNotes
Flag that indicates whether to add information about the participants that were included in the conference call in the work notes field of the associated record. For this functionality to work, you must also specify values in the data.table and data.sysId parameters. These parameters identify the record in which to add the work notes.
Default: false
Actions for which this parameter is valid:
join
multiJoin
selfJoin
start
data.allowMultconference
Flag that indicates whether to allow multiple conference calls for a specific record at one time. For this functionality to work, you must also specify values in the data.table and data.sysId parameters. These parameters identify the record that is allowed to have multiple conference calls.
Default: false
Actions for which this parameter is valid:
start
data.confId
Sys_id of the conference call. Table: Notify Conference Call [notify_conference_call]
Actions for which this parameter is required:
end
join
multiJoin
selfJoin
Note: Participant actions such as mute, unmute, and kick don't require this parameter to be set as the method obtains this information from the Notify Conference Call Participant [notify_participant] table.
data.fromNumber
Service provider number to call into for the conference call. Locate this value in the Number or Phone number column of the Notify Phone Number \[notify\_number\] table. Actions for which this parameter is required: - start
data.isNewConference
Flag that indicates whether this is a new or an existing conference call. Valid values: - true: New conference call - false: Existing conference call Default: false Actions for which this parameter is valid: - start
data.items
Information for each participant to include in the conference call. Valid array values:
id: Sys_id of user; located in the User [sys_User] table.
Valid actions: join, multiJoin, start
notifyParticipantId: Sys ID of the Notify participant; located in the Notify Participant [notify_participant] table.
phoneNumber: Phone number of the participant. If this value is passed in conjunction with either the id or notifyParticipantId, this value supersedes the phone numbers in the user/participant record and is used to place the call.
Valid actions: join, multiJoin, start
email: Email address of the participant.
Valid actions: join, multiJoin, start
data.message
Message that is read aloud when a user answers the call, such as, "P1 incident has been created please login to instance." Actions for which this parameter is valid: - join - multiJoin - start
data.serviceProvider
Required. Name of conference service provider, such as Zoom or Webex. Actions for which this parameter is required: - all
data.sysId
Sys_id of the source record to associate with the conference call. For example, if a conference call is held to discuss a specific incident or problem, put the sys_id of the incident or problem record in this value. This sys_id is stored in the Source column of the NotifyConference Call [notify_conference_call] table and can later be tracked.
This parameter is used in conjunction with the data.Table, data.addToWorkNotes, and allowMulticonference parameters.
Actions for which this parameter is valid:
start
data.table
Table that contains the source record to associate with the conference call. A source record can be any record, such as an "incident" or "problem", that is the topic of discussion in the conference call. This table name is stored in the Table column of the NotifyConference Call [notify_conference_call] table and can be tracked.
This parameter is used in conjunction with the data.sysId, data.addToWorkNotes, and allowMulticonference parameters.
Actions for which this parameter is valid:
start
The following example shows how to call getNotifyActionTemplate() to obtain the data template necessary to define the actions for doConferenceAction().
/**
*
* @param {string} action - action to perform on the conference object or participant object
* @param {Array} participants;
*/
function doConferenceAction(action, participants) {
var data = NotifyOnTaskClient.getNotifyActionTemplate();
data.serviceProvider = 'Telephony'; // e.g 'Zoom', 'WebEx'
data.confId = 'Active conference sysId';
data.items = participants;
NotifyOnTaskClient.doConferenceAction(action, data).then(function (result) {
var kickActionResult = result[0];
if (kickActionResult.status)
console.log(action + ' succeeded');
else {
kickActionResult.warnMessages.forEach(function (msg) {
console.warn(msg);
});
kickActionResult.errorMessages.forEach(function (msg) {
console.error(msg);
});
}
}, function (errMsg) {
console.log(errMsg)
});
}
// kick participants
doConferenceAction('kick', [{notifyParticipantId: 'notifyParticipantSysId'}]);
// kick multiple participants
doConferenceAction('multiKick',
[{notifyParticipantId: 'notifyParticipantSysId'},
{notifyParticipantId: 'notifyParticipantSysId'}]);
// Mute participants
doConferenceAction('mute', [{notifyParticipantId: 'notifyParticipantSysId'}]);
doConferenceAction('mute', [{notifyParticipantId: 'notifyParticipantSysId'}]);
doConferenceAction('multiMute',
[{notifyParticipantId: 'notifyParticipantSysId'},
{notifyParticipantId: 'notifyParticipantSysId'}]);
// self join to any confernece.
doConferenceAction('selfJoin', [{id: 'logged in userId'}]);
NotifyOnTaskClient - start(Object data)
Starts a new conference call.
Name
Type
Description
data
Object
Object that describes the conference call.
data.addToWorkNotes
Boolean
Optional.Flag that indicates whether to add information about the participants that were included in the conference call in the work notes field of the associated record. For this functionality to work, you must also specify values for the data.table and data.sysId parameters to identify the record in which to add the work notes.
Default: false
data.allowMulticonference
Boolean
Optional. Flag that indicates whether to allow multiple conference calls for a specific record at one time. For this functionality to work, you must also specify values in the data.table and data.sysId parameters. These parameters identify the record that is allowed to have multiple conference calls.
Default: false
data.fromNumber
String
Required. Service provider number to call into for the conference call. Locate this value in the Number or Phone number column of the Notify Phone Number \[notify\_number\] table.
data.items
Array
Optional. Information for each participant to include in the conference call.
Phone number of the participant. If this value is passed in conjunction with either the id or notifyParticipantId parameter, this value supersedes the phone numbers in the user/participant record and is used to place the call.
data.message
String
Optional. Message that is read aloud when a user answers the call, such as, "P1 incident has been created please login to instance."
data.serviceProvider
String
Required. Name of conference service provider, such as Zoom or Webex.
data.sysId
String
Optional. Sys_id of the source record to associate with the conference call. For example, if a conference call is held to discuss a specific incident or problem, put the sys_id of the incident or problem record in this value. This sys_id is stored in the Source column of the NotifyConference Call [notify_conference_call] table and can later be tracked.
This parameter is used in conjunction with the data.Table, data.addToWorkNotes, and allowMulticonference parameters.
data.table
String
Optional. Table that contains the source record to associate with the conference call. A source record can be any record, such as an "incident" or "problem", that is the topic of discussion in the conference call. This table name is stored in the Table column of the NotifyConference Call [notify_conference_call] table and can be tracked.
This parameter is used in conjunction with the data.sysId, data.addToWorkNotes, and allowMulticonference parameters.
Type
Description
Object
Results of the conference action.`.status`: Status of the conference action. - Data type: Boolean - Possible values: - true: Conference action succeeded - false: Conference action failed `.successMessages`: If *status* is true, success message\(s\), else empty. - Data type: Array of Strings `.warnMessages`: If *status* is false, any warning messages thrown during processing. - Data type: Array of Strings `.errorMessages`: If *status* is false, any error messages thrown during processing. - Data type: Array of Strings
The following code example shows how to call this method.