HandlerSentNotifications class

Member of ININ.Addins.IC Since 2016 R1 API Version 1

new HandlerSentNotifications()

Implements ININ.Addins.IC.ISubscription

Represents a subscription to handler-sent notifications.

Example

var subscription = new HandlerSentNotifications();
subscription.on("received", function(notification) {
    console.log(notification.data[0]);
});
subscription.subscribe({
    headers: [{ objectId: "addinHandler", eventId: "sayHelloResponse" }]
});

Methods

subscribe(request) :IPromise

Implements ININ.Addins.IC.ISubscription#subscribe

Async Since 2016 R1 API Version 1

Creates or updates the subscription to handler-sent notifications.

The application must be connected to Interaction Center. Callers can verify the connection by inspecting the ININ.Addins.IC.sessionInfo object.

Parameters

Name Type Description
request ININ.Addins.IC.IHandlerSentNotificationsSubscriptionRequest

The request.

Returns

A promise to the subscription being created or updated.

Type
IPromise

unsubscribe() :IPromise

Implements ININ.Addins.IC.ISubscription#unsubscribe

Async Since 2016 R1 API Version 1

Deletes the subscription to handler-sent notifications.

Returns

A promise to the subscription being deleted.

Type
IPromise

Events

received

Since 2016 R1 API Version 1

The specified handler-sent notification was received.

Parameters

Name Type Description
notification ININ.Addins.IC.IHandlerNotification

The ININ.Addins.IC.IHandlerNotification instance representing the notification.

handlerSentNotifications ININ.Addins.IC.HandlerSentNotifications

The ININ.Addins.IC.HandlerSentNotifications instance.