Skip to content

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

  1. Sign in to Kore.ai botbuilder.
  2. Click Data > Data Tables.
  3. Click New Table. data-table-new-table

  4. 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. new-table-page

      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.) indexes-page
    • Bot Assignments (not applicable)

    • App Assignments to let apps access data in this table.

      • Select any app from the displayed list, or click Create New App and enter your app name:
        create-new-app

      • 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.

        data-apps-new-app

    • Process Assignments (not applicable)

  5. Click Create to create the new data table.
    create-new-data-table

Insert data into Data Table

Set up necessary permissions and app assignments and insert bot-specific data into the Data Table.

  1. Sign in to Kore.ai botbuilder.
  2. Click Data > Apps.
  3. Select the App with write access to the Data Table where you want to add information.
    client-id-client-secret

  4. Copy Client ID and Client Secret of the app.

  5. Create a JWT Token using the Client ID and Client Secret by following this doc.
  6. 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:

api-body-example

Create Connector

  1. Sign in to Five9 Administrator Console.
  2. Search for “connectors” in the search bar, and select Connectors.
    connectors

  3. Click the Create button. create-connectors

    create-new-connectors

  4. Provide a name in the Connector Name field.

  5. The URL should be {[Agent AI]}/integrations/five9/
  6. The method should be GET. create-new-connector-get-method

  7. Click Next. create-new-connector-next

  8. In the Parameters section, click the Add dropdown and select Field. create-new-connector-param

  9. Select session_id, domain_id, id, skill_name/campaign_name, and click Ok. add-field

    add-field-ok

  10. Click the Edit icon against the parameters and change as per the following:

    • domain_id -> domainid
    • id -> agentid
    • session_id -> conversationid
    • skill_name/campaign_name -> identifiers changing-parameters
  11. In the Parameters section, click the Add dropdown and select Constant. parameters-add-constant

  12. 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>}}

    add-constant

  13. Click Ok > Next. ok-next

  14. 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.

  15. Click Done. create-new-connector-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. ivr-script

Create Inbound Campaign

  1. Sign in to the Admin Console.
  2. Search for campaigns, and select Campaigns. search-campaigns

    select-campaigns

  3. Click Create.

  4. Select Inbound, and click Continue. create-campaign

    new-campaign

  5. Enter the following details:

    1. Enter a campaign name.
    2. Enter a campaign description.
    3. 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.

    4. 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.

    5. 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.

    6. Enter the usage threshold percentage. This is the maximum percentage of lines in use that triggers a notification when reaching this threshold.

    7. Enter email addresses for threshold notifications. Use semicolons to delimit a list.
    8. 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.
    9. Click Next.
      new-campaign-next
  6. Do not select anything in the Numbers section, and click Next.

  7. Click Default Script, and select the default IVR Script or the IVR Script created in the previous step.
  8. Click Next. new-campaign-default-script

  9. Click Digital Skill, and either select the skill created in the previous step or the Default Skill.

  10. Click Create. new-campaign-digital-script

    Note

    After the inbound campaign is created successfully, start the campaign. Refer to the Manage Campaigns doc for help.

Chat Simulation

  1. Open Script Generator.
  2. Enter your Five9 account domain name in the Domain field and the chat inbound campaign name in the Profiles field. chat-simulation-1

  3. Scroll down, and click Preview on Page. chat-preview-on-page

  4. Enter values in the Name and Question fields.

  5. Click Start Chat. start-chat

  6. Open the Five9 Agent Desktop, and change the status to Ready (Text).

  7. The request arrives on the desktop. Click the lock icon to accept the interaction. accept-interaction

  8. Once the interaction is accepted, the connector opens by default where the Agent AI widget is rendered. agentai-widget

  9. Click the send button to send a message to the customer. The message gets copied to the clipboard, if you click the copy button.

  10. When the agent or customer ends the chat, the chat summary appears in the Agent AI widget. chat-summary

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.