Class: Interaction

Constructor

new Interaction(workService)

Constructor function for Interaction Model

Parameters:
Name Type Description
workService AvayaCustomerServices.Services.Work.WorkService

Members

data :object

Generic object in which to store model data

Type:
  • object
Inherited From:

id :string

A unique identifier for this model instance

Type:
  • string
Inherited From:

isNew :boolean

Flag to indicate if model instance is new

Type:
  • boolean
Inherited From:

workRequestId :string

Work Request ID for this interaction

Type:
  • string

Methods

accept() → {AvayaCustomerServices.Base.Promise}

Accepts this incoming interaction.

Returns:
{ AvayaCustomerServices.Base.Promise }

addOnInteractionActiveCallback(callback)

Adds a callback that is executed when an interaction state is changed to 'active'

Parameters:
Name Type Description
callback AvayaCustomerServices.Services.Work.Interaction~onInteractionActiveCallback

Function that handles on active interaction event response

addOnInteractionACWCallback(callback)

Adds a callback that is executed when an interaction state is changed to 'ACW'

Parameters:
Name Type Description
callback AvayaCustomerServices.Services.Work.Interaction~onInteractionACWCallback

Function that handles on ACW interaction event response

Since:
  • 3.2.2

addOnInteractionACWPendingCallback(callback)

Adds a callback that is executed when an interaction state is changed to 'ACW_PENDING'

Parameters:
Name Type Description
callback AvayaCustomerServices.Services.Work.Interaction~onInteractionACWPendingCallback

Function that handles on ACW_PENDING interaction event response

Since:
  • 3.5.0.0

addOnInteractionAudioUpdatedCallback(callback)

Adds a callback that is executed when interaction context has been removed from an interaction

Parameters:
Name Type Description
callback AvayaCustomerServices.Services.Work.Interaction~onInteractionAudioUpdatedCallback

Function that handles on audio updated event response

addOnInteractionContextAddedCallback(callback)

Adds a callback that is executed when interaction context has been added to an interaction

Parameters:
Name Type Description
callback AvayaCustomerServices.Services.Work.Interaction~onInteractionContextAddedCallback

Function that handles on interaction context added event response

addOnInteractionContextRemovedCallback(callback)

Adds a callback that is executed when interaction context has been removed from an interaction

Parameters:
Name Type Description
callback AvayaCustomerServices.Services.Work.Interaction~onInteractionContextRemovedCallback

Function that handles on interaction context removed event response

addOnInteractionEndedCallback(callback)

Adds a callback that is executed when an interaction has ended

Parameters:
Name Type Description
callback AvayaCustomerServices.Services.Work.Interaction~onInteractionEndedCallback

Function that handles on delete interaction event response

addOnInteractionHeldCallback(callback)

Adds a callback that is executed when an interaction state is changed to 'held'

Parameters:
Name Type Description
callback AvayaCustomerServices.Services.Work.Interaction~onInteractionHeldCallback

Function that handles on held interaction event response

addOnInteractionMediaAddedCallback(callback)

Adds a callback that is executed when interaction media has been added to an interaction

Parameters:
Name Type Description
callback AvayaCustomerServices.Services.Work.Interaction~onInteractionMediaAddedCallback

Function that handles on interaction media added event response

addOnInteractionPassiveCallback(callback)

Adds a callback that is executed when an interaction state is changed to 'passive'

Parameters:
Name Type Description
callback AvayaCustomerServices.Services.Work.Interaction~onInteractionPassiveCallback

Function that handles on passive interaction event response

Since:
  • 3.2.2

addOnInteractionSpeakerUpdatedCallback(callback)

Adds a callback that is executed when interaction context has been removed from an interaction

Parameters:
Name Type Description
callback AvayaCustomerServices.Services.Work.Interaction~onInteractionSpeakerUpdatedCallback

Function that handles on speaker updated event response

addOnInteractionUnheldCallback(callback)

Adds a callback that is executed when an interaction state is changed from 'held' to 'active'

Parameters:
Name Type Description
callback AvayaCustomerServices.Services.Work.Interaction~onInteractionUnheldCallback

Function that handles on unheld interaction event response

addOnInteractionUnknownCallback(callback)

Adds a callback that is executed when an interaction state is changed to 'unknown'

Parameters:
Name Type Description
callback AvayaCustomerServices.Services.Work.Interaction~addOnInteractionUnknownCallback

Function that handles on active interaction event response

addOnInteractionUpdatedCallback(callback)

Adds a callback that is executed when an interaction state has been updated

Parameters:
Name Type Description
callback AvayaCustomerServices.Services.Work.Interaction~onInteractionUpdatedCallback

Function that handles on update interaction event response

addOnInteractionVideoUpdatedCallback(callback)

Adds a callback that is executed when interaction context has been removed from an interaction

Parameters:
Name Type Description
callback AvayaCustomerServices.Services.Work.Interaction~onInteractionVideoUpdatedCallback

Function that handles on video updated event response

addOnRemoteParticipantAcceptedCallback(callback)

Adds a callback that is executed when remote participant has accepted interaction

Parameters:
Name Type Description
callback AvayaCustomerServices.Services.Work.Interaction~onRemoteParticipantAcceptedCallback

Function that handles on remote participant accepted event response

completeACW() → {AvayaCustomerServices.Base.Promise}

Complete After Call Work.

Returns:
{ AvayaCustomerServices.Base.Promise }

completeConference() → {AvayaCustomerServices.Base.Promise}

Complete consult interaction as conference.

Returns:
{ AvayaCustomerServices.Base.Promise }

completeTransfer() → {AvayaCustomerServices.Base.Promise}

Complete consult interaction as transfer.

Returns:
{ AvayaCustomerServices.Base.Promise }

consult(remoteAddress, uui) → {AvayaCustomerServices.Base.Promise}

Start consult interaction to remote address.

Parameters:
Name Type Argument Description
remoteAddress string

Remote address to consult

uui string <optional>

Optional User to User Information

Returns:
{ AvayaCustomerServices.Base.Promise }

consultToService(serviceId, uui) → {AvayaCustomerServices.Base.Promise}

Performs a consult on this interaction to a service

Parameters:
Name Type Argument Description
serviceId string

ID of service to consult to

uui string <optional>

Optional User to User Information

Since:
  • 3.2.2
Returns:
{ AvayaCustomerServices.Base.Promise }

defer(interval, reason, payload, options) → {AvayaCustomerServices.Base.Promise}

Defer forward this interaction.

Parameters:
Name Type Argument Description
interval string

Interval to defer forward interaction for

reason string

Defer forward reason

payload object

Payload for draft

options object <optional>

Options for draft

Returns:
{ AvayaCustomerServices.Base.Promise }

defer(interval, reason, payload, options) → {AvayaCustomerServices.Base.Promise}

Defer this interaction.

Parameters:
Name Type Argument Description
interval string

Interval to defer interaction for

reason string

Defer reason

payload object

Payload for draft

options object <optional>

Options for draft

Returns:
{ AvayaCustomerServices.Base.Promise }

disableLocalVideo() → {AvayaCustomerServices.Base.Promise}

Disable local Video

Since:
  • 3.4.0.0
Returns:
{ AvayaCustomerServices.Base.Promise }

enableLocalVideo() → {AvayaCustomerServices.Base.Promise}

Enable local Video

Since:
  • 3.4.0.0
Returns:
{ AvayaCustomerServices.Base.Promise }

end() → {AvayaCustomerServices.Base.Promise}

Terminate this interaction.

Returns:
{ AvayaCustomerServices.Base.Promise }

end() → {AvayaCustomerServices.Base.Promise}

End this interaction.

Returns:
{ AvayaCustomerServices.Base.Promise }

extendACW() → {AvayaCustomerServices.Base.Promise}

Extend After Contact Work

Since:
  • 3.2.2
Returns:
{ AvayaCustomerServices.Base.Promise }

getCall() → {AvayaCustomerServices.Base.Promise|undefined}

Get the call instance from the communication services package.
This function will return undefined when the communication services package is not enabled

Since:
  • 3.6.0.0
Returns:
{ AvayaCustomerServices.Base.Promise | undefined }

getCapabilities() → {object}

Get capabilities object for this interaction

Returns:
{ object }

List of capabilities

getDestinationAddress() → {String}

Get destination address of this interaction

Returns:
{ String }

The address of the receiving party in this Interaction

getDirection() → {String}

Get direction of this interaction (INCOMING or OUTGOING)

Returns:
{ String }

The direction of this Interaction

getDispositionCode() → {Array.<Object>}

Get the disposition code associated with this interaction

Since:
  • 3.2.2
Returns:
{ Array.<Object> }

getInteractionContext() → {AvayaCustomerServices.Services.Work.InteractionContext}

Get interaction context object for this interaction

Returns:

getInteractionMedia() → {AvayaCustomerServices.Services.Work.InteractionMedia}

Get interaction media object for this interaction

Returns:

getLocalVideoStream() → {Array.<Object>}

Since:
  • 3.4.0.0
Returns:
{ Array.<Object> }

getRemoteAddress() → {String}

Get originating address (source) of this interaction

Returns:
{ String }

The address of the initiating party in this Interaction

getRemoteParticipant() → {String}

Get the remote participant (customer) belonging to this interaction

Returns:
{ String }

getRemoteVideoStream() → {Array.<Object>}

Since:
  • 3.4.0.0
Returns:
{ Array.<Object> }

getState() → {string}

Get current state of this interaction

Returns:
{ string }

The current state of the interaction

getTopic() → {string}

Get topic for this interaction

Returns:
{ string }

getWorkCode() → {Array.<Object>}

Get the work code associated with this interaction

Returns:
{ Array.<Object> }

getWorkRequestId() → {string|null}

Get workRequestId for this interaction

Returns:
{ string | null }

workRequestId

hold() → {AvayaCustomerServices.Base.Promise}

Set this interaction on 'hold'.

Returns:
{ AvayaCustomerServices.Base.Promise }

isAudioMuted() → {boolean}

Mute audio

Since:
  • 3.4.0.0
Returns:
{ boolean }

True if audio is muted

isCustomerInteraction() → {boolean}

Check if this interaction involves a customer

Returns:
{ boolean }

True if interaction involves a customer

isIncoming() → {boolean}

Check is this interaction is an inbound interaction

Returns:
{ boolean }

True if interaction is incoming / inbound

muteAudio() → {AvayaCustomerServices.Base.Promise}

Mute audio

Since:
  • 3.4.0.0
Returns:
{ AvayaCustomerServices.Base.Promise }

sendDTMF(dtmf) → {AvayaCustomerServices.Base.Promise}

Send DTMF digits to backend service to generate DTMF tones

Parameters:
Name Type Description
dtmf string

DTMF character

Returns:
{ AvayaCustomerServices.Base.Promise }

setDispositionCode(dispositionCode) → {AvayaCustomerServices.Base.Promise}

Set a disposition code for this interaction

Parameters:
Name Type Description
dispositionCode string

Value of disposition code to set

Since:
  • 3.2.2
Returns:
{ AvayaCustomerServices.Base.Promise }

setVideoMode(mode) → {AvayaCustomerServices.Base.Promise}

Set Video Mode

Parameters:
Name Type Description
mode string

Video mode to set

Since:
  • 3.4.0.0
Returns:
{ AvayaCustomerServices.Base.Promise }

setWorkCode(workCode) → {AvayaCustomerServices.Base.Promise}

Set a work code for this interaction

Parameters:
Name Type Description
workCode string

Value of work code to set

Returns:
{ AvayaCustomerServices.Base.Promise }

singleStepTransfer(address) → {AvayaCustomerServices.Base.Promise}

Performs a single step transfer on this interaction to a remote address

Parameters:
Name Type Description
address string

Remote address to single step transfer to

Returns:
{ AvayaCustomerServices.Base.Promise }

singleStepTransferToService(serviceId) → {AvayaCustomerServices.Base.Promise}

Performs a single step transfer on this interaction to a service

Parameters:
Name Type Description
serviceId string

ID of service to single step transfer to

Since:
  • 3.2.2
Returns:
{ AvayaCustomerServices.Base.Promise }

singleStepTransferToUser(userId) → {AvayaCustomerServices.Base.Promise}

Performs a single step transfer on this interaction to a service

Parameters:
Name Type Description
userId string

ID of service to single step transfer to

Since:
  • 3.7.0.0
Returns:
{ AvayaCustomerServices.Base.Promise }

unhold() → {AvayaCustomerServices.Base.Promise}

Set this interaction from 'hold' to 'active'.

Returns:
{ AvayaCustomerServices.Base.Promise }

unmuteAudio() → {AvayaCustomerServices.Base.Promise}

Unmute audio

Since:
  • 3.4.0.0
Returns:
{ AvayaCustomerServices.Base.Promise }

Type Definitions

onInteractionActiveCallback(message)

This callback handles the InteractionActiveEvent response

Parameters:
Name Type Description
message InteractionActiveEvent

The event that is fired when an interaction state is changed to 'active'

onInteractionACWCallback(message)

This callback handles the InteractionACWEvent response

Parameters:
Name Type Description
message InteractionACWEvent

The event that is fired when an interaction state is changed to 'ACW'

onInteractionACWPendingCallback(message)

This callback handles the InteractionACWPendingEvent response

Parameters:
Name Type Description
message InteractionACWPendingEvent

The event that is fired when an interaction state is changed to 'ACW_PENDING'

onInteractionAudioUpdatedCallback(message)

This callback handles the InteractionAudioUpdatedEvent response

Parameters:
Name Type Description
message InteractionAudioUpdatedEvent

The event that is fired when interaction audio has been updated

onInteractionContextAddedCallback(message)

This callback handles the InteractionContextCreatedEvent response

Parameters:
Name Type Description
message InteractionContextCreatedEvent

The event that is fired when interaction context has been added to an interaction

onInteractionContextRemovedCallback(message)

This callback handles the InteractionContextDeletedEvent response

Parameters:
Name Type Description
message InteractionContextDeletedEvent

The event that is fired when interaction context has been removed from an interaction

onInteractionEndedCallback(message)

This callback handles the InteractionDeleteEvent response

Parameters:
Name Type Description
message InteractionDeleteEvent

The event that is fired when an interaction has ended

onInteractionHeldCallback(message)

This callback handles the InteractionHeldEvent response

Parameters:
Name Type Description
message InteractionHeldEvent

The event that is fired when an interaction state is changed to 'held'

onInteractionMediaAddedCallback(message)

This callback handles the InteractionMediaCreatedEvent response

Parameters:
Name Type Description
message InteractionMediaCreatedEvent

The event that is fired when interaction media has been added to an interaction

onInteractionPassiveCallback(message)

This callback handles the InteractionPassiveEvent response

Parameters:
Name Type Description
message InteractionPassiveEvent

The event that is fired when an interaction state is changed to 'passive'

onInteractionSpeakerUpdatedCallback(message)

This callback handles the InteractionSpeakerUpdatedEvent response

Parameters:
Name Type Description
message InteractionSpeakerUpdatedEvent

The event that is fired when interaction speaker has been updated

onInteractionUnheldCallback(message)

This callback handles the InteractionActiveEvent response

Parameters:
Name Type Description
message InteractionActiveEvent

The event that is fired when an interaction state is changed from 'held' to 'active'

onInteractionUpdatedCallback(message)

This callback handles the InteractionUpdatedEvent response

Parameters:
Name Type Description
message InteractionUpdatedEvent

The event that is fired when an interaction state has changed

onInteractionVideoUpdatedCallback(message)

This callback handles the InteractionVideoUpdatedEvent response

Parameters:
Name Type Description
message InteractionVideoUpdatedEvent

The event that is fired when interaction video has been updated

onRemoteParticipantAcceptedCallback(message)

This callback handles the InteractionRemoteParticipantAcceptedEvent response

Parameters:
Name Type Description
message InteractionRemoteParticipantAcceptedEvent

The event that is fired when remote participant has accepted interaction

©2019 Avaya Inc. All Rights Reserved.