Constructor
-
new Work(workService, workRequestCollection, interactionCollection)
-
Constructor function for Work API
Parameters:
Name Type Description workService
AvayaCustomerServices.Services.Work.WorkService workRequestCollection
AvayaCustomerServices.Services.Work.WorkRequestCollection interactionCollection
AvayaCustomerServices.Services.Work.InteractionCollection
Methods
-
addOnInteractionCreatedCallback(callback)
-
Adds a callback that is executed when an interaction has been created
Parameters:
Name Type Description callback
AvayaCustomerServices.Services.Work.Work~onInteractionCreatedCallback Function that handles on interaction created event response
-
addOnInteractionDeletedCallback(callback)
-
Adds a callback that is executed when an interaction has been removed
Parameters:
Name Type Description callback
AvayaCustomerServices.Services.Work.Work~onInteractionDeletedCallback Function that handles on interaction delete event response
-
createInteraction(type, address, subType) → {AvayaCustomerServices.Base.Promise}
-
Creates a new outgoing interaction
Parameters:
Name Type Argument Description type
string Channel type of interaction
address
string <optional>
Destination address of interaction
subType
string <optional>
Additional param to indicate interaction specifics (e.g. voice mailbox)
Returns:
{ AvayaCustomerServices.Base.Promise }
-
getInteractions() → {AvayaCustomerServices.Services.Work.InteractionCollection}
-
Returns a collection of interactions
Returns:
{ AvayaCustomerServices.Services.Work.InteractionCollection }
-
getWorkRequests() → {AvayaCustomerServices.Services.Work.WorkRequestCollection}
-
Returns a collection of work requests
Returns:
{ AvayaCustomerServices.Services.Work.WorkRequestCollection }
-
removeCallbacks() → {AvayaCustomerServices.Base.Promise}
-
Remove callbacks and stop work service
Returns:
{ AvayaCustomerServices.Base.Promise }
-
removeDeferredInteraction(deferredInteraction) → {AvayaCustomerServices.Base.Promise}
-
Removes a deferred interaction from deferred list on retrieve confirmation
Parameters:
Name Type Description deferredInteraction
object Deferred Interaction to remove
Returns:
{ AvayaCustomerServices.Base.Promise }
-
retrieveDeferredInteraction(deferredInteraction) → {AvayaCustomerServices.Base.Promise}
-
Retrieves a deferred interaction
Parameters:
Name Type Description deferredInteraction
object Deferred Interaction to retrieve
Returns:
{ AvayaCustomerServices.Base.Promise }
Type Definitions
-
onInteractionCreatedCallback(message)
-
This callback handles the InteractionCreatedEvent response
Parameters:
Name Type Description message
InteractionCreatedEvent The event that is fired when an interaction has been created
-
onInteractionDeletedCallback(message)
-
This callback handles the InteractionDeleteEvent response
Parameters:
Name Type Description message
InteractionDeleteEvent The event that is fired when an interaction has been removed