This covers integrations with Genesys at the end of a call

0. During the call BOFE pairs interaction ID with customer ID by calling an endpoint in backoffice-manager
1. After the call, Genesys calls dedicated endpoint in backoffice-manager
2. backoffice-manager fetches missing data via genesys-gateway
3. backoffice-manager logs the communication into communication-history-manager

0. Pair interaction ID with customer ID

There will be new endpoint

POST backoffice-manager/customers/supportInteraction
body: {
  customerId: UUID (required)
  interactionId: UUID (required)
}
  • Store both IDs in a table, together with createdAt

  • interactionId should be the primary key

  • Prepare service to retrieve customerId by interactionId

1. Receive log from Genesys

There is an endpoint to be called by Genesys

POST backoffice-manager/customers/supportResult
  • The endpoint should be created in backoffice-manager

Body model:

{
  "conversationId": UUID
  "eventTime": string (timestamp)
  "direction": string // inbound, outbound
  "mediaType": string // callback, chat, cobrowse, email, message, screenshare, unknown, video, voice.
  "ani": string
  "subject": string (optional)
  "wrapupCode": UUID
  "userId": UUID
}

2. Fetch missing details

See Genesys gateway

2.1 Fetch agent name

GET https://api.{{environment}}/api/v2/users/{{userId}}
  • userId comes from supportResult.userId

  • The resulting model has a string attribute "name"

2.2 Fetch wrap-up code detail

https://api.{{environment}}/api/v2/routing/wrapupcodes/{{codeId}}
  • codeId comes from supportResult.wrapupCode

  • The resulting model has a string attribute "name"

2.3 Fetch customer ID

  • In “Support Interaction” table (from 0.) will be a mapping from interactionId to customerId

  • As interaction ID use supportResult.conversationId

    • confirmed that conversation ID is that same as interaction ID

  • If missing, use null

3. Log communication

Use existing endpoint

POST communication-history-manager/communicationRecords 

Attribute

Value

Notes

direction

If supportResult.direction is "inbound": "INBOUND"
If supportResult.direction is "outbound": "OUTBOUND"
Otherwise: throw exception

from 1

communicatedAt

supportResult.eventTime

from 1

source

"Call center"

constant

channel

Based on supportResult.mediaType

  • "callback""VOICE"

  • "chat""CHAT"

  • "cobrowse""OTHER" // needs to be added

  • "email""EMAIL"

  • "message""SMS"

  • "screen share""VIDEO" // needs to be added

  • "unknown""OTHER"

  • "video""VIDEO"

  • "voice""VOICE"

  • Otherwise: "OTHER"

The missing types should be added to CommunicationRecordChannel enum

from 1

domain

"OTHER"

constant

customerId

customerId

from 2.3

customerHandle

supportResult.ani

from 1

interactionId

supportResult.conversationId

from 1

bankUserId

null

constant

bankUserName

user.name

from 2.1

purpose

wrapupCode.name

from 2.2

title

supportResult.subject

if null or empty string: "Call center communication"

from 1

or constant

body

empty string

This could fold the call transcript later.

constant

Limitations

Given that the Genesys is not able to send customerId into the /supportResult endpoint, we rely on BOFE for mapping the interaction ID to customer ID. This brings several possible problematic cases:

  • A communication occurs in Genesys but not in BOFE (customer asks some general info). In this case the communication would be logged but it would not be tracable to the particular customer.

  • Another example of the above is customer sending an email to Call center, or call center sending emails back - how will those get mapped to customer ID?

  • If during one communication session in Genesys the agent will access pages for more customer (because the caller can verify for them), only the last one will be paired with that communication.

How to mitigate these and whether they are big issues or not should be discussed with Zbyněk Melichar (Unlicensed)