Session keys

Session keys are structured as paths, similar to Java’s classpath. This section contains a partial list of keys. Event types describes additional keys related to the various events.

config prefix

A copy of the scope-level BLL configuration is stored here. For example, the configuration flowName (displayed as “FlowName” in the web interface), is stored in config.flowName.

flow Prefix

Read-only attributes of the flow implementation. For example, flows that implement call grouping sets flow.callGroup to true.

Limits of SetSessionVariableAction

Depending on the prefix, the webhook may not be able to modify some session variables.

The following table lists the webhook prefixes:

Webhook prefixes
Prefix Write Access
config. Yes
flow. No
cti. No
result. No
state.filter. No
Any other path Yes

The following keys cannot be set and are reserved for internal use:

  • config.webhookType
  • config.webhookConfig

State keys

The following are some of the session variable keys with the state. prefix:

state.callSessionId

The current call session ID and session restart count separated by a colon character, starting with 0. For example, 83993302-3d84-4cf5-86b8-28b37f1fb1a6:0, where 83993302-3d84-4cf5-86b8-28b37f1fb1a6 is the call session ID, and 0 for the first session of a call, and if that session restarts, the value becomes 83993302-3d84-4cf5-86b8-28b37f1fb1a6:1.

Use this as a unique key to cache your own session information. You can also use the call session ID, in combination with the scope ID, to call the nuance.biosec.v1.managers.csm.CallSessionManager.SubmitAgentAction API.

state.currentEvent

The current event type. See Event types.

state.currentEventCause

If state.currentEvent is SESSION_VARIABLE_UPDATE, this is set to the latest value of state.currentEvent in this session that wasn’t SESSION_VARIABLE_UPDATE. Otherwise, this is set to the same value as state.currentEvent.

state.requestCount

This integer is increased by one each time the registered custom logic webhook is called.

state.requestId

A random UUID is generated each time the registered custom logic webhook is called.

The state.requestId value is reused if the same request was retried by the webhook client.

state.filter.excludeBySessionKey

Contains a comma-delimited list of the current keys_to_ignore set by EventFilterAction.

state.nodeSessionOverrideList

Contains a comma-delimited list of the current overridden nodes set by NodeOverrideAction.

state.sessionId

The internal session ID.

state.engagementId

The internal engagement ID.

state.scopeId

The current active scope ID.

state.member.memberType

The agent’s login type. Set to one of the following values:

  • MEMBER_TYPE_USER: Interactive user (human).
  • MEMBER_TYPE_CLIENT: Applicative client (application).
  • MEMBER_TYPE_GROUP: Group of users.

Typically, the value is set to MEMBER_TYPE_USER for an agent that logged in to the Web Agent Console.

state.member.issuer

The agent’s login token issuer.

state.member.memberName

The agent’s user name. Set when the value of state.member.memberType is MEMBER_TYPE_USER. This is normally the case when an agent is logged in to the Web Agent Console. Typically, the value is in the form of an email address.

state.member.externalId

The agent’s login external ID. Set when the value of state.member.memberType is MEMBER_TYPE_CLIENT or MEMBER_TYPE_GROUP.

state.sentSessionDecision

A session decision is conveyed to the agent. This session variable is available depending on the flow.

Previous session keys

After the session restarts, whether the call is a transfer or it started in a conference, Gatekeeper may find the previous session’s variables.

For this to work with transfers and conferences, set EngagementCorrelationKeys to a key available in CALL_START_EVENT. For example, the key should use the prefix cti.kvps. or cti.callAttributes. to refer to the CTI custom data or call attributes. The value of the key must exist in a previous session within the same scope for Gatekeeper to be able to correlate both sessions and place them in the same engagement.

If that correlation is successful, the session variables of the previous session in the current engagement are stored with the result.previousSession. prefix.

The session variables with the following prefixes from the previous session are not stored under the result.previousSession. prefix in the current session:

  • result.previousSession.config.
  • result.previousSession.result.previousSession.

The values are copied once as soon as the previous session is found, and they are not updated. For example, if a call started as a conference, then result.previousSession reflects the state of the other agent’s call as soon as it joined the conference.