Represents an interaction that is selected in the application.
Members
canConsultTransfer :boolean
Represents whether the selected interaction can be entered into a consult transfer. When no interaction is selected, this property will be null
.
canInviteParty :boolean
Represents whether the selected interaction can have additional parties invited to it. When no interaction is selected, this property will be null
.
canTransfer :boolean
Represents whether the selected interaction can be transferred. When no interaction is selected, this property will be null
.
interactionId :string
Represents the identifier of the selected interaction. When no interaction is selected, this property will be null
.
Methods
consultTransfer(target) :IPromise
Requests from the application to start a consult transfer with the selected interaction to the specified target party.
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 |
---|---|---|
target | String | ININ.Addins.IC.Interactions.ITarget |
The transfer target. |
Returns
A promise to the consult transfer starting.
- Type
- IPromise
Example
// Starts a consult transfer for the selected interaction with 4195.
var selectedInteraction = ININ.Addins.IC.Interactions.selectedInteraction;
selectedInteraction.consultTransfer({
target: "4195",
displayName: "Joe Smith"
}).then(function() {
console.log("The consultation has started.");
});
inviteParty(target) :IPromise
Requests from the application to add the specified party target to the selected 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 |
---|---|---|
target | String | ININ.Addins.IC.Interactions.ITarget |
The party to invite. |
Returns
A promise to the accepted request to invite the party.
- Type
- IPromise
Example
// Starts invites 4195 to the selected interaction.
var selectedInteraction = ININ.Addins.IC.Interactions.selectedInteraction;
selectedInteraction.inviteParty("234363", {
target: "4195",
displayName: "Joe Smith"
}).then(function() {
console.log("The 4195 has been requested to join.");
});
transfer(target) :IPromise
Requests from the application to transfer the selected interaction to the specified target party.
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 |
---|---|---|
target | String | ININ.Addins.IC.Interactions.ITarget |
The transfer target. |
Returns
A promise to the transfer being completed.
- Type
- IPromise
Example
// Transfers the selected interaction to 4195.
var selectedInteraction = ININ.Addins.IC.Interactions.selectedInteraction;
selectedInteraction.transfer({
target: "4195",
displayName: "Joe Smith"
}).then(function() {
console.log("The interaction has been transferred.");
});
off(key[, handler]) :ININ.Addins.IEventHandler
Unbinds the optionally specified handler from the event key.
Inherited from ININ.Addins.IEventHandler#off
Parameters
Name | Type | Description |
---|---|---|
key | String |
The event key. |
handler | function |
The callback handler. |
Returns
This ININ.Addins.IEventHandler
instance.
on(key, handler) :ININ.Addins.IEventHandler
Binds the specified event key to the callback that can be emitted 1 or more times.
Inherited from ININ.Addins.IEventHandler#on
Parameters
Name | Type | Description |
---|---|---|
key | String |
The event key. |
handler | function |
The callback handler. |
Returns
This ININ.Addins.IEventHandler
instance.
once(key, handler) :ININ.Addins.IEventHandler
Binds the specified event key to the callback that can be emitted only once, then removed.
Inherited from ININ.Addins.IEventHandler#once
Parameters
Name | Type | Description |
---|---|---|
key | String |
The event key. |
handler | function |
The callback handler. |
Returns
This ININ.Addins.IEventHandler
instance.
Events
capabilitiesChanged
The selected interaction's capabilities have changed. For instance, if the interaction is disconnected, transferring the interaction is not possible and
canTransfer property
is subsequently set to false
.
Parameters
Name | Type | Description |
---|---|---|
selectedInteraction | ININ.Addins.IC.Interactions.ISelectedInteractionInfo |
This |
changed
The selection in the application has changed to a different interaction.
Parameters
Name | Type | Description |
---|---|---|
selectedInteraction | ININ.Addins.IC.Interactions.ISelectedInteractionInfo |
This |