ININ.Addins.IC.Interactions namespace

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

The ININ.Addins.IC.Interactions namespace provides APIs for working with interactions, including:

Members

attributeNames :String

Static Read-only Enumeration Since 2016 R1 API Version 1

An enumeration of common attribute names.

Properties:
Name Value Description
workgroupName "Eic_WorkgroupName"

The workgroup name.

conferenceId "Eic_ConferenceId"

The conference ID the interaction belongs to.

initiationTime "Eic_InitiationTime"

The time at which the interaction was initiated.

terminationTime "Eic_TerminationTime"

The time at which the interaction was terminated.

interactionId "Eic_CallId"

The interaction ID.

lineName "Eic_LineName"

The name of the line the interaction is currently on.

muted "Eic_Muted"

The muted state of the interaction.

private "Eic_Private"

The private state of the interaction.

remoteAddress "Eic_RemoteAddress"

The remote address of the interaction. This is the value that was dialed, and should be used for dialing.

remoteId "Eic_RemoteId"

The remote ID of the interaction. This is a display-friendly value that represents the dial string.

remoteName "Eic_RemoteName"

The remote name of the interaction.

stationName "Eic_StationName"

The name of the station the interaction is currently on.

userName "Eic_UserName"

The name of the user the interaction is currently assigned to.

notes "Eic_Note"

The notes associated with the interaction.

log "CallLog"

The interaction log.

stateDisplay "Eic_CallStateString"

A user displayable version of the current state of the interaction.

state "Eic_State"

The current state of the interaction. Values are defined in ININ.Addins.IC.Interactions.stateAttributeValues.

direction "Eic_CallDirection"

The direction of the current interaction. Values are defined in ININ.Addins.IC.Interactions.directionAttributeValues.

interactionType "Eic_ObjectType"

The interaction type. Values are defined in ININ.Addins.IC.Interactions.interactionTypeAttributeValues.

callType "Eic_CallType"

The type of call interaction. (Intercom/External) Values are defined in ININ.Addins.IC.Interactions.callTypeAttributeValues.

callTypeAttributeValues :String

Static Read-only Enumeration Since 2016 R1 API Version 1

An enumeration of the attribute values for the call type attribute (ININ.Addins.IC.Interactions.attributeNames.callType/Eic_CallType).

Properties:
Name Value Description
intercom "I"

An intercom interaction.

external "E"

An external interaction.

directionAttributeValues :String

Static Read-only Enumeration Since 2016 R1 API Version 1

An enumeration of the attribute values for the interaction direction attribute (ININ.Addins.IC.Interactions.attributeNames.direction/Eic_CallDirection).

Properties:
Name Value Description
incoming "I"

An incoming interaction direction.

outgoing "O"

An outgoing interaction direction.

interactionTypeAttributeValues :String

Static Read-only Enumeration Since 2016 R1 API Version 1

An enumeration of the attribute values for the interaction type attribute (ININ.Addins.IC.Interactions.attributeNames.interactionType/Eic_ObjectType).

Properties:
Name Value Description
call "Call"

A call interaction.

callback "Callback"

A callback interaction.

chat "Chat"

A chat interaction.

email "Email"

An email interaction.

generic "EIC Generic Object"

A generic interaction.

monitor "Monitor Object"

A monitor interaction.

recorder "Recorder Object"

A recorder interaction.

workItem "Work Item"

A work item interaction.

directMessage "Social Direct Message"

A Social Direct Message Interaction

socialConversation "Social Conversation"

A Social Conversation Interaction

selectedInteraction :ININ.Addins.IC.Interactions.ISelectedInteractionInfo

Static Read-only Since 2016 R1 API Version 1

Represents the currently selected interaction in the My Interactions view.

Example
// Observe when the selected interaction is changed.
ININ.Addins.IC.Interactions.selectedInteraction.on("changed", function(selectedInteraction) {
    console.log(selectedInteraction.interactionId + " is now selected in the My Interactions view.");
});

stateAttributeValues :String

Static Read-only Enumeration Since 2016 R1 API Version 1

An enumeration of the attribute values for the interaction state attribute (ININ.Addins.IC.Interactions.attributeNames.state/Eic_State).

Properties:
Name Value Description
alerting "A"

The alerting state.

connected "C"

The connected state.

held "H"

The held state.

messaging "M"

The messaging state.

offering "O"

The offering state.

parked "P"

The parked state.

proceeding "R"

The proceeding state.

system "S"

The system state.

internalDisconnect "I"

The internal disconnect state.

externalDisconnect "E"

The external disconnect state.

Methods

getAttributes(request) :IPromise

Async Static Since 2016 R1 API Version 1

Retrieves the current values for the specified attributes that are assigned to the specified interaction.

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.Interactions.IGetAttributesRequest

The requested interaction identifier and attribute names to retrieve.

Returns

A promise to an ININ.Addins.IC.Interactions.IInteraction that contains the requested attributes.

Type
IPromise

Example

// Retrieves a custom attribute and the state attribute from an interaction.
ININ.Addins.IC.Interactions.getAttributes({
    interactionId: // an interaction ID
    attributeNames: ["CUSTOM_ATTRIBUTE", ININ.Addins.IC.Interactions.attributeNames.state]
}).then(function(interaction) {
    var interactionState = interaction.getAttribute(ININ.Addins.IC.Interactions.attributeNames.state),
        customAttribute = interaction.getAttribute("CUSTOM_ATTRIBUTE");
    // ...
});

makeCall(target[, workgroup]) :IPromise

Async Static Since 2016 R4 API Version 3

Requests from the application to create a call interaction to the specified target. If a workgroup is specified, the call will be placed on behalf of that workgroup, otherwise it will be placed on behalf of the connected user.

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

Parameters

Name Type Description
target String | ININ.Addins.IC.Interactions.ITarget

The target to create a new call interaction.

workgroup String Optional

The workgroup to dial on behalf of. If omitted, the call will be made on behalf of the connected user.

Returns

A promise to an ININ.Addins.IC.Interactions.IInteraction that contains the interaction ID of the newly created call interaction. No attribute data is provided.

Type
IPromise

Example

// Dials the phone number 4195 on behalf of the IT Support workgroup
ININ.Addins.IC.Interactions.makeCall({
    target: "4195",
    displayName: "Joe Smith"
}, "IT Support").then(function(interaction) {
    console.log("A phone call has been placed as interaction ID:", interaction.interactionId);
});

setAttributes(request) :IPromise

Async Static Since 2016 R1 API Version 1

Sets the current values for the specified attributes on the specified interaction.

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.Interactions.ISetAttributesRequest

The requested interaction identifier and attributes to set.

Returns

A promise when Interaction Center has updated the specified attributes.

Type
IPromise

Example

// Sets a custom attribute on an interaction.
ININ.Addins.IC.Interactions.setAttributes({
    interactionId: // an interaction ID
    attributes: {
        "CUSTOM_ATTRIBUTE": "My value"
    }
});

Classes

WatchedInteraction

Represents a live view of an interaction and a subset of attributes associated with the interaction.

Interfaces

IGetAttributesRequest

Represents request to retrieve the current attribute values for the specified interaction.

IInteraction

Represents an interaction and a subset of its attributes.

IMorphedInteractionEvent

The interaction has morphed.

IReadOnlyInteractionCollection

A read-only collection of interaction identifiers to ININ.Addins.IC.Interactions.IInteraction instances.

ISelectedInteractionInfo

Represents an interaction that is selected in the application.

ISetAttributesRequest

Represents request to set the current attribute values for the specified interaction.

ITarget

Represents a target to perform the action against.

IWatchedInteractionSubscribeRequest

Represents request to subscribe to the interaction represented by the ININ.Addins.IC.Interactions.WatchedInteraction instance.