Skip to main content
This document explains how to integrate the Agent AI widget into the Five9 Agent Desktop. It provides step-by-step instructions for a smooth and efficient setup. This integration supports key Agent AI features, including Automation, Agent Coaching, Agent Playbook, sentiment analysis, Transcription, with end-of-call summary, Custom Data, and Secure Custom Data passing, such as agent name and ID to the Agent AI widget.

Prerequisites

  • Five9 administrator having access to a Five9 Admin Console, with privileges to set up the configurations, and can receive calls on Five9 Agent desktop.
  • Five9 VoiceStream set up for your instance. Contact your Five9 representative for help.
  • Kore administrator having access to Kore.ai Agent AI instance and familiarity with creating and configuring an Agent AI Bot.
  • Kore App credentials, such as Agent AI Widget URL, Bot ID, Client ID, Client Secret, Account ID, and SIP URI.

Definitions

KeyDefinitionReference
IdentifiersA unique identifier in the Data Table to fetch bot details at run time. It can be a skill name or a campaign name.
SecureCustomDataConfig (to pass sensitive information to the Agent AI Bot.)The key-value pairs (KVPs) you need to include in SecureCustomData. JSON object containing the necessary keys and xpath (paths to locate the value in Five9 Call Variables).
This column is optional. Use it to send secure custom data to Agent AI.
Sample:
{
"skillName": "Call.skill_name",
"agentName": "Agent.full_name"
}
CustomDataConfig (to pass information to the Agent AI bot.)The KVPs you need to include in CustomData. JSON object containing the necessary keys and xpath (paths to locate the value in Five9 Call Variables).
Optional column. Use it to send custom data to Agent AI.
Sample:
{
"skillName": "Call.skill_name",
"agentName": "Agent.full_name"
}

Configurations on Kore Platform

Configurations on Five9 Admin Console

Interaction between Five9 and Agent AI

architecture-diagram

Five9 Agent AI - Voice Flow Steps

  1. Customer** **calls Five9 Virtual Contact Center
  2. Agent accepts the call on Five9 Agent Desktop
  3. Five9 sends call metadata via HTTP POST /callevents to Audiosocket Server
  4. Five9 opens gRPC StreamingVoice bidirectional stream (audio encoding: LINEAR16, 8000Hz)
  5. Five9 adapter routes audio to Voice Gateway
  6. Voice Gateway sends audio stream to Kore-managed ASR
  7. ASR returns real-time transcriptions to Voice Gateway
  8. The system forwards the transcriptions to Agent Assist backend
  9. Agent Assist backend shares the transcripts with Agent Desktop Widget (Agent Assist Transcript Tab)
  10. Agent Assist backend shares the transcripts with Agent Assist bot, and the bot recognizes the intents and sends responses back to the Agent Assist Widget. This process continues until the end of the call.

Capture Agent AI Bot Mapping for Skills or Campaigns

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. You can’t map one skill or campaign to multiple Agent AI bots. Refer to the Third-Party Configuration doc 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: create-record create-record-add-values The values should be base64 encoded. third-party-configuration-page Ensure the Third-Party Configuration setting is enabled in Agent AI > Configurations > Widget Settings > Agent AI Settings > Agent AI General Settings. third-party-config-setting-agentai

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-new-connector
  4. Provide a name in the Connector Name field.
  5. Enter the URL as {Agent AI URL}/integrations/five9/.
  6. Enter the method as GET. connector-configuration
  7. Click Next.
  8. In the Parameters section, click the Add dropdown list, and select Field. connector-add-select-field
  9. Select call_id, session_id, domain_id, id, skill_name / campaign_name (choose either skill_name or campaign_name, depending on which you use to map the bot in Agent AI), and click Ok. add-field connector-configuration-complete
  10. Click the Edit icon against the parameters and change as per the following:
    • call_id -> callid
    • domain_id -> domainid
    • id -> agentid
    • session_id -> conversationid
    • skill_name/campaign_name -> identifiers
  11. In the Parameters section, click the Add dropdown, and select Constant. connector-parameters-constant
  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. add-constant
  13. Click Ok > Next. add-constant-next
  14. By default, Call is selected for Trigger Event and On Call Accepted is selected for On Call Event.
  15. Click Done.

Five9 Account Setup for Incoming Phone Call

  1. Buy a phone number by following the Numbers Inventory doc.
  2. Create IVR script by following the Creating an IVR Script doc. Sample IVR Script: sample-ivr-script assignment variable set-variable-module
  3. Create a skill and add agents to the skill by following the Skills doc.
  4. Create an inbound campaign by following the Create Inbound Campaigns doc.
    After you create the inbound campaign, run it.

Create VoiceStream

  1. Sign in to Five9 Admin Console.
  2. Search for VoiceStream, and click VoiceStream. voice-stream
  3. Click Create.
  4. Enter a unique VoiceStream subscription name in the Name field.
  5. Select Other (Self Service) in Streaming Destination field.
  6. Select gRPC as Streaming Protocol.
  7. Configure the following Destinations and provide Trust Token value as KoreGrpc. Primary Streaming Destination: savg-us-grpc-audiosocket.kore.ai:443 CTI Call Event Destination: https://savg-webserver.kore.ai/audiosocket/five9/callevents VoiceStream Event Destination: https://savg-webserver.kore.ai/audiosocket/five9/callevents
  8. Click Done.
  9. The system uses the generated API Key for authorization of post API call events.
  10. Configure the Trust Token (provided by Kore) while creating the subscription. It is validated at Kore by call event get API.

Create Custom Call Variables

  1. Sign in to Five9 Admin Console.
  2. Search for variables, and open Variables.
  3. Click Create.
  4. Give the group Name as Kore, and click Create.
  5. Click Kore. variable-groups
  6. Click Create Variable.
  7. Give the variable Name as botid. For the question Will this variable contain sensitive data?, select option No, select the Datatype as String, and then click Next.
  8. For the question Will the data in this variable be needed in reports?, select No.
  9. Click Next.
  10. For the question Should the values of this variable come from a predefined list?, Select No and provide your Bot Client ID in the Set Default Value field.
  11. Click Done.
  12. Click Create Variable.
  13. Repeat the same steps and create a variable with the name sipuri, and a default value containing the sipuri configured for your Agent AI Bot.
  14. Click Done.

Access Custom Data and Secure Custom Data in the Agent AI Bot

You can access the Custom Data and Secure Custom Data in Welcome Events in Agent AI configuration page and in Dialog Tasks in the Agent AI automation page. You can access the Custom Data as {{context.session.UserContext.customData.<key>}}. Follow this doc for the detailed steps on how to access Custom Data. You can access the Secure Custom Data as {{context.session.UserContext.secureCustomData.<key>}} Follow the same steps of this doc for detailed information on how to access Secure Custom Data, with the exception of the path being {{context.session.UserContext.secureCustomData.<key>}}