Chat Integration with Five9
This document provides step-by-step instructions for integrating the Agent AI widget into the Five9 Agent Desktop. It covers the full integration process, ensuring a smooth setup and enabling all Agent AI features, including Automation, Agent Coaching, Agent Playbook, Sentiment Analysis, and end-of-call summaries.
Prerequisites¶
Administrators having access to a Five9 Admin Console and with privileges to set up the following configurations:
- Five9 Chat enabled for your instance. Contact your Five9 representative.
- Kore Administrators having access to Kore.ai Agent AI instance and familiarity with creating and configuring an Agent AI Bot.
- Kore.ai App credentials such as Agent AI Widget URL, Bot ID, Client ID, and Client Secret. Read this doc for a walkthrough.
Definitions¶
Key | Definition | Reference |
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/ |
Connector | Five9 Connector is utilized for displaying the Agent AI iframe within the Five9 Agent Desktop. | |
BotId | A unique identifier assigned to a bot. | Channels > Chat section of the Agent AI configuration portal. |
ClientId | An identifier provided to a client application. | Channels > Chat section of the Agent AI configuration portal. |
ClientSecret | A secret key or password associated with the ClientId. | Channels > Chat section of the Agent AI configuration portal. |
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. |
BotLanguageCode | The Language configured in the Agent AI Bot. | Refer to the Supported Languages doc to get the language code for all the supported languages. |
Identifiers | It’s a unique identifier in the Data Table to fetch bot details at run time. It can be a skill name or campaign name. | |
JWEPublicKey | Public key assigned to the Client App. | Channels > Web/Mobile Client > App Details section of the Agent AI automation portal. |
Configurations on the Kore Platform¶
Configurations on the Five9 Admin Console¶
Capture Bot Information in the Kore Data Table¶
Data Tables are used to store skill or campaign-specific bot credentials. Each record of the Kore Data Table represents a unique Five9 skill or campaign and its corresponding bot definitions.
If a single bot is used for several skills or campaigns, create a separate record for each skill or campaign, separated by commas as the value for the Identifiers, along with the bot details.
Kore.ai matches the third-party skill or campaign name with the “Identifiers" credential name in its bot credentials to render the appropriate bot.
Note
Do not enter multiple records with different bot credentials 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.
-
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:
- Identifiers (unique identifier for the table)
- BotId
- ClientId
- ClientSecret
- AgentAssistWidgetURL
- BotLanguageCode
- JWEPublicKey
-
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 Identifiers with ascending order.)
-
Bot Assignments (not applicable)
-
App Assignments to let apps access data in this table.
-
Process Assignments (not applicable)
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": {
"Identifiers": <Unique Skill/Campaign Name>,
"AgentAssistWidgetURL": <Kore Agent AI Widget URL>,
"BotId": <Kore BotId>,
"ClientId": <Kore ClientId>,
"ClientSecret": <Kore ClientSecret>,
"JWEPublicKey": <Public Key assigned to Client App>
}
}
```
Note
JWEPublicKey value should be a stringified JSON object.
Example:
Create Connector¶
- Sign in to Five9 Administrator Console.
-
Search for “connectors” in the search bar, and select Connectors.
-
Provide a name in the Connector Name field.
- The URL should be {[Agent AI]}/integrations/five9/
-
In the Parameters section, click the Add dropdown and select Field.
-
Select session_id, domain_id, id, skill_name/campaign_name, and click Ok.
-
Click the Edit icon against the parameters and change as per the following:
-
In the Parameters section, click the Add dropdown and select Constant.
-
Enter Name as x_metadata and the Value should be {"datatable":{"name":<Kore Datatable Name>,"token":<JWT Token created using the Client ID and Client Secret of the app by following this doc>}}
-
By default, Call is selected for Trigger Event and On Call Accepted is selected for On Call Event. Select Chat for Trigger Event, and the On Chat Arrival appears for On Chat Event.
- Click Done.
Five9 Account Setup to get Incoming Chat Requests¶
- Create a skill, and add agents with Chat/SMS Channel enabled to the skill by following this doc.
- Create a chat profile by following this doc.
- Create IVR Script by following this doc.
Create Inbound Campaign¶
- Sign in to the Admin Console.
-
Click Create.
-
Enter the following details:
- Enter a campaign name.
- Enter a campaign description.
-
Click Chat Profile, and either select the chat profile you created in the previous step or choose SystemDefault.
Note
You must have the necessary permission to view campaign profiles. An error message displays if you don't have the required permission.
-
Voice Lines: Enter the number of lines to dedicate to voice traffic. This is the maximum number of phone lines or ports to support the calls allotted to this campaign.
-
Text Interactions: Enter the number of lines to dedicate to text interactions.
This setting runs IVR scripts for chat or email campaigns, and determines how many IVR sessions can run the IVR script concurrently. For example, if 10 customers are in a chat campaign, and the number of text channels is set to 5, then only 5 of those customer interactions use the IVR script, and the other 5 route to the chat campaign's default skill without any scripting logic.
-
Enter the usage threshold percentage. This is the maximum percentage of lines in use that triggers a notification when reaching this threshold.
- Enter email addresses for threshold notifications. Use semicolons to delimit a list.
- Enter the number of lines to dedicate to Visual IVR (VIVR) sessions. This setting runs an IVR script using a web browser URL, but instead of TTS prompts playing audio (as in a voice call), it displays the actual TTS text. A voice caller and a VIVR caller get the same IVR flow and experience; one uses voice, and the other uses a browser screen for online viewing. For more information about VIVR, see the Interactive Voice Response (IVR) admin guide.
- Click Next.
-
Do not select anything in the Numbers section, and click Next.
- Click Default Script, and select the default IVR Script or the IVR Script created in the previous step.
-
Click Digital Skill, and either select the skill created in the previous step or the Default Skill.
-
Note
After the inbound campaign is created successfully, start the campaign. Refer to the Manage Campaigns doc for help.
Chat Simulation¶
- Open Script Generator.
-
Enter your Five9 account domain name in the Domain field and the chat inbound campaign name in the Profiles field.
-
Enter values in the Name and Question fields.
-
Open the Five9 Agent Desktop, and change the status to Ready (Text).
-
The request arrives on the desktop. Click the lock icon to accept the interaction.
-
Once the interaction is accepted, the connector opens by default where the Agent AI widget is rendered.
-
Click the send button to send a message to the customer. The message gets copied to the clipboard, if you click the copy button.
- When the agent or customer ends the chat, the chat summary appears in the Agent AI widget.
Integration Limitations¶
- Custom Data and Secure Custom Data passing is not supported.
- Internal Transfers are not supported as the widget can’t be rendered for other agents joining the conversation, as the Five9 connector is getting disabled for other agents.
- Concurrent Chats Limitation: Customer messages or summary events for a specific chat are delivered to the Agent AI widget only when that chat window is active. If the agent navigates to a different chat, any new messages or events of the previous chat will not be captured and delivered to the widget.