Namespace: ClientSession

AvayaCustomerServices.ClientSession contains all classes that belong to ClientSession module.

Members

data :object

Client session data

Type:
  • object

defaultProfileId :string

Default profile ID for user

Type:
  • string

profiles :Array.<object>

List of profiles for user

Type:
  • Array.<object>

Methods

addOnClientSessionClosedCallback(callback)

Adds a callback that is executed on notification provider's onReopen event

Parameters:
Name Type Description
callback AvayaCustomerServices.ClientSession~onClientSessionClosedCallback

Function that handles on reopen event response

Since:
  • 3.4.0.0

addOnClientSessionRestartedCallback(callback)

Adds a callback that is executed on notification provider's onReopen event

Parameters:
Name Type Description
callback AvayaCustomerServices.ClientSession~onClientSessionRestartedCallback

Function that handles on reopen event response

Since:
  • 3.4.0.0

addOnClientSessionStartedCallback(callback)

Adds a callback that is executed on notification provider's onOpen event

Parameters:
Name Type Description
callback AvayaCustomerServices.ClientSession~onClientSessionStartedCallback

Function that handles on open event response

Since:
  • 3.4.0.0

addOnCloseCallback(callback)

Adds a callback that is executed when notification provider connection has been closed

Parameters:
Name Type Description
callback AvayaCustomerServices.ClientSession~onCloseCallback

Function that handles on close event response

Since:
  • 3.2.2

addOnDeferredInteractionCallback(callback)

Adds a callback that is executed when an interaction is moved to 'deferred'

Parameters:
Name Type Description
callback AvayaCustomerServices.ClientSession~addOnDeferredInteractionCallback

Function that handles on deferred interaction event response

addOnErrorCallback(callback)

Adds a callback that is executed when an error has occurred

Parameters:
Name Type Description
callback AvayaCustomerServices.ClientSession~onErrorCallback

Function that handles on error event response

addOnRemoveDeferredInteractionCallback(callback)

Adds a callback that is executed when an a deferred interaction is successfully retrieved

Parameters:
Name Type Description
callback AvayaCustomerServices.ClientSession~addOnRemoveDeferredInteractionCallback

Function that handles retrieved deferred interaction event response

addOnResourceAcquiredCallback(callback)

Adds a callback that is executed when a resource has been acquired

Parameters:
Name Type Description
callback AvayaCustomerServices.ClientSession~onResourceAcquiredCallback

Function that handles on resource acquired event response

addOnResourceReleasedCallback(callback)

Adds a callback that is executed when a resource has been released

Parameters:
Name Type Description
callback AvayaCustomerServices.ClientSession~onResourceReleasedCallback

Function that handles on resource released event response

addOnResourceSessionOutboundConnectedCallback(callback)

Adds a callback that is executed when a resource session is connected

Parameters:
Name Type Description
callback AvayaCustomerServices.ClientSession~onResourceSessionOutboundConnectedCallback

Function that handles on resource session connected event response

Since:
  • 3.2.2.1

addOnResourceSessionOutboundDeletedCallback(callback)

Adds a callback that is executed when a resource session has failed

Parameters:
Name Type Description
callback AvayaCustomerServices.ClientSession~onResourceSessionOutboundDeletedCallback

Function that handles on resource session failed event response

Since:
  • 3.2.2.1

addOnResourceSessionOutboundFailedCallback(callback)

Adds a callback that is executed when a resource session has failed

Parameters:
Name Type Description
callback AvayaCustomerServices.ClientSession~onResourceSessionOutboundFailedCallback

Function that handles on resource session failed event response

Since:
  • 3.2.2.1

addOnResourceSessionOutboundNotConnectedCallback(callback)

Adds a callback that is executed when a resource session is disconnected

Parameters:
Name Type Description
callback AvayaCustomerServices.ClientSession~onResourceSessionOutboundNotConnectedCallback

Function that handles on resource session not connected event response

Since:
  • 3.2.2.1

addOnResourceSessionWorkModeCreatedCallback(callback)

Adds a callback that is executed when a workMode has created

Parameters:
Name Type Description
callback AvayaCustomerServices.ClientSession~onResourceSessionWorkModeCreatedCallback

Function that handles on workMode created event response

Since:
  • 3.5.0.0

addOnResourceSessionWorkModeDeletedCallback(callback)

Adds a callback that is executed when a workMode has updated

Parameters:
Name Type Description
callback AvayaCustomerServices.ClientSession~onResourceSessionWorkModeDeletedCallback

Function that handles on workMode deleted event response

Since:
  • 3.5.0.0

addOnResourceSessionWorkModeUpdatedCallback(callback)

Adds a callback that is executed when a workMode has updated

Parameters:
Name Type Description
callback AvayaCustomerServices.ClientSession~onResourceSessionWorkModeUpdatedCallback

Function that handles on workMode updated event response

Since:
  • 3.5.0.0

addOnUserRegistrationFailedCallback(callback)

Adds a callback that is executed when a user registration has failed

Parameters:
Name Type Description
callback AvayaCustomerServices.ClientSession~onUserRegistrationFailedCallback

Function that handles on user registration failed event response

Since:
  • 3.4.0.0

addOnUserRegistrationSuccessfulCallback(callback)

Adds a callback that is executed when a user registration has been successful

Parameters:
Name Type Description
callback AvayaCustomerServices.ClientSession~onUserRegistrationSuccessfulCallback

Function that handles on user registration success event response

Since:
  • 3.4.0.0

createAgent(cachedHandle) → {AvayaCustomerServices.Services.Agent.Agent}

Creates an instance of the Agent module.

Parameters:
Name Type Argument Description
cachedHandle string <optional>

Optional param - cached user handle

Returns:

createContacts() → {AvayaCustomerServices.Services.Contacts.Contacts}

Creates an instance of the Contacts module.

Since:
  • 3.6.0.0
Returns:

createWork() → {AvayaCustomerServices.Services.Work.Work}

Creates an instance of the Work module.

Returns:

getAgent() → {AvayaCustomerServices.Services.Agent.Agent}

Gets an instance of the Agent module.

Returns:

getConfiguration(authServerUser) → {AvayaCustomerServices.Base.Promise|boolean}

Get configuration settings for a user.

Parameters:
Name Type Description
authServerUser string

User's ID used during authentication

Returns:
{ AvayaCustomerServices.Base.Promise | boolean }

Promise

getContacts() → {AvayaCustomerServices.Services.Contacts.Contacts}

Gets an instance of the Contacts module.

Since:
  • 3.6.0.0
Returns:

getReasonCodes() → {AvayaCustomerServices.ClientSession.ReasonCodeCollection}

Gets an instance of the ReasonCodeCollection module.

Returns:
{ AvayaCustomerServices.ClientSession.ReasonCodeCollection }

Reason codes

getTeam() → {AvayaCustomerServices.Services.Team.Team}

Gets an instance of the Team module.

Returns:

getWork() → {AvayaCustomerServices.Services.Work.Work}

Gets an instance of the Work module.

Returns:

removeAgent()

Removes instance of the Agent module.

removeCallbacks()

Remove callbacks

Since:
  • 3.4.0.0

removeContacts()

Removes instance of the Contacts module.

Since:
  • 3.6.0.0

removeTeam()

Removes instance of the Team module.

removeWork()

Removes instance of the Work module.

setConfig(configuration)

Updates client session configuration with param data

Parameters:
Name Type Description
configuration Object

Data used to configure ClientSession object

setData(data) → {Object}

Updates client session object with param data

Parameters:
Name Type Description
data Object

Data used to populate ClientSession object

Returns:
{ Object }

Updated ClientSession object

setToken(data)

Set tokens to token collection

Parameters:
Name Type Description
data Object

Data used to populate Token object

start()

Starts the client session service

stop(force)

Stops the client session service

Parameters:
Name Type Argument Description
force boolean <optional>

Optional param - force stop of client session

Type Definitions

onClientSessionClosedCallback(clientSessionId)

This callback handles the ClientSessionClosedEvent response

Parameters:
Name Type Description
clientSessionId string

onClientSessionRestartedCallback(clientSessionId)

This callback handles the ClientSessionRestartedEvent response

Parameters:
Name Type Description
clientSessionId string

onClientSessionStartedCallback(clientSessionId)

This callback handles the ClientSessionStartedEvent response

Parameters:
Name Type Description
clientSessionId string

onCloseCallback(message)

This callback handles the CloseEvent response

Parameters:
Name Type Description
message CloseEvent

The event that is fired when notification provider connection has been closed

onErrorCallback(message)

This callback handles the ErrorEvent response

Parameters:
Name Type Description
message ErrorEvent

The event that is fired when an error has occurred

onResourceAcquiredCallback(message)

This callback handles the ResourceAcquiredEvent response

Parameters:
Name Type Description
message ResourceAcquiredEvent

The event that is fired when a resource has been acquired

onResourceReleasedCallback(message)

This callback handles the ResourceReleasedEvent response

Parameters:
Name Type Description
message ResourceReleasedEvent

The event that is fired when a resource has been released

onResourceSessionOutboundConnectedCallback(message)

This callback handles the ResourceSessionOutboundConnectedEvent response

Parameters:
Name Type Description
message ResourceSessionOutboundConnectedEvent

The event that is fired when a resource session is connected

onResourceSessionOutboundDeletedCallback(message)

This callback handles the ResourceSessionOutboundDeletedEvent response

Parameters:
Name Type Description
message ResourceSessionOutboundDeletedEvent

The event that is fired when a resource session has failed

onResourceSessionOutboundFailedCallback(message)

This callback handles the ResourceSessionOutboundFailedEvent response

Parameters:
Name Type Description
message ResourceSessionOutboundFailedEvent

The event that is fired when a resource session has failed

onResourceSessionOutboundNotConnectedCallback(message)

This callback handles the ResourceSessionOutboundNotConnectedEvent response

Parameters:
Name Type Description
message ResourceSessionOutboundNotConnectedEvent

The event that is fired when a resource session is disconnected

onResourceSessionWorkModeCreatedCallback(message)

This callback handles the ResourceSessionPropertyWorkModeCreatedEvent response

Parameters:
Name Type Description
message ResourceSessionPropertyWorkModeCreatedEvent

The event that is fired when a workMode has created

onResourceSessionWorkModeUpdatedCallback(message)

This callback handles the ResourceSessionPropertyWorkModeUpdatedEvent response

Parameters:
Name Type Description
message ResourceSessionPropertyWorkModeUpdatedEvent

The event that is fired when a workMode has updated

onResourceSessionWorkModeUpdatedCallback(message)

This callback handles the ResourceSessionPropertyWorkModeUpdatedEvent response

Parameters:
Name Type Description
message ResourceSessionPropertyWorkModeUpdatedEvent

The event that is fired when a workMode has updated

onUserRegistrationFailedCallback(message)

This callback handles the on user registration failed response

Parameters:
Name Type Description
message AvayaClientServices.User

User session that the callback is associated with.

onUserRegistrationSuccessfulCallback(message)

This callback handles the on user registration success response

Parameters:
Name Type Description
message AvayaClientServices.User

User session that the callback is associated with.

©2019 Avaya Inc. All Rights Reserved.