NotifyOnTaskClient - Client

concept brazil Updated Sep 10, 2026 17 min read NotifyOnTaskClient.md
Raw file servicenow.com

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.

Parent Topic:Client API reference

NotifyOnTaskClient - addParticipants(Object data)

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. ``` "items": [ "email": "String", "id": "String", "notifyParticipantId": "String", "phoneNumber": "String" ]

Text
</td></tr><tr><td>
data.items.email
</td><td>
String
</td><td>
Email address of the participant.
</td></tr><tr><td>
data.items.id
</td><td>
String
</td><td>
User sys\_id.Table: User \[sys\_User\]
</td></tr><tr><td>
data.items.notifyParticipantId
</td><td>
String
</td><td>
Participant sys\_id.Table: Notify Participant \[notify\_participant\]
</td></tr><tr><td>
data.items.phoneNumber
</td><td>
String
</td><td>
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.
</td></tr><tr><td>
data.message
</td><td>
String
</td><td>
Message that is read aloud when a user answers the call, such as, "P1 incident has been created please login to instance."
</td></tr><tr><td>
data.serviceProvider
</td><td>
String
</td><td>
Required. Name of conference service provider, such as Zoom or Webex.
</td></tr><tr><td>
data.sysId
</td><td>
String
</td><td>
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.
</td></tr><tr><td>
data.table
</td><td>
String
</td><td>
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.
</td></tr></tbody></table><table id="table_rpj_1y5_nhb" class="returns"><thead><tr><th>
Type
</th><th>
Description
</th></tr></thead><tbody><tr><td>
Object
</td><td>
Results of the conference action.`<action>.status`: Status of the conference action.
-   Data type: Boolean-   Possible values:    -   true: Conference action succeeded    -   false: Conference action failed
`<action>.successMessages`: If *status* is true, success message\(s\), else empty.
-   Data type: Array of Strings
`<action>.warnMessages`: If *status* is false, any warning messages thrown during processing.
-   Data type: Array of Strings
`<action>.errorMessages`: If *status* is false, any error messages thrown during processing.
-   Data type: Array of Strings
</td></tr></tbody></table>The following code example shows how to call this method.

function addToConferenceCall() { var data = NotifyOnTaskClient.getNotifyActionTemplate(); data.serviceProvider = 'Telephony'; // e.g 'Zoom', 'WebEx' data.confId = 'Active conference sysId'; data.items.push({ id: 'userSysId' }); data.items.push({ phoneNumber: '+917799555331' }); data.items.push({ email: 'yln99518@gmail.com' });

NotifyOnTaskClient.addParticipants(data).then(function (result) {
    var joinActionResult = result[0];
    if(joinActionResult.status) {
        joinActionResult.successMessages.forEach(function(msg) {
            console.log(msg);
        });
        return;
    }

    joinActionResult.warnMessages.forEach(function(msg) {
        console.warn(msg);
    });
    joinActionResult.errorMessages.forEach(function(msg) {
        console.error(msg);
    });
}, function (errMsg) {
    console.log(errMsg);
});

}

Text
## NotifyOnTaskClient - doConferenceAction\(String action, Object data\)
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.
<table id="table_qqs_vdv_nhb" class="parameters"><thead><tr><th>
Name
</th><th>
Type
</th><th>
Description
</th></tr></thead><tbody><tr><td>
action
</td><td>
String
</td><td>
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**.
</td></tr><tr><td>
data
</td><td>
Object
</td><td>
Object that describes the conference call.
</td></tr><tr><td>
data.addToWorkNotes
</td><td>
Boolean
</td><td id="data.addToWorkNotes-entry-NConf">
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
</td></tr><tr><td>
data.allowMulticonference
</td><td>
Boolean
</td><td id="data.allowMulticonference-entry-NConf">
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
</td></tr><tr><td>
data.confId
</td><td>
String
</td><td id="data.confId-entry-NConf">
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.
</td></tr><tr><td>
data.fromNumber
</td><td>
String
</td><td id="data.fromNumber-entry-NConf">
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
</td></tr><tr><td>
data.isNewConference
</td><td>
Boolean
</td><td id="data.isNewConference-entry-NConf">
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
</td></tr><tr><td>
data.message
</td><td>
String
</td><td id="data.message-entry-NConf">
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
</td></tr><tr><td>
data.items
</td><td>
Array
</td><td id="data.items-entry-NConf">
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.
Valid actions: join, kick, multiJoin, mute, start, unmute
-   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

</td></tr><tr><td>
data.serviceProvider
</td><td>
String
</td><td id="data.serviceProvider-entry-NConf">
Required. Name of conference service provider, such as Zoom or Webex. Actions for which this parameter is required:
-   all
</td></tr><tr><td>
data.sysId
</td><td>
String
</td><td id="data.sys_id-entry-NConf">
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
</td></tr><tr><td>
data.table
</td><td>
String
</td><td id="data.table-entry-NConf">
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
</td></tr></tbody></table><table id="table_rqs_vdv_nhb" class="returns"><thead><tr><th>
Type
</th><th>
Description
</th></tr></thead><tbody><tr><td>
Object
</td><td>
Results of the conference action.`<action>.status`: Status of the conference action.
-   Data type: Boolean-   Possible values:    -   true: Conference action succeeded    -   false: Conference action failed
`<action>.successMessages`: If *status* is true, success message\(s\), else empty.
-   Data type: Array of Strings
`<action>.warnMessages`: If *status* is false, any warning messages thrown during processing.
-   Data type: Array of Strings
`<action>.errorMessages`: If *status* is false, any error messages thrown during processing.
-   Data type: Array of Strings
</td></tr></tbody></table>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'}]);

Text
## 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.|
<table id="table_dqd_qcv_nhb" class="returns"><thead><tr><th>
Type
</th><th>
Description
</th></tr></thead><tbody><tr><td>
Object
</td><td>
Results of the conference action.`<action>.status`: Status of the conference action.
-   Data type: Boolean-   Possible values:    -   true: Conference action succeeded    -   false: Conference action failed
`<action>.successMessages`: If *status* is true, success message\(s\), else empty.
-   Data type: Array of Strings
`<action>.warnMessages`: If *status* is false, any warning messages thrown during processing.
-   Data type: Array of Strings
`<action>.errorMessages`: If *status* is false, any error messages thrown during processing.
-   Data type: Array of Strings
</td></tr></tbody></table>```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.

Valid actions: join, kick, multiJoin, mute, start, unmute

  • 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\(\).
JavaScript
/** *  * @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 participantsdoConferenceAction('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. ``` "items": [ "email": "String", "id": "String", "notifyParticipantId": "String", "phoneNumber": "String" ]

Text
</td></tr><tr><td>
data.items.email
</td><td>
String
</td><td>
Email address of the participant.
</td></tr><tr><td>
data.items.id
</td><td>
String
</td><td>
User sys\_id.Table: User \[sys\_User\]
</td></tr><tr><td>
data.items.notifyParticipantId
</td><td>
String
</td><td>
Participant sys\_id.Table: Notify Participant \[notify\_participant\]
</td></tr><tr><td>
data.items.phoneNumber
</td><td>
String
</td><td>
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.
</td></tr><tr><td>
data.message
</td><td>
String
</td><td>
Optional. Message that is read aloud when a user answers the call, such as, "P1 incident has been created please login to instance."
</td></tr><tr><td>
data.serviceProvider
</td><td>
String
</td><td>
Required. Name of conference service provider, such as Zoom or Webex.
</td></tr><tr><td>
data.sysId
</td><td>
String
</td><td>
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.
</td></tr><tr><td>
data.table
</td><td>
String
</td><td>
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.
</td></tr></tbody></table><table id="table_jrr_133_nhb" class="returns"><thead><tr><th>
Type
</th><th>
Description
</th></tr></thead><tbody><tr><td>
Object
</td><td>
Results of the conference action.`<action>.status`: Status of the conference action.
-   Data type: Boolean-   Possible values:    -   true: Conference action succeeded    -   false: Conference action failed
`<action>.successMessages`: If *status* is true, success message\(s\), else empty.
-   Data type: Array of Strings
`<action>.warnMessages`: If *status* is false, any warning messages thrown during processing.
-   Data type: Array of Strings
`<action>.errorMessages`: If *status* is false, any error messages thrown during processing.
-   Data type: Array of Strings
</td></tr></tbody></table>The following code example shows how to call this method.

function startConferenceCall() { var data = NotifyOnTaskClient.getNotifyActionTemplate(); data.table = 'incident'; data.sysId = '1234'; data.serviceProvider = serviceProvider; data.addToWorkNotes = true; data.fromNumber = 'Telephony Number'; data.items.push({ id: 'userSysId' }); data.items.push({ phoneNumber: '+917799555332' }); data.items.push({ email: 'yln99517@gmail.com' });

NotifyOnTaskClient.start(data).then(function (result) {
    var startActionResult = result[0];
    if(startActionResult.status) {
        startActionResult.successMessages.forEach(function(msg) {
            console.log(msg);
        });
        return;
    }

    startActionResult.warnMessages.forEach(function(msg) {
        console.warn(msg);
    });
    startActionResult.errorMessages.forEach(function(msg) {
        console.error(msg);
    });
}, function (errMsg) {
    console.log(errMsg);
});

}

Text

Search documentation
Search document titles and file paths on the brazil branch