Integration of Agent AI in Genesys is a significant enhancement to our solution. Previously limited to a single bot and a department-specific approach, the solution has now been upgraded to support multiple bots and a queue-based functionality. This enhancement enables Genesys Cloud CX to offer a more flexible and scalable solution for businesses seeking to leverage AI to improve agent efficiency and customer satisfaction across multiple departments.
Definitions
Section/Group | Key | Definition | Reference |
Generate Oauth ID to enable Kore Services to Connect with Genesys
+ Create an Interaction Widget in Genesys for Agent AI |
Agent AI URL | The domain of the Agent AI. |
|
Client App | To use any Kore.ai Bot SDKs, a client app must be created to get the authentication credentials to communicate between the Kore.ai bot and Agent AI.
Note: Only the default Client App is supported. |
https://developer.kore.ai/docs/bots/channel-enablement/adding-the-webmobile-client-channel/ | |
Create an Interaction Widget in Genesys for Agent AI | Custom Data / x_passthru_metadata | Use this to pass information to Agent AI Bot. | |
Capture Bot Information in Kore Data Table | Secure Custom Data / KvpConfig | Use this to pass sensitive information to Agent AI Bot. | https://developer.kore.ai/docs/bots/sdks/user-authorization-and-assertion/#JSON_Web_Encryption_JWE |
Create an Interaction Widget in Genesys for Agent AI | Interaction Widget | The Interaction Widget is utilized for displaying the Agent AI iframe within the Genesys Agent Desktop. | https://help.mypurecloud.com/articles/set-up-an-interaction-widget-integration/ |
Create an Interaction Widget in Genesys for Agent AI | Interaction Widget URL params |
|
x_metadata’s JSON object structure is
{ “datatable”:{ “name”:<datatable name>, “token”:<jwt token created using App’s ClientId and ClientSecret>, “qDelimiter”:<Paste the special character used in the queue name to distinguish the QueueIdentifier from the remaining part of the queue name> } } |
Capture Bot Information in Kore Data Table | BotId | A unique identifier assigned to a bot. | Channels > Chat section of the Agent AI configuration portal. |
Capture Bot Information in Kore Data Table | ClientId | An identifier provided to a client application. | Channels > Chat section of the Agent AI configuration portal. |
Capture Bot Information in Kore Data Table | ClientSecret | A secret key or password associated with the ClientId. | Channels > Chat section of the Agent AI configuration portal. |
Capture Bot Information in Kore Data Table | AgentAssistWidgetURL | URL that points to the Agent AI widget.
For example, https://agentassist.kore.ai/koreagentassist-sdk-v3/UI/agentassist-iframe.html |
Channels > Chat section of the Agent AI configuration portal. |
Capture Bot Information in Kore Data Table | AudiohookEnabled | A setting or flag indicating whether Kore audio processing is enabled for the bot. | “true” if Kore audio processing should be enabled, otherwise “false”. |
Capture Bot Information in Kore Data Table | QueueIdentifier | It’s a unique identifier in the Data Table to fetch bot details at run time. | |
Capture Bot Information in Kore Data Table | KvpConfig | The KVPs (Key value pairs) to be included in SecureCustomData. JSON object containing the necessary keys and xpath (paths to locate the value in Genesys Conversation API result JSON object). (https://developer.genesys.cloud/devapps/api-explorer#get-api-v2-conversations–conversationId-)
Note: Optional Column. Required when you wish to send secure custom data to Agent AI. |
Sample:
{ “queueName”: “participants[0].queueName”, “callStatus”: “participants[0].calls[0].state” } |
Capture Bot Information in Kore Data Table | JWEPublicKey | Public key assigned to the Client App.
Note: Optional Column. Required when you wish to send secure custom data to Agent AI. |
Channels > Web/Mobile Client > App Details section of the Agent AI automation portal. |
Capture Bot Information in Kore Data Table | RSPrivatePem | The Private Key that corresponds to the Public Key supplied during the creation of a Client App using the RS256 or RS512 algorithm. | RSPrivatePemKey is an optional column and is required when the Algorithm used is “RS256” or “RS512”.
(Not supported / Will be supported in future releases) |
Capture Bot Information in Kore Data Table | Algorithm | Algorithm assigned to the Client App. | Currently, “HS256” algorithm is the only supported value. So, Algorithm value will always be “HS256”. |
Install Audiohook for Voice Streaming | Kore Voice Gateway(KVG) | For Saas in US region, value is savg-webserver.kore.ai
For on-prem, refer to corresponding host |
Architecture Diagrams
Chat
Voice
Interaction Sequence
This document provides detailed, step-by-step instructions for setting up the integration of the Agent AI widget in the Genesys environment.
Activities on Kore Platform
- Capture Bot information in Kore Data Table
- Access Custom Data and Secure Custom Data in Agent AI Bot
Activities on Genesys Cloud
- Generate Oauth ID to enable Kore Services to Connect with Genesys
- Create an Interaction Widget in Genesys for Agent AI
- Provide Interaction Widget Access to Agents
- Create a Queue in Genesys
Chat Setup
- Create/Update an Architect Inbound Message Flow in Genesys for the Agent Queue
- Create Messenger Configuration
- Create Messenger Deployment
- Steps to Start a Chat Request
Voice Setup
- (Optional) Install Audiohook for Voice Streaming
- Create/Update an Architect Inbound Call Flow in Genesys for the Agent Queue
- Steps to Start a Voice Request
Prerequisites
- Genesys Administrator having access to Genesys Cloud account with Admin rights
- Kore Administrator having access to Kore.ai Agent AI instance
Capture Bot Information in Kore Data Table
Data Tables are used to store agent queue-specific bot credentials. Each record of the Kore Data Table represents a unique Genesys agent queue and its corresponding bot definitions.
If a single bot is used for several queues, create a record for each queue with the same bot definition.
Kore.ai matches the third-party queue name with the “QueueIdentifier” credential name in its bot credentials to render the appropriate bot.
Bot credentials are fetched based on Genesys desktop queue names. If the Genesys queue name is of the “<QUEUEIDENTIFIER><QDELIMITER>XXXXX” format, for example “ALPHAINC_CUSTOMERSERVICE_16092024,” then:
- QueueIdentifier = ALPHAINC and qDelimiter = “_”.
- Update the QueueIdentifier in the Kore datatable.
- Update the qDelimiter in the “Create an Interaction Widget in Genesys for Agent AI” section.
Note: Multiple records with different bot credentials shouldn’t be entered into the Kore Data Table for a single QueueIdentifier.
How to create a New Data Table
- Sign in to Kore.ai botbuilder.
- Click Data > Data Tables.
- Click New Table.
- Enter the following details in the New Table page:
- Name of the Data Table. (Any alphanumeric name.)
- Description of the Data Table.
- Columns to be included in the data table. Click the “tick” mark to add multiple columns.
Add the following case-sensitive columns with type “string”:
Mandatory Columns:- QueueIdentifier (unique identifier for the table)
- BotId
- ClientId
- ClientSecret
- AgentAssistWidgetURL
- AudiohookEnabled
Optional Columns:
- KvpConfig
- JWEPublicKey
- Algorithm (HS256)
- RSPrivatePem (Ignore/Not Supported)
- Indexes for the table.
- Index Name for reference.
- Is Unique flag to define if the index is expected to contain unique values. (Enable “is Unique.”)
- Column & Sort Order – List of columns to be included in the index; you can select multiple columns and specify the sort order (ascending or descending) for each of the selected columns. (Select QueueIdentifier with ascending order.)
- Bot Assignments (Not Applicable)
- App Assignments to let apps access data in this table.
- Process Assignments (Not Applicable)
- Click Create to create the new data table.
Insert data into Data Table
Set up necessary permissions and app assignments and insert bot-specific data into the Data Table.
- Sign in to Kore.ai botbuilder.
- Click Data > Apps.
- Select the App with write access to the Data Table where you want to add information.
- Copy Client ID and Client Secret of the App.
- Create a JWT Token using the Client ID and Client Secret by following this doc.
- Insert the following data into the Data Table by following this doc. Use the JWT Token created in the previous step.
API Body Payload Structure:
{ "data": { "QueueIdentifier": <Unique QueueIdentifier>, "BotId": <Kore BotId>, "ClientId": <Kore ClientId>, "ClientSecret": <Kore ClientSecret>, "AudiohookEnabled": "true" / “false”, "AgentAssistWidgetURL": <Kore Agent AI Widget URL>, "KvpConfig": <KVPs of SecureCustomData>, "JWEPublicKey": <Public Key assigned to Client App>, "Algorithm": "HS256" } }
Note: JWEPublicKey and KvpConfig value should be a stringified JSON object.
Generate Oauth ID to enable Kore Services to Connect with Genesys
Steps to get Genesys OAuth ID:
- Sign in to Genesys Cloud.
- Go to Admin > Integrations > OAuth.
- Click Add Client.
- Enter the app name, description, and token duration in the App Name, Description, and Token Duration fields.
- Select Token Implicit Grant (Browser) in the Grant Types section.
- Add {Agent AI URL}/koreaiaa-genesys/ in the Authorized redirect URIs field.
- Add the following list of scopes in the Scope section:
- conversations
- conversations:readonly
- integrations
- integrations:readonly
- messaging
- messaging-platform
- messaging-platform:readonly
- messaging:readonly
- notifications
- user-basic-info
- web-chat
- web-chat:readonly
After saving the configuration, you will get the Client Id of the created OAuth client. Copy the ID and have it available for the next step.
Create an Interaction Widget in Genesys for Agent AI
Create a new Interaction Widget. This widget is hosted in the Genesys agent desktop and provides the Agent AI solution features to agents.
Steps to create an Interaction Widget:
- Sign in to Genesys Cloud.
- Click Admin > Integrations.
- If you have not created an Interaction Widget for Agent AI, install a new Interaction Widget by clicking the Integrations tab on the right side of the page.
- Name the Interaction Widget with a meaningful name, such as KoreaiAA Interaction Widget.
- Open the Interaction Widget by clicking the name.
- Go to the Configuration tab of the Interaction Widget.
- In the Application URL field, enter the following structure:
{Agent AI URL}/koreaiaa-genesys/?conversationid={{gcConversationId}}&lang={{gcLangTag}}&environment={{gcHostOrigin}}&genesysid=<genesys-oauth-Id>&multibot=true&x_metadata=<?x=%7B%22datatable%22%xxxxx>&x_passthru_metadata=<JWE-Token>.
Note: x_passthru_metadata is an optional query parameter. This is required when you wish to pass custom data to Agent AI.
The “x_metadata” value equals the url-encoded string of JSON object.
- For the oauthId value, use the OAuth ID from the generate OAuth step.
- Build x_metadata data:
- Sign in to Kore botbuilder.
- Click Data > Data Tables, and copy the Data Table name:
- Click Apps, and click one of the app names that has “read” access:
- Copy the Client ID and Client Secret values.
- Create a JWT Token using the Client ID and Client Secret by following this doc.
- Generate a JSON object with the specified structure and then convert it into a url-encoded string:
{ "datatable": { "name": <paste datatable name>, "token": <paste token created in previous step>, "qDelimiter": <Paste the special character used in the queue name to distinguish the QueueIdentifier from the remaining part of the queue name> } }
Website for url encoding – urlencoder
- Copy the url-encoded string and paste it against the x_metadata value.
- Allow all permissions in iFrame Sandbox Options and iFrame Feature/Permission Policy.
iFrame Sandbox Options: allow-forms,allow-modals,allow-popups,allow-presentation,allow-same-origin,allow-scripts,allow-downloads.
iFrame Feature/Permission Policy: camera,microphone,geolocation,clipboard-write,display-capture,fullscreen.
Communication Type Filtering: chat and call.
Provide Interaction Widget access to agents
To view the Interaction Widget, agents must have the following accesses:
Group Membership
An Interaction Widget uses Group Membership to determine who can view it on the agent desktop.
- Use an existing Group, if your agents are already part of it. Otherwise, create a new Group for Agent AI permission.
- Name the Group as KoreAA-Agents or similar to distinguish it.
- Add any agent to allow them to use the Agent AI functionality. You can utilize more than one Group, if required.
- Go back to the Integrations section and open the Interaction Widget created in the Create an Interaction Widget step.
- On the Configuration tab, add access using the Group you identified or created for Agent AI in the Group Filtering option.
You may also utilize Queue Filtering (optional).
Custom Role/Permission
In addition to the basic agent role, add a new role as given below:
- Sign in to Genesys Cloud.
- Go to Admin > People & Permissions > Roles / Permissions.
- Click Add Role to create a new role.
- Give a distinctive name to the role; for example, KoreaiAA Agent.
- On the Permission tab, search for Conversation > Transcription > View, and add (select the box):
Note: The Conversation permission is available only in the CX3 license. - Once finished, the Assigned Permissions view should look like this:
- Once the role is created, click the three dots at the right end of the Permission role, and select Change Membership. Add the appropriate agents to the role.
Create a Queue in Genesys
- Sign in to Genesys Pure Cloud.
- Go to Admin > Contact Center > Queues, or enter “queues” in the search bar under the Admin section and press the Enter key.
- Click Create Queue. An empty page to create a new queue appears on the right side of the page.
- Enter/select the following details in the Create Queue page:
- Name: Enter a unique name for the new queue.
- Division: Select a division in which you want to place this queue.
- Copy settings and members from (Optional): Select an existing queue name, if you want to copy the settings and members from it.
- Peer Id (Optional) : Enter a unique ID that can be used to identify the queue from an external platform.
- Click Save.
Enabling the Audio Monitoring toggle
To stream audio to third-party services, follow the below steps:
- Sign in to Genesys Pure Cloud.
- Go to Admin > Contact Center > Queues, or enter “queues” in the search bar under the Admin section and press the Enter key.
- Click the intended queue name.
- Click the Voice tab.
- Enable the Audio Monitoring toggle.
Audio Monitoring: Voice settings on a Queue now have an additional Audio Monitoring option, separate from Voice Transcription. This allows granularity in what you turn on. The Audio Monitoring will be enabled in the queue, if Audiohook Monitor is enabled by the organization.
Create/Update Architect Inbound Message Flow in Genesys for the Agent Queue
This step is essential for managing incoming messages to the Genesys platform. When a chat is initiated from the web chat messenger, it first gets directed to this inbound message flow.
Steps to create a Chat Architect Flow
- Sign in to Genesys Cloud.
- Go to Admin > Architect > Architect.
- Click the three dots next to Flows: Inbound Call, and select Inbound Message.
- Click the +Add button to create an Inbound Message Flow.
- Click Create Flow. The final architect flow looks like the following screenshot:
- Click Publish.
Create Messenger Configuration
Before using web messaging, you must configure it in Genesys Cloud. To configure Web or Mobile Messaging in your organization, follow these steps:
- Sign in to Genesys Cloud.
- Go to Admin > Message > Messenger Configurations.
- Click New Configuration.
- Enter a name and description.
- Click the Appearance tab and complete the following information:
- Under Select your Supported Languages, click the Select language(s) list and choose the languages that you want to support in the Messenger interface.
Note: The same language should be configured in the Kore Agent AI bot.
- Under Select Default Language, click the Select language list and choose the default language.
- Adjust the other settings according to your preferences.
- Under Select your Supported Languages, click the Select language(s) list and choose the languages that you want to support in the Messenger interface.
- Click the Apps tab and complete the following steps:
- Click Save New Version to create a new version.
Create Messenger Deployment
To deploy the Messenger snippet to your website, follow these steps:
- Sign in to Genesys Cloud.
- Go to Admin > Message > Messenger Deployments.
- Click New Deployment.
- Enter a name and description.
- Under Select your Configuration, click Select Configuration to select a version of a Messenger configuration created in the previous step to assign to this deployment.
- In the Assignment pane, navigate to the Messenger configuration you want to assign to the configuration, and click the name of the Messenger configuration.
- Select the version that you want to assign.
- Click Save.
- Under Restrict domain access, determine whether to allow all domains or restrict the domains on which you want to deploy the snippet.
- To allow all domains, select the Allow all domains option. Use this option for testing and development purposes.
- To restrict domains, enter a domain and click Add Domain. You can add multiple domains to the list. Restrict domains to prevent unauthorized usage of your snippet from unknown domains. If you restrict a domain, Messenger does not run on that website and rejects API requests from that domain.
- Under Select your Architect Flow, select the inbound message flow created in the previous steps.
- Click Save. The Messenger Deployments page now displays the snippet and the deployment key.
- Copy the Messenger snippet and deploy the Messenger snippet to your website.
(Optional) Install Audiohook for Voice Streaming
The final step is to install Audiohook for voice streaming, if using Kore-managed Transcriptions.
- Sign in to Genesys Cloud.
- Go to Admin > Integrations > Integrations.
- Enter “audiohook” in the search bar.
Audiohook integration requires specific configuration values to support Agent AI configuration. - Install a new audiohook app by clicking the Integrations button on the top-right corner.
- Open the Audiohook, and go to the Configuration tab.
- Channel value should be both.
- The Connection URI format should be similar to
wss://{Kore Voice Gateway(KVG)}/audiosocket/genesys/?sipuri=xxx&token=xxx&botId=xxx&accountId=xxx&agentassist=true, but add “multiBot=true” parameter to it.
Note 1: Configure sip of any of the bot inserted in the Data Table.Note 2: Kore Voice Gateway(KVG) host name to be referred from corresponding environment being used at Saas or on-prem
- Get sipuri=sip:<sip-string> from Agent AI > Voice channel.
- Use the following reference from Agent AI Channel configuration page to fetch Bot ID, Account ID, Client ID, and Client Secret (for token generation).
- Follow the steps of Using XO Platform APIs – Kore.ai Documentation to generate the token (token= <token>.)
- Add credentials in the Credentials tab. Use the ClientID and ClientSecret of the bot you have used while configuring the Audiohook. These credentials are used to validate the audiostream signature by Kore.
- Click Save.
Create/Update an Architect Inbound Call Flow in Genesys for the Agent Queue
When a call comes to a Genesys number, it passes through an architect flow. If you do not have an ACD architect flow for the queue, create one by following this section.
Steps to Create a Call Architect Flow
- Sign in to Genesys Cloud.
- Go to Admin > Architect > Architect.
- Click the +Add button to create an Inbound Call Flow.
- Click Create Flow. The final architect flow looks like the following screenshot:
Notes:
- Inside the Transfer to ACD node, select the queue name where you want to transfer the call.
- The Transcription node is optional, if you have already enabled Voice Transcription and Audio Monitoring in the queue level voice configuration.
- Architect flow is required as a mandatory step, as it directs the incoming call to the Genesys agent desktop.
Access Custom Data and Secure Custom Data in Agent AI Bot
Custom Data and Secure Custom Data can be accessed in Welcome Events in Agent AI configuration page and in Dialog Tasks in Agent AI automation page.
Custom Data can be accessed as
{{context.session.UserContext.customData.<key>}}.
Secure Custom Data can be accessed as
{{context.session.UserContext.secureCustomData.<key>}}.
Dialog Tasks:
In the Dialog Task, open a Message node and click Manage Responses.
Post Installation Setup
Steps to start a Chat Request
- Sign in to Genesys Developer Applications.
Note: To start chat simulation, you must have access to the Genesys Developer portal (an account with Genesys).
- Select Web Messenger, and then click Start Chat to initiate the chat request.
- Enter a message on the Message Us window, and click the Send icon.
- Turn on the On Queue toggle on the top-right corner of the page.
- A new chat notification appears on the Genesys Agent Desktop. Accept the conversation by clicking the Answer button on the left panel.
- Select the Interaction Widget icon to view the Agent AI widget.
Steps to start a Voice Request
- In Call Routing, assign the Architect flow created in the Create an Architect Flow step to a Genesys Phone Number.
- Initiate a call using this Genesys Phone Number.
- A new call notification appears on the Genesys Agent Desktop. Accept the conversation by clicking the Answer button on the left panel.
- Select the Interaction Widget icon to view the Agent AI widget.