There are two namespaces which provide an API for initiating and monitoring the different types of interactions (Calls, Chats, Emails, etc) and their containing queues:
This topic contains the following sections:
If the entire contents of an Interaction Queue is to be watched, Queue watches are more efficient than having individual Interaction watches on each Interaction in the Queue.
For both Queues and Interactions, the Interaction attribute names can be standard CIC attribute names or custom attribute names to support custom handlers / integrations.
For information about the standard attributes defined by the Interaction Center System, see the "Interaction Attributes Technical Reference"
in the Interaction Center Documentation Library. This document describes the attributes and the format of their values.
The API to create an interaction the POST /icws/{sessionId}/interactions method can be used. An example call looks like:
POST /icws/{sessionId}/interactions
{ "__type": "urn:inin.com:interactions:createCallParameters", "target": "555-0123", "workgroup": "Support" }
In the example above, a call interaction will be created to "555-0123" on behalf of the "Support" workgroup.
Each interaction has a number of standard attributes as well as custom attributes that applications can add to the interaction. The GET /icws/{sessionId}/interactions/{interactionId} method can be used to retrieve these attributes for the interaction. The {interactionId}
should be replaced with the ID of the interaction. Below is an example of getting the Eic_RemoteName and Eic_State attributes for an interaction with an ID of 123456789
.
GET /icws/{sessionId}/interactions/123456789?select=Eic_RemoteName,Eic_State
For information about the standard attributes defined by the Interaction Center System, see the "Interaction Attributes Technical Reference" in the Interaction Center Documentation Library. This document describes the attributes and the format of their values.
The APIs to perform actions on an interaction follows this pattern:
POST /icws/{sessionId}/interactions/{interactionId}/{action}
In the example above, {interactionId}
should be replaced with the ID of the interaction, and {action}
should be replaced with the action to be performed. Below are some examples of this API, again using 123456789
as the interaction ID:
Put an interaction on hold using POST /icws/{sessionId}/interactions/{interactionId}/hold:
POST /icws/{sessionId}/interactions/123456789/hold
{ "on" : true }
Mute an interaction using POST /icws/{sessionId}/interactions/{interactionId}/mute:
POST /icws/{sessionId}/interactions/123456789/mute
{ "on" : true }
Record an interaction using POST /icws/{sessionId}/interactions/{interactionId}/record:
POST /icws/{sessionId}/interactions/123456789/record
{ "on" : true, "supervisor" : false }
Transfer an interaction using POST /icws/{sessionId}/interactions/{interactionId}/blind-transfer:
POST /icws/{sessionId}/interactions/123456789/blind-transfer
{ "target" : "user:John.Smith" }
The API for subscribing to a queue is PUT /icws/{sessionId}/messaging/subscriptions/queues/{subscriptionId}. The {subscriptionId}
should be replaced with a string that maps to the subscription being created. This ID can be assigned arbitrarily and should be managed by your application. The body of the request needs to at least contain a JSON representation of the queue IDs and attributes to watch. Below are some examples of this:
Subscribe to "InteractionStates". This subscription will send update messages for the "Eic_State" attribute on interactions in the System queue, and the User queue whose ID is "John.Smith".
PUT /icws/{sessionId}/messaging/subscriptions/queues/InteractionStates
{ "queueIds": [ { "queueType": 0, "queueName": "MyUserName" }, { "queueType": 1, "queueName": "John.Smith" } ], "attributeNames": [ "Eic_State" ] }
Subscribe to "SalesInteractionStatesAndTimes". This subscription will send update messages for the "Eic_State" and "Eic_ConnectDurationTime" attributes on interactions in the "InsideSales" and "OutsideSales" workgroup queues.
PUT /icws/{sessionId}/messaging/subscriptions/queues/SalesInteractionStatesAndTimes
{ "queueIds": [ { "queueType": 2, "queueName": "InsideSales" }, { "queueType": 2, "queueName": "OutsideSales" } ], "attributeNames": [ "Eic_State", "Eic_ConnectDurationTime" ] }
The API to unsubscribe from a queue is DELETE /icws/{sessionId}/messaging/subscriptions/queues/{subscriptionId}. The {subscriptionId}
should be replaced with a string that maps to the subscription being deleted. The ID must match the ID used when subscribing. Below is an example of this API:
Unsubscribe from a subscription whose ID is "HeldInteractions"
DELETE /icws/{sessionId}/messaging/subscriptions/queues/HeldInteractions
There is no accompanying JSON object required for unsubscribing.