The NotifyConferenceUtil API provides methods to manage Notify conference calls and SMS messages for various telephony service providers, such as Zoom and Webex.

Using the NotifyConferenceUtil API you can:

  • Create new conference calls
  • Add participants by phone number or user ID
  • Remove participants from a conference call
  • Mute participants in a conference call
  • Unmute participants in a conference call
  • Obtain the capabilities of a specified service provider
  • End a conference call

You can use this API in both scoped and global scripts. To use this API you must activate the Conference Notify plugin (com.snc.notify) which requires a separate subscription. For details on activating this plugin, see Activate Notify.

NotifyConferenceUtils - NotifyConferenceUtils()

Instantiates a NotifyConferenceUtils object (constructor).

Table 1. Parameters
Name Type Description
None

Example

function () {
	var confGR = new GlideRecord('notify_conference_call');
	confGR.get('76d3364d0b5133008e64aabcb4673a6d');

	var confUtils = new NotifyConferenceUtils();
	var actionResult = confUtils.addToConferenceByPhoneNumber("+917799555331", confGR)
	if (actionResult.status)
		gs.info('Participant has been added to conference');
	else {
		gs.info('join operation failed');
		actionResult.warnMessages.forEach(function (msg) {
			gs.info(msg);
		});
		actionResult.errorMessages.forEach(function (msg) {
			gs.info(msg);
		})
	}
})();

NotifyConferenceUtils - addToConferenceByPhoneNumber(String toNumber, GlideRecord confGR)

Adds a participant to a specified conference call using their phone number to identify the participant.

Table 2. Parameters
Name Type Description
toNumber String Phone number of the participant to add to the conference call.
confGR GlideRecord GlideRecord of the conference call to which to add the specified participant.

Table: Notify Conference Call [notify_conference_call]

Table 3. Returns
Type Description
Object 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

Example

The following code example shows how to call this method.

function () {
	var confGR = new GlideRecord('notify_conference_call');
	confGR.get('76d3364d0b5133008e64aabcb4673a6d');

	var confUtils = new NotifyConferenceUtils();
	var actionResult = confUtils.addToConferenceByPhoneNumber("+917799555331", confGR)
	if (actionResult.status)
		gs.info('Participant has been added to conference');
	else {
		gs.info('join operation failed');
		actionResult.warnMessages.forEach(function (msg) {
			gs.info(msg);
		});
		actionResult.errorMessages.forEach(function (msg) {
			gs.info(msg);
		})
	}
})();

NotifyConferenceUtils - addToConferenceByUserId(String userId, GlideRecord confGR)

Adds a participant to the conference call referenced by the passed in GlideRecord using their unique user identifier.

Table 4. Parameters
Name Type Description
userId String Sys ID of the participant to add to the specified conference call.

Table: User [sys_user]

confGR GlideRecord GlideRecord of the conference call to add the specified participant.

Table: Notify Conference Call [notify_conference_call]

Table 5. Returns
Type Description
Object 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

Example

The following code example shows how to call this method.

(function () {
	var confGR = new GlideRecord('notify_conference_call');
	confGR.get('76d3364d0b5133008e64aabcb4673a6d');

	var confUtils = new NotifyConferenceUtils();
	var actionResult = confUtils.addToConferenceByUserId(gs.getUserID(), confGR)
	if (actionResult.status)
		gs.info('Participant has been added to conference');
	else {
		gs.info('join operation failed');
		actionResult.warnMessages.forEach(function (msg) {
			gs.info(msg);
		});
		actionResult.errorMessages.forEach(function (msg) {
			gs.info(msg);
		})
	}
})();

NotifyConferenceUtils - 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 7. Returns
Type Description
Object 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

Example

(function (confId) {
	var confUtils = new NotifyConferenceUtils();
	var data = confUtils.getConferenceInputDataTemplate();
	data.table = 'incident';
	data.sysId = '1234';
	data.addToWorkNotes = false;
	data.confId = confId;
	data.message = 'p1 incident has been created';
	data.fromNumber = 'twilio/Telephony driver number';
	data.items.push({ id: 'user3SysId', phoneNumber: '+917799555332' });
	data.items.push({ id: 'user4SysId', email: 'yln99518@gmail.com' });

	var result = confUtils.doConferenceAction('start', data);
	if (result.status) {
		gs.info('Start conference action succeeded');
	} else
		gs.info('Start conference action failed');

	result.errorMessages.forEach(function (msg) {
		gs.info(msg);
	});
	result.warnMessages.forEach(function (msg) {
		gs.info(msg);
	});
	result.successMessages.forEach(function (msg) {
		gs.info(msg);
	});
})('activeConfSysId');

NotifyConferenceUtils - getConferenceInputDataTemplate()

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 that object into the doConferenceAction() method and have the same outcome.
Table 8. Parameters
Name Type Description
None

Example

(function (confId) {
	var confUtils = new NotifyConferenceUtils();
	var data = confUtils.getConferenceInputDataTemplate();
	data.confId = confId;
	var result = confUtils.doConferenceAction('end', data);
	if (result.status) {
		gs.info('Conference call has been ended');
	} else
		gs.info('End conference call action failed');

	result.errorMessages.forEach(function (msg) {
		gs.info(msg);
	});
	result.warnMessages.forEach(function (msg) {
		gs.info(msg);
	});
	result.successMessages.forEach(function (msg) {
		gs.info(msg);
	});
})('activeConfSysId');

NotifyConferenceUtils - getServiceProvidersCapabilities()

Returns the capabilities of all telephony service provider drivers in the instance.

Possible capabilities include:
  • archive: archives the conference after it ends
  • beepOnLeave: plays a "beep" tone when a participant leaves the conference call
  • beepOnJoin: plays a "beep" tone when a participant joins the conference call
  • end: ends the identified conference call
  • filesharing: allows file sharing between participants
  • join: adds a participant to a conference call
  • kick: removes a participant from a conference call
  • multiJoin: adds multiple participants to a conference call
  • multiKick: removes multiple participants from a conference call
  • muteOnJoin: mutes a participant when they initially join a conference call
  • multiUnmute: unmutes multiple participants for a conference call
  • record: records conference calls
  • recording: provides an on-screen indicator when the conference call is being recorded
  • screenSharing: allows participant screens to be shared with the group
  • selfJoin: adds the current logged in user to a conference call
  • speaking: provides an on-screen message as to who is currently speaking
  • start: starts the identified conference call
  • unmute: unmutes a participant in a conference call
Table 10. Parameters
Name Type Description
None
Table 11. Returns
Type Description
Object Key-value pairs of the status of each driver capability.

Valid values:

  • isSupported = 0: capability is not supported
  • isSupported = 1: capability is supported

Example

List driver capabilities for all telephony service provider drivers in the instance.

(function () {
	var confUtils = new NotifyConferenceUtils();
	var providerToCapability = confUtils.getServiceProvidersCapabilites();
	for (var provider in providerToCapability) {
		gs.info('{0} supported capabilities \n\n', provider);
		var capabilities = providerToCapability[provider]
		for (var cap in capabilities)
			if(confUtils.isActionSupported(capabilities[cap].isSupported))
				gs.info('"{0}" action supported', cap);
			else
				gs.info("'{0}' action is not supported by this conference driver", cap);
	}
})();

Output: The method returns a node similar to the following for each active telephony service provider within the instance.

{
    "Telephony": {
        "start": {
            "isSupported": 1,
            "meta": {}
        },
        "end": {
            "isSupported": 1,
            "meta": {}
        },
        "selfJoin": {
            "isSupported": 1,
            "meta": {}
        },
        "join": {
            "isSupported": 1,
            "meta": {}
        },
        "multiJoin": {
            "isSupported": 1,
            "meta": {}
        },
        "mute": {
            "isSupported": 1,
            "meta": {}
        },
        "multiMute": {
            "isSupported": 1,
            "meta": {}
        },
        "unmute": {
            "isSupported": 1,
            "meta": {}
        },
        "multiUnmute": {
            "isSupported": 1,
            "meta": {}
        },
        "kick": {
            "isSupported": 1,
            "meta": {}
        },
        "multiKick": {
            "isSupported": 1,
            "meta": {}
        },
        "record": {
            "isSupported": 0,
            "meta": {}
        },
        "speaking": {
            "isSupported": 0,
            "meta": {}
        },
        "recording": {
            "isSupported": 0,
            "meta": {}
        },
        "screenSharing": {
            "isSupported": 0,
            "meta": {}
        },
        "fileSharing": {
            "isSupported": 0,
            "meta": {}
        },
        "archive": {
            "isSupported": 0,
            "meta": {}
        },
        "muteOnJoin": {
            "isSupported": 0,
            "meta": {}
        },
        "beepOnJoin": {
            "isSupported": 0,
            "meta": {}
        },
        "beepOnLeave": {
            "isSupported": 0,
            "meta": {}
        }
    }
}

NotifyConferenceUtils - isActionSupported(Number action)

Determines whether a Notify conference action is supported by a telephony service provider.

To use this method, you must first call the getServiceProviderCapabilities() method. This method returns an object that contains information about the availability of each possible Notify conference action for each service provider configured in your instance.

For example:

{
    "Telephony": {
        "start": {
            "isSupported": 1,
            "meta": {}
        },
        "end": {
            "isSupported": 1,
            "meta": {}
        },
        "selfJoin": {
            "isSupported": 1,
            "meta": {}
        },
        "join": {
            "isSupported": 1,
            "meta": {}
        },
        "multiJoin": {
            "isSupported": 1,
            "meta": {}
        },
        "mute": {
            "isSupported": 1,
            "meta": {}
        },
        "multiMute": {
            "isSupported": 1,
            "meta": {}
        },
        "unmute": {
            "isSupported": 1,
            "meta": {}
        },
        "multiUnmute": {
            "isSupported": 1,
            "meta": {}
        },
        "kick": {
            "isSupported": 1,
            "meta": {}
        },
        "multiKick": {
            "isSupported": 1,
            "meta": {}
        },
        "record": {
            "isSupported": 0,
            "meta": {}
        },
        "speaking": {
            "isSupported": 0,
            "meta": {}
        },
        "recording": {
            "isSupported": 0,
            "meta": {}
        },
        "screenSharing": {
            "isSupported": 0,
            "meta": {}
        },
        "fileSharing": {
            "isSupported": 0,
            "meta": {}
        },
        "archive": {
            "isSupported": 0,
            "meta": {}
        },
        "muteOnJoin": {
            "isSupported": 0,
            "meta": {}
        },
        "beepOnJoin": {
            "isSupported": 0,
            "meta": {}
        },
        "beepOnLeave": {
            "isSupported": 0,
            "meta": {}
        }
    }
}
Table 12. Parameters
Name Type Description
action Number

Value of the isSupported parameter returned by the getServiceProvidersCapabilities() method for a specific action and service provider.

Note: Although the isSupported value may appear to be a Boolean, it is actually a Number. Do not try and evaluate the capabilities as Boolean values. Use this method as the associated values may be expanded in future versions.
Table 13. Returns
Type Description
Boolean Flag that indicates whether the telephony service provider supports the specified action.

Valid values:

  • true: action is supported by the service provider
  • false: action is not supported by the service provider

Example

(function () {
  var confUtils = new NotifyConferenceUtils();
  var providerToCapability = confUtils.getServiceProvidersCapabilites();
    for (var provider in providerToCapability) {
      gs.info('{0} supported capabilities \n\n', provider);
      var capabilities = providerToCapability[provider]
      for (var cap in capabilities)
        if (confUtils.isActionSupported(capabilities[cap].isSupported))
          gs.info('"{0}" action supported', cap);
        else
          gs.info("'{0}' action is not supported by this conference driver", cap);
    }
})();

NotifyConferenceUtils - kickByParticipantGR(GlideRecord notifyParticipantGR)

Removes the participant associated with the passed in GlideRecord from the current conference call.

Table 14. Parameters
Name Type Description
notifyParticipantGR GlideRecord GlideRecord object of the participant to remove from the conference call.

Table: Notify Participant [notify_participant]

Table 15. Returns
Type Description
Object 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

Example

The following code example shows how to call this method.

(function () {
    var confUtils = new NotifyConferenceUtils();
    var participantGR = new GlideRecord('notify_participant');  // Participant record contains conf call ID
    participantGR.get('validParticipantSysId');
    var actionResult = confUtils.kickByParticipantGR(participantGR);
    if (actionResult.status)
        gs.info('Participant has been kicked out of conference');
    else {
        gs.info('kick operation failed');
        actionResult.warnMessages.forEach(function (msg) {
            gs.info(msg);
        });
        actionResult.errorMessages.forEach(function (msg) {
            gs.info(msg);
        })
    }
})()

NotifyConferenceUtils - muteByParticipantGR(GlideRecord notifyParticipantGR)

Mutes the participant associated with the passed in GlideRecord on the current conference call.

Table 16. Parameters
Name Type Description
notifyParticipantGR Object GlideRecord object of the participant to mute.

Table: Notify Participant [notify_participant]

Table 17. Returns
Type Description
Object 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

Example

The following code example shows how to call this method.

(function () {
    var confUtils = new NotifyConferenceUtils();
    var participantGR = new GlideRecord('notify_participant');
    participantGR.get('validSysId');
    var actionResult = confUtils.muteByParticipantGR(participantGR);
    if (actionResult.status)
        gs.info('Participant has been muted');
    else {
        gs.info('mute operation failed');
        actionResult.warnMessages.forEach(function (msg) {
            gs.info(msg);
        });
        actionResult.errorMessages.forEach(function (msg) {
            gs.info(msg);
        })
    }
})()

NotifyConferenceUtils - unmuteByParticipantGR(GlideRecord notifyParticipantGR)

Unmutes the participant associated with the passed in GlideRecord on the current conference call.

Table 18. Parameters
Name Type Description
notifyParticipantGR GlideRecord GlideRecord object of the participant to unmute. These records are located in the Notify Participant [notify_participant] table.
Table 19. Returns
Type Description
Object 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

Example

(function () {
    var confUtils = new NotifyConferenceUtils();
    var participantGR = new GlideRecord('notify_participant');
    participantGR.get('validSysId');
    var actionResult = confUtils.unmuteByParticipantGR(participantGR);
    if (actionResult.status)
        gs.info('Participant has been Unmuted');
    else {
        gs.info('Unmute operation failed');
        actionResult.warnMessages.forEach(function (msg) {
            gs.info(msg);
        });
        actionResult.errorMessages.forEach(function (msg) {
            gs.info(msg);
        })
    }
})();