> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent AI 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](/ai-for-service/agentai/agent-experience/agent-realtime-coaching#real-time-agent-coaching), [Agent Playbook](/ai-for-service/agentai/agent-experience/playbook#agent-ai-playbook), [Sentiment Analysis](/ai-for-service/agentai/agent-experience#sentiment-analysis), and end-of-call summaries.

## Prerequisites

Administrators with 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 with access to [Kore.ai](https://agentassist.kore.ai/) Agent AI instance and familiarity with creating and configuring a Kore AI Agent.
* Kore.ai App credentials such as Account ID. Read [this doc](/ai-for-service/channels/adding-channels-to-your-bot) for a walkthrough.

## Definitions

| **Key**          | **Definition**                                                                                                               | **Reference**                                                                                                                                                                                                                       |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Agent AI URL     | The domain of the Agent AI.                                                                                                  | - If it's legacy Agent AI, the URL is [Agent AI](https://agentassist.kore.ai).<br /> - If it's AI for Service, the URL is `https://platform.kore.ai`.<br /> - If it's on-prem, the URL is the origin where your Agent AI is hosted. |
| Connector        | The Five9 Connector displays the Agent AI iframe within the Five9 Agent Desktop.                                             |                                                                                                                                                                                                                                     |
| Account ID       | A unique identifier for an account.                                                                                          | Available under **Channels** > **Chat** in the [Agent AI](https://agentassist.kore.ai) configuration portal.                                                                                                                        |
| BotLanguageCode  | The language configured in the Kore AI Agent.                                                                                | Refer to the [Supported Languages](/ai-for-service/agentai/agent-experience/supported-languages) document for the language code of all supported languages.                                                                         |
| Queue Identifier | A unique identifier in the Data Table used to fetch AI Agent details at run time. It can be a skill name or a campaign name. |                                                                                                                                                                                                                                     |

## Configurations on Kore Agent AI

* [Capture Agent AI Bot Mapping for Skills or Campaigns](#capture-agent-ai-bot-mapping-for-skills-or-campaigns)

## Configurations on the Five9 Admin Console

* [Create Connector](#create-connector)
* [Five9 Account Setup to get Incoming Chat Requests](#five9-account-setup-to-get-incoming-chat-requests)

### Capture Agent AI Bot Mapping for Skills or Campaigns

[Third-Party Configuration](/ai-for-service/agentai/configuration/third-party-configuration) maps Agent AI bots to specific skills or campaigns. Within this configuration, you can define the bot's language, custom data, or secure custom data.

For example, if you want Agent AI Bot1 to be associated with Skill1, and Agent AI Bot2 with Skill2, you need to:

* Create a record in Third-Party Configuration for Agent AI Bot1, setting the Queue Identifier to Skill1.
* Create a record in Third-Party Configuration for Agent AI Bot2, setting the Queue Identifier to Skill2.

This setup ensures the correct Agent AI widget is rendered for conversations routed based on the defined skill or campaign.

<Note>
  * Custom Data and Secure Custom Data are currently not supported for the Five9 Chat integration.
  * One Skill or Campaign can not be mapped to multiple Agent AI bots.
</Note>

Refer to the [doc](/ai-for-service/agentai/configuration/third-party-configuration) for instructions on creating records in Third-Party Configuration for an Agent AI Bot.

**Example**:

You have a skill named **Chat\_Skill**, that handles incoming chat requests, and you want the Agent AI widget to render for conversations routed to this skill. You must create the following details of the Third-Party Configuration record in your Agent AI account:

<img src="https://mintcdn.com/koreai/wBhZm_F3YgBV6Nll/ai-for-service/agentai/integration/five9/images/create-record.png?fit=max&auto=format&n=wBhZm_F3YgBV6Nll&q=85&s=06eb93c394e520094fd4614bdb0d204d" alt="create-record" width="639" height="933" data-path="ai-for-service/agentai/integration/five9/images/create-record.png" />

<img src="https://mintcdn.com/koreai/wBhZm_F3YgBV6Nll/ai-for-service/agentai/integration/five9/images/create-record-add-values.png?fit=max&auto=format&n=wBhZm_F3YgBV6Nll&q=85&s=a33dbd67eb1792dc450bc2d07a4524b5" alt="create-record-add-values" width="638" height="932" data-path="ai-for-service/agentai/integration/five9/images/create-record-add-values.png" />

<Note>The **Values** should be **base64 encoded**.</Note>

<img src="https://mintcdn.com/koreai/FRsCZP2v9LC4efyX/ai-for-service/agentai/integration/five9/images/third-party-configuration.png?fit=max&auto=format&n=FRsCZP2v9LC4efyX&q=85&s=60f94c9189477918c4e8c617e2615626" alt="third-party-configuration" width="1602" height="474" data-path="ai-for-service/agentai/integration/five9/images/third-party-configuration.png" />

<Note>Ensure the **Third-Party Configuration** setting is enabled in **Agent AI** > **Configurations** > **Widget Settings** > **Agent AI Settings** > **Agent AI General Settings**.</Note>

<img src="https://mintcdn.com/koreai/wBhZm_F3YgBV6Nll/ai-for-service/agentai/integration/five9/images/enable-third-party-configuration.png?fit=max&auto=format&n=wBhZm_F3YgBV6Nll&q=85&s=ed0e1196d86ae461dec987c9c39e663b" alt="enable-third-party-configuration" width="1584" height="867" data-path="ai-for-service/agentai/integration/five9/images/enable-third-party-configuration.png" />

## Create Connector

1. Sign in to [Five9 Administrator Console](https://admin.us.five9.net/).

2. Search for "connectors" in the search bar, and select **Connectors**.
   <img src="https://mintcdn.com/koreai/wBhZm_F3YgBV6Nll/ai-for-service/agentai/integration/five9/images/connectors_9.png?fit=max&auto=format&n=wBhZm_F3YgBV6Nll&q=85&s=9e0f4a00ce23f9d63c49667585759593" alt="connectors" width="1850" height="934" data-path="ai-for-service/agentai/integration/five9/images/connectors_9.png" />

3. Click the **Create** button.

   <img src="https://mintcdn.com/koreai/wBhZm_F3YgBV6Nll/ai-for-service/agentai/integration/five9/images/create-connectors_10.png?fit=max&auto=format&n=wBhZm_F3YgBV6Nll&q=85&s=f5d870d538196e5f12c658d5ae9aa56e" alt="create-connectors" width="1848" height="933" data-path="ai-for-service/agentai/integration/five9/images/create-connectors_10.png" />

   <img src="https://mintcdn.com/koreai/wBhZm_F3YgBV6Nll/ai-for-service/agentai/integration/five9/images/create-new-connectors_11.png?fit=max&auto=format&n=wBhZm_F3YgBV6Nll&q=85&s=a1b3db8c7aa5a24b8aafb66a85ebc055" alt="create-new-connectors" width="1846" height="931" data-path="ai-for-service/agentai/integration/five9/images/create-new-connectors_11.png" />

4. Provide a name in the **Connector Name** field.

5. The URL should be `{Agent AI URL}/integrations/five9/`

6. The method should be GET.
   <img src="https://mintcdn.com/koreai/wBhZm_F3YgBV6Nll/ai-for-service/agentai/integration/five9/images/create-new-connector-get-method_12.png?fit=max&auto=format&n=wBhZm_F3YgBV6Nll&q=85&s=0fd618d290fd7b73905c4575293065ac" alt="create-new-connector-get-method" width="1848" height="890" data-path="ai-for-service/agentai/integration/five9/images/create-new-connector-get-method_12.png" />

7. Click **Next**.
   <img src="https://mintcdn.com/koreai/wBhZm_F3YgBV6Nll/ai-for-service/agentai/integration/five9/images/create-new-connector-next_13.png?fit=max&auto=format&n=wBhZm_F3YgBV6Nll&q=85&s=0c3e1734e2671bc4f59b6146ef5d5c5e" alt="create-new-connector-next" width="1849" height="933" data-path="ai-for-service/agentai/integration/five9/images/create-new-connector-next_13.png" />

8. In the **Parameters** section, click the **Add** dropdown and select **Field**.
   <img src="https://mintcdn.com/koreai/wBhZm_F3YgBV6Nll/ai-for-service/agentai/integration/five9/images/create-new-connector-param_14.png?fit=max&auto=format&n=wBhZm_F3YgBV6Nll&q=85&s=cfcdf25f35b7ebd39208dc6e5613c22b" alt="create-new-connector-param" width="1850" height="933" data-path="ai-for-service/agentai/integration/five9/images/create-new-connector-param_14.png" />

9. Select **session\_id**, **domain\_id**, **id**, **skill\_name/campaign\_name** (choose either skill\_name or campaign\_name, depending on which is used to map the bot in Agent AI), and click **Ok**.

   <img src="https://mintcdn.com/koreai/wBhZm_F3YgBV6Nll/ai-for-service/agentai/integration/five9/images/add-field_15.png?fit=max&auto=format&n=wBhZm_F3YgBV6Nll&q=85&s=59f9ac15f5425f61abb12355b68655c6" alt="add-field" width="1849" height="892" data-path="ai-for-service/agentai/integration/five9/images/add-field_15.png" />

   <img src="https://mintcdn.com/koreai/wBhZm_F3YgBV6Nll/ai-for-service/agentai/integration/five9/images/add-field-ok_16.png?fit=max&auto=format&n=wBhZm_F3YgBV6Nll&q=85&s=1f04cf3273e1eb9035137965a0741ab5" alt="add-field-ok" width="1843" height="894" data-path="ai-for-service/agentai/integration/five9/images/add-field-ok_16.png" />

10. Click the **Edit** icon against the parameters and change as per the following:
    * domain\_id -> Domain ID
    * id -> Agent ID
    * session\_id -> conversationid
    * skill\_name/campaign\_name -> identifiers
      <img src="https://mintcdn.com/koreai/wBhZm_F3YgBV6Nll/ai-for-service/agentai/integration/five9/images/changing-parameters_17.png?fit=max&auto=format&n=wBhZm_F3YgBV6Nll&q=85&s=c67d7dc4f29408a576bf45fcfbf3d330" alt="changing-parameters" width="1848" height="893" data-path="ai-for-service/agentai/integration/five9/images/changing-parameters_17.png" />

11. In the **Parameters** section, click the **Add** dropdown and select **Constant**.
    <img src="https://mintcdn.com/koreai/FRsCZP2v9LC4efyX/ai-for-service/agentai/integration/five9/images/parameters-add-constant_18.png?fit=max&auto=format&n=FRsCZP2v9LC4efyX&q=85&s=7d4ab7c258b86bc1cae6cb71acb777f0" alt="parameters-add-constant" width="1848" height="882" data-path="ai-for-service/agentai/integration/five9/images/parameters-add-constant_18.png" />

12. Enter **Name** as **accountid** and the **Value** should be the **accountid** of your Agent AI account. Find this ID by navigating to **Agent AI** > **Flows & Channels** > **Channels** > **Digital** > **Web/Mobile Client** > **JWT App Details**. Refer to this [doc](/ai-for-service/channels/add-web-mobile-client#adding-the-web-mobile-client-channel).

    <img src="https://mintcdn.com/koreai/wBhZm_F3YgBV6Nll/ai-for-service/agentai/integration/five9/images/add-constant.png?fit=max&auto=format&n=wBhZm_F3YgBV6Nll&q=85&s=d0d794939d51645a652ef12cb7a882e9" alt="add-constant" width="1848" height="887" data-path="ai-for-service/agentai/integration/five9/images/add-constant.png" />

13. Click **Ok** > **Next**.
    <img src="https://mintcdn.com/koreai/FRsCZP2v9LC4efyX/ai-for-service/agentai/integration/five9/images/ok-next_20.png?fit=max&auto=format&n=FRsCZP2v9LC4efyX&q=85&s=51a0eb5c4565975b1eee986b49a99055" alt="ok-next" width="1848" height="931" data-path="ai-for-service/agentai/integration/five9/images/ok-next_20.png" />

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**.
    <img src="https://mintcdn.com/koreai/wBhZm_F3YgBV6Nll/ai-for-service/agentai/integration/five9/images/create-new-connector-done_21.png?fit=max&auto=format&n=wBhZm_F3YgBV6Nll&q=85&s=26dc107799b93640fd34cb1d121a034d" alt="create-new-connector-done" width="1844" height="888" data-path="ai-for-service/agentai/integration/five9/images/create-new-connector-done_21.png" />

## 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](https://documentation.five9.com/bundle/admin-console/page/admin-console/skills/_ch-user-skills.htm).
* Create a chat profile by following [this doc](https://documentation.five9.com/bundle/digital-engagement/page/digital-engagement/digital-in-admin-console/digital-components/chat-profiles.htm).
* Create IVR Script by following [this doc](https://documentation.five9.com/bundle/ivr-admin/page/ivr-admin/examples/creating-an-ivr-script.htm).
  <img src="https://mintcdn.com/koreai/FRsCZP2v9LC4efyX/ai-for-service/agentai/integration/five9/images/ivr-script_22.png?fit=max&auto=format&n=FRsCZP2v9LC4efyX&q=85&s=de354413e28ad9d0eff4cb0cd269ba23" alt="ivr-script" width="893" height="477" data-path="ai-for-service/agentai/integration/five9/images/ivr-script_22.png" />

### Create Inbound Campaign

1. Sign in to the [Admin Console](https://admin.us.five9.net/).

2. Search for campaigns, and select **Campaigns**.

   <img src="https://mintcdn.com/koreai/FRsCZP2v9LC4efyX/ai-for-service/agentai/integration/five9/images/search-campaigns_23.png?fit=max&auto=format&n=FRsCZP2v9LC4efyX&q=85&s=a23c84a3085d4491f985c0f356f37f2b" alt="search-campaigns" width="1850" height="891" data-path="ai-for-service/agentai/integration/five9/images/search-campaigns_23.png" />

   <img src="https://mintcdn.com/koreai/FRsCZP2v9LC4efyX/ai-for-service/agentai/integration/five9/images/select-campaigns_24.png?fit=max&auto=format&n=FRsCZP2v9LC4efyX&q=85&s=0565632c70ed2e200b9b4c7417a0a649" alt="select-campaigns" width="1847" height="884" data-path="ai-for-service/agentai/integration/five9/images/select-campaigns_24.png" />

3. Click **Create**.

4. Select **Inbound**, and click **Continue**.

   <img src="https://mintcdn.com/koreai/wBhZm_F3YgBV6Nll/ai-for-service/agentai/integration/five9/images/create-campaign_25.png?fit=max&auto=format&n=wBhZm_F3YgBV6Nll&q=85&s=b53f51b23252cb746375569548cf644a" alt="create-campaign" width="1847" height="884" data-path="ai-for-service/agentai/integration/five9/images/create-campaign_25.png" />

   <img src="https://mintcdn.com/koreai/FRsCZP2v9LC4efyX/ai-for-service/agentai/integration/five9/images/new-campaign_26.png?fit=max&auto=format&n=FRsCZP2v9LC4efyX&q=85&s=98075d207aaabcedef97d429d75f24f9" alt="new-campaign" width="1846" height="882" data-path="ai-for-service/agentai/integration/five9/images/new-campaign_26.png" />

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.</Note>

   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 br /owser 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 br /owser screen for online viewing. For more information about VIVR, see the [Interactive Voice Response (IVR)](https://documentation.five9.com/bundle/ivr-admin/page/ivr-admin/landing-ivr-admin.htm) admin guide.

   9. Click **Next**.
      <img src="https://mintcdn.com/koreai/FRsCZP2v9LC4efyX/ai-for-service/agentai/integration/five9/images/new-campaign-next_27.png?fit=max&auto=format&n=FRsCZP2v9LC4efyX&q=85&s=664187b83c1b89b498e353da28b6a3e7" alt="new-campaign-next" width="1849" height="891" data-path="ai-for-service/agentai/integration/five9/images/new-campaign-next_27.png" />

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**.
   <img src="https://mintcdn.com/koreai/FRsCZP2v9LC4efyX/ai-for-service/agentai/integration/five9/images/new-campaign-default-script_28.png?fit=max&auto=format&n=FRsCZP2v9LC4efyX&q=85&s=1dab7a702e9b92fe27f2eefd62c48e5f" alt="new-campaign-default-script" width="1847" height="888" data-path="ai-for-service/agentai/integration/five9/images/new-campaign-default-script_28.png" />

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

10. Click **Create**.

    <img src="https://mintcdn.com/koreai/FRsCZP2v9LC4efyX/ai-for-service/agentai/integration/five9/images/new-campaign-digital-script_29.png?fit=max&auto=format&n=FRsCZP2v9LC4efyX&q=85&s=ab8953cf14bc8680b4cfd40e5e65aa26" alt="new-campaign-digital-script" width="1848" height="889" data-path="ai-for-service/agentai/integration/five9/images/new-campaign-digital-script_29.png" />

    <Note>After the inbound campaign is created successfully, start the campaign. Refer to the [Manage Campaigns](https://documentation.five9.com/bundle/admin-console/page/admin-console/campaigns/managing-campaigns.htm) doc for help.</Note>

## Chat Simulation

1. Open [Script Generator](https://app.five9.com/five9_clients/consoles_latest/Generator/index.html).

2. Enter your Five9 account domain name in the **Domain** field and the chat inbound campaign name in the **Profiles** field.
   <img src="https://mintcdn.com/koreai/wBhZm_F3YgBV6Nll/ai-for-service/agentai/integration/five9/images/chat-simulation-1_30.png?fit=max&auto=format&n=wBhZm_F3YgBV6Nll&q=85&s=9dcda3687fd34f19bcb8b7c92aef0d29" alt="chat-simulation-1" width="1847" height="968" data-path="ai-for-service/agentai/integration/five9/images/chat-simulation-1_30.png" />

3. Scroll down, and click **Preview on Page**.
   <img src="https://mintcdn.com/koreai/wBhZm_F3YgBV6Nll/ai-for-service/agentai/integration/five9/images/chat-preview-on-page_31.png?fit=max&auto=format&n=wBhZm_F3YgBV6Nll&q=85&s=139b5eca1c7be924ca3a62d8f1d7b868" alt="chat-preview-on-page" width="1846" height="968" data-path="ai-for-service/agentai/integration/five9/images/chat-preview-on-page_31.png" />

4. Enter values in the **Name** and **Question** fields.

5. Click **Start Chat**.
   <img src="https://mintcdn.com/koreai/FRsCZP2v9LC4efyX/ai-for-service/agentai/integration/five9/images/start-chat_32.png?fit=max&auto=format&n=FRsCZP2v9LC4efyX&q=85&s=5c25ce0ccaa3d18a2c43311f7758386c" alt="start-chat" width="1847" height="970" data-path="ai-for-service/agentai/integration/five9/images/start-chat_32.png" />

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.
   <img src="https://mintcdn.com/koreai/wBhZm_F3YgBV6Nll/ai-for-service/agentai/integration/five9/images/accept-interaction_33.png?fit=max&auto=format&n=wBhZm_F3YgBV6Nll&q=85&s=6fc333dd610c16ae208d2b92f6f3798f" alt="accept-interaction" width="1848" height="890" data-path="ai-for-service/agentai/integration/five9/images/accept-interaction_33.png" />

8. Once the interaction is accepted, the connector opens by default where the Agent AI widget is rendered.
   <img src="https://mintcdn.com/koreai/wBhZm_F3YgBV6Nll/ai-for-service/agentai/integration/five9/images/agentai-widget_34.png?fit=max&auto=format&n=wBhZm_F3YgBV6Nll&q=85&s=41b4beddd09a9e74e8b8040b08e5a10f" alt="agentai-widget" width="1848" height="889" data-path="ai-for-service/agentai/integration/five9/images/agentai-widget_34.png" />

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.
    <img src="https://mintcdn.com/koreai/wBhZm_F3YgBV6Nll/ai-for-service/agentai/integration/five9/images/chat-summary_35.png?fit=max&auto=format&n=wBhZm_F3YgBV6Nll&q=85&s=78ecf257ec2a09cc1f05102fa715a010" alt="chat-summary" width="1848" height="894" data-path="ai-for-service/agentai/integration/five9/images/chat-summary_35.png" />

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