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
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
Deletes the subscription to handler-sent notifications.
Returns
A promise to the subscription being deleted.
- Type
- IPromise
Events
received
The specified handler-sent notification was received.
Parameters
Name | Type | Description |
---|---|---|
notification | ININ.Addins.IC.IHandlerNotification |
The |
handlerSentNotifications | ININ.Addins.IC.HandlerSentNotifications |
The |