Multi-app Agent AI Integration with Genesys¶
Multi-app Integration of Agent AI in Genesys is a significant enhancement to our solution. Previously limited to a single app 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.
This document provides detailed, step-by-step instructions for setting up the multi-app integration of the Agent AI widget in the Genesys environment.
-
Step 1: Create and configure a Data Table on the XO Platform
-
Step 3: Create an Interaction Widget in Genesys for Agent AI
Prerequisites¶
- Genesys Cloud account with Admin rights.
- Kore.ai Agent AI instance.
- Familiarity with creating a Group in Genesys.
Step 1: Create and configure a Data Table on Ai for Service¶
Kore.ai matches the third-party queue name with the "QueueIdentifier" credential name in its app credentials to render the appropriate bot.
Kore.ai uses Data Tables to store app credentials, including:
- BotId: A unique identifier assigned to an app.
- ClientId: An identifier provided to a client application.
- ClientSecret: A secret key or password associated with the ClientId.
- Agent AIWidgetURL: URL that points to the Agent AI widget.
- AudiohookEnabled: A setting or flag indicating whether audio processing is enabled for the bot.
- QueueIdentifier: Third-party identifier (company/department) name. It’s a unique identifier to fetch the app details at run time.
App 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.
Creating a New Data Table¶
Create a Data Table to store app credentials on the XO Platform.
- Sign in to Kore.ai appbuilder.
- Click Data > Data Tables.
-
Enter the following details in the New Table page:
4.1. Name of the Data Table.
4.2. Description of the Data Table.
4.3. Columns to be included in the data table. Click the “tick” mark to add multiple columns.
Add the following case-sensitive columns:
4.3.1. AudiohookEnabled
4.3.2. Agent AIWidgetURL
4.3.3. ClientSecret
4.3.4. ClientId
4.3.5. BotId
4.3.6. QueueIdentifier: Enter your company/department name.
4.4. Indexes for the table.
4.5. Bot Assignments to let AI Agent access data in this table.
4.6. App Assignments to let apps access data in this table.
4.6.1. Select any app from the displayed list, or click Create New App and enter your app name:
4.6.2. Select the Read, Write, and Delete permissions, as required.
Note
You can also create new apps by clicking Data > Apps > New App in the home page:
4.7. Process Assignments to let a process app access data in this table.
5. 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 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", "Agent AIWidgetURL": <Kore Agent AI Widget URL> } }
Step 2: Get Genesys Oauth ID¶
An OAuth credential with proper permissions is required for the connection between the Kore.ai Agent AI interaction widget and the Kore.ai platform.
A Genesys OAuth ID is required to complete the URL formation for the Genesys interaction widget.
Steps to get Genesys OAuth ID:
- Sign in to Genesys Cloud.
-
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 https://Agent AI.kore.ai/koreaiaa-genesys/ in the Authorized redirect URIs (one per line) section. Replace “Agent AI.kore.ai” with the domain where your Agent AI is hosted.
-
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 Step 3.
Step 3: 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.
-
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.
-
In the Application URL field, enter the following structure:
https://Agent AI.kore.ai/koreaiaa-genesys/?conversationid={{gcConversationId}}&lang={{gcLangTag}}&environment={{gcHostOrigin}}&genesysid=<genesys-oauth-Id>&multibot=true&x_metadata=<?x=%7B%22datatable%22%xxxxx>
.
Replace “Agent AI.kore.ai” with the domain where your Agent AI is hosted. The “x_metadata
” value equals the url-encoded string
of JSON object.7.1. For the oauthId value, use the OAuth ID from Step 2.
7.2. For the x_metadata value:
7.2.1. Sign in to Kore botbuilder.
7.2.2. Click Data > Data Tables, and copy the Data Table name:
7.2.3. Click Apps, and click one of the app names that has “read” access:
7.2.4. Copy the Client ID and Client Secret values.
7.2.5. Create a JWT Token using the Client ID and Client Secret by following this doc.
7.2.6. Generate a JSON object with the specified structure and then convert it into a url-encoded string:
{ “datatable”:{ “name”: <paste the datatable name> “token”: <paste token created in the previous step> “qDelimiter”: <Paste the special character used in the queue name to distinguish the QueueIdentifier from the remaining part of the queue name> } }
7.2.7. 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.
Step 4: 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 Step 2.
- 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.
Step 5: (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.
5.1. Channel value should be both.
5.2. The Connection URI format should be similar to
wss://savg-webserver.kore.ai/audiosocket/genesys/?sipuri=xxx&token=xxx&botId=xxx&accountId=xxx&Agent AI=true, but add “multiBot=true” parameter to it.Note
This configuration can be done for a single app present in Kore.ai Data Table.
-
Use the following reference from Agent AI, Bot Channel configuration page to fetch App ID, Account ID, Client ID, and Client Secret (for token generation).
7.1. Follow the steps of API Introduction to generate the token (token= <token>.)
-
Add credentials in the Credentials tab. Use the ClientID and ClientSecret of the app you have used while configuring the Audiohook. These credentials are used to validate the audiostream signature by Kore.
-
Click Save.
Step 6: Create an Architect Flow in Genesys for the 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 an architect flow¶
- Sign in to Genesys Cloud.
-
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.