ININ.Addins.IC namespace

Member of ININ.Addins Since 2016 R1 API Version 1

The ININ.Addins.IC namespace provides APIs for communicating with Interaction Center without consuming an additional ICWS session or requiring the ICWS feature license. Some of these features include:

If the Interaction Center server is licensed with the ICWS feature license, an add-in can request an ICWS baseAuthConnectionRequestSettings object for creating another connection to the server to allow for further customization.

Members

sessionInfo :ININ.Addins.IC.ISessionInfo

Static Read-only Since 2016 R1 API Version 1

Represents the the current state of the application's session to Interaction Center.

Example
// Determine whether the application is connected
if (!ININ.Addins.IC.sessionInfo.connected) {
    console.log("Application is not connected");
}

// Observe when the application is connected
ININ.Addins.IC.sessionInfo.on("connected", function(sessionInfo) {
    console.log(sessionInfo.userId + " is connected to " + sessionInfo.icServer);
});

stationTypes :String

Static Read-only Enumeration Since 2018 R3 API Version 1

An enumeration of the different types of stations.

Properties:
Name Value Description
none "None"

The string representing a stationless station type.

workstation "Workstation"

The string representing a workstation station type.

remoteWorkstation "RemoteWorkstation"

The string representing a remote workstation station type.

remoteNumber "RemoteNumber"

The string representing a remote number station type.

Methods

getIcwsBaseUrl([host]) :string

Static Since 2016 R1 API Version 1

Calculates the base URL for communicating with the specified Session Manager host via ICWS.

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

The URL can be used in conjunction with the ICWS JavaScript Library to set the base URL via _util.setBaseUrl.

Parameters

Name Type Description
host string Optional

The Session Manager host. If not supplied, the URL to the connected host is returned.

Returns

The URL that can be used to communicate with the specified Session Manager host.

Type
string

requestIcwsConnectionRequestSettings([additionalProperties]) :IPromise

Async Static Since 2016 R1 API Version 1

Requests an ICWS baseAuthConnectionRequestSettings object for connecting to ICWS via POST /icws/connection.

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

The resulting baseAuthConnectionRequestSettings should be used immediately as it could expire and is not a guarantee to successfully establishing a connection via ICWS. The Interaction Center server must be licensed for the ICWS SDK license or the caller must supply Interactive Intelligence MarketPlace licensing information.

Please note: Creating additional connections to Interaction Center causes additional load which may degrade system performance and reliability.

For additional details, refer to the ICWS SDK documentation library.

Parameters

Name Type Description
additionalProperties Object Optional

Additional properties to append to the request settings.

Properties
Name Type Description
applicationName String Optional

Used by the Interaction Center and Interaction Center applications to display an association between an Interaction Center session and an application. If not supplied, the add-in's ID will be used.

marketPlaceApplicationLicenseName String Optional

The Interactive Intelligence MarketPlace application's license name. Only for use in add-ins distributed by the MarketPlace. When setting this, the marketPlaceApplicationCode property should also be set. This value can be obtained from the MarketPlace application's registration information.

marketPlaceApplicationCode String Optional

The Interactive Intelligence MarketPlace application code. Only for use in add-ins distributed by the MarketPlace. When setting this, the marketPlaceApplicationLicenseName property should also be set. This value can be obtained from the MarketPlace application's registration information.

Returns

An IPromise to the connection request settings.

Type
IPromise

sendHandlerNotification(handlerNotification) :IPromise

Async Static Since 2016 R1 API Version 1

Sends a notification to one or more custom handlers that are watching for the objectId and eventId pair on their initiator.

Due to the nature of custom handlers, the server does not provide any guarantee that the notification is handled or results in any side-effects.

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
handlerNotification ININ.Addins.IC.IHandlerNotification

The handler notification to send to the server.

Returns

An IPromise to the server accepting the handler notification request.

Type
IPromise

Example

// There must be a handler setup with an initiator with the specified `objectId` and `eventId` pair.
ININ.Addins.IC.sendHandlerNotification({
   objectId: "addinHandler",
   eventId: "sayHello",
   data: ["world"]
});

Classes

HandlerSentNotifications

Represents a subscription to handler-sent notifications.

Interfaces

IHandlerNotification

Represents a notification that is sent to or received from one or more handlers.

An add-in can send notifications to one or more handlers via ININ.Addins.IC.sendHandlerNotification.

IHandlerNotificationHeader

Represents a pair of the object identifier and event identifier.

IHandlerSentNotificationsSubscriptionRequest

Represents request to subscribe to the handler-sent notifications.

ISessionInfo

Represents the state of the application's session to Interaction Center.

IStationInfo

Represents the details about the user's logged in station.

ISubscription

Represents a subscription.

As a best practice, events should be bound by using on or once before calling subscribe. There may be events that fire before the IPromise returned from subscribe is resolved.

Namespaces

ININ.Addins.IC.Interactions
The ININ.Addins.IC.Interactions namespace provides APIs for working with interactions.
ININ.Addins.IC.Queues
The ININ.Addins.IC.Queues namespace provides APIs for working with queues.