cxengage-javascript-sdk.modules.session

clear-monitored-interaction

(clear-monitored-interaction & params)
CxEngage.session.clearMonitoredInteraction();

Used to clear the interaction ID once a call is no longer being monitored.

get-active-tenant-id

(get-active-tenant-id & params)
CxEngage.session.getActiveTenantId();

Used to fetch the active tenant ID currently stored in state. Will return null otherwise.

get-active-user-id

(get-active-user-id & params)
CxEngage.session.getActiveUserId();

Used to fetch the active user ID currently stored in state. Will return null otherwise.

get-default-extension

(get-default-extension & params)
CxEngage.session.getDefaultExtension();

Used to fetch the user’s default extension currently stored in state. Will return null otherwise.

get-extensions

(get-extensions & args__9078__auto__)
CxEngage.session.getExtensions();

Retrieves full extension list for the actively-authenticated user.

get-monitored-interaction

(get-monitored-interaction & params)
CxEngage.session.getMonitoredInteraction();

Used to fetch the interaction ID of a call being silent monitored. Will return null otherwise.

get-running-session-state

(get-running-session-state & args__9078__auto__)
CxEngage.session.getRunningSessionState();

Retrieves state of any currently-running session, if one exists.

get-sso-token

(get-sso-token & params)
CxEngage.session.getSSOToken();

Used to fetch the SSO token currently stored in state. Will return null otherwise.

get-tenant-details

(get-tenant-details & args__9078__auto__)
CxEngage.session.getTenantDetails();

This function is used to retrieve details of all tenants associated with the actively authenticated user.

Possible Errors:

get-token

(get-token & params)
CxEngage.session.getToken();

Used to fetch the auth token currently stored in state. Will return null otherwise.

get-user-config

(get-user-config & args__9078__auto__)
CxEngage.session.getUserConfig();

Retrieves current loggedIn user configuration details like; extensions, integrations, reasons & etc, etc..

Topic: cxengage/session/get-user-config-response

Possible Errors:

go-not-ready

(go-not-ready & args__9078__auto__)

The goNotReady function is used to set an agent’s state to one that is unable to receive new work offers. This function can be used one of two ways.

The first way is to call the function without any parameters. This will set an agent to the default not ready state, without any additional context provided.

CxEngage.session.goNotReady();

The second way to call this function is to pass in a set of data containing three properties: reason, reasonId, and reasonListId. These are used to provide context to the state change.

CxEngage.session.goNotReady({
  reasonInfo: {
     reason: '{{string}}',
     reasonId: '{{uuid}}',
     reasonListId: '{{uuid}}'
  }
});

Possible Errors:

go-ready

(go-ready & args__9078__auto__)
CxEngage.session.goReady({
  extensionValue: {{uuid}}
});

Used to put the Agent in a ‘ready’ state. Requires a UUID or value string to identity which extension to initalize.

Possible Errors:

set-active-tenant

(set-active-tenant & args__9078__auto__)

The setActiveTenant function is used to bootstrap necessary user and tenant data, integrations, and sessions. Tenant ID is it’s only required parameter, but it allows for two other option parameters that impact how your session will behave.

CxEngage.session.setActiveTenant({
  tenantId: '{{uuid}}',
  noSession: '{{bool}}', <Optional>
  silentMonitoring: '{{bool}}', <Optional>
});

The ‘noSession’ flag will set the user’s active tenant as normal, but will forgo the session creation and heartbeat polling.

The ‘silentMonitoring’ flag will set the user’s active tenant as normal, and will start a session as normal, with the caveat that the session will be omitted from reporting data.

Possible Errors:

set-direction

(set-direction & args__9078__auto__)
CxEngage.session.setDirection({
  direction: {{'inbound' / 'outbound' / 'agent-initiated'}}
  agentId: {{ uuid }} (Optional)
  sessionId: {{ uuid }} (Optional)
});

Used to set an Agent’s direction to one of three available options:

  • inbound
  • outbound
  • agent-initiated

Please refer to our documentation for a detailed description of the differences between each direction.

This function will receive agentId and sessionId from Config-UI when changing direction from Agent State Monitoring.

Possible Errors:

set-locale

(set-locale & params)
CxEngage.session.setLocale('{{string}}');

Used to set the locale property in the SDK’s internal state.

set-presence-state

(set-presence-state & args__9078__auto__)
CxEngage.session.setPresenceState({
  agentId: {{ uuid }} (Optional), (Required just when function is called from Agent Monitoring)
  sessionId: {{ uuid }} (Optional),
  state: {{'ready' / 'notready' / 'offline'}},
  reason: {{string}} (Optional),
  reasonId: {{uuid}} (Optional),
  reasonListId: {{uuid}} (Optional)
  forceLogout: {{boolean}} (Optional)
});

Used to set an Agent’s presence state to one of three available options:

  • ready
  • notready
  • offline

Please refer to our documentation for a detailed description of the differences between each presence state. This function will receive agentId and sessionId from Config-UI when changing state from Agent State Monitoring.

Possible Errors:

set-token

(set-token & params)
CxEngage.session.setToken('{{string}}');

Used to set the token property in the SDK’s internal state. Useful for SSO as well as refreshing tokens.

set-user-identity

(set-user-identity & params)
CxEngage.session.setUserIdentity('{{uuid}}');

Used to set the userIdentity property in the SDK’s internal state.