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
| Key | Definition | Reference |
|---|---|---|
| Identifiers | A 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
- Capture Bot Information in Agent AI Third-Party Configuration
- Access Custom Data and Secure Custom Data in Agent AI Bot
Configurations on Five9 Admin Console
- Five9 Account Setup for Incoming Phone Call
- Create Connector
- Create VoiceStream
- Create Custom Call Variables
Interaction between Five9 and Agent AI

Five9 Agent AI - Voice Flow Steps
- Customer** **calls Five9 Virtual Contact Center
- Agent accepts the call on Five9 Agent Desktop
- Five9 sends call metadata via HTTP POST /callevents to Audiosocket Server
- Five9 opens gRPC StreamingVoice bidirectional stream (audio encoding: LINEAR16, 8000Hz)
- Five9 adapter routes audio to Voice Gateway
- Voice Gateway sends audio stream to Kore-managed ASR
- ASR returns real-time transcriptions to Voice Gateway
- The system forwards the transcriptions to Agent Assist backend
- Agent Assist backend shares the transcripts with Agent Desktop Widget (Agent Assist Transcript Tab)
- 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.




Create Connector
- Sign in to Five9 Administrator Console.
-
Search for connectors in the search bar, and select Connectors.

-
Click the Create button.

- Provide a name in the Connector Name field.
-
Enter the URL as
{Agent AI URL}/integrations/five9/. -
Enter the method as GET.

- Click Next.
-
In the Parameters section, click the Add dropdown list, and select Field.

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


-
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
-
In the Parameters section, click the Add dropdown, and select Constant.

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

-
Click Ok > Next.

- By default, Call is selected for Trigger Event and On Call Accepted is selected for On Call Event.
- Click Done.
Five9 Account Setup for Incoming Phone Call
- Buy a phone number by following the Numbers Inventory doc.
-
Create IVR script by following the Creating an IVR Script doc.
Sample IVR Script:




- Create a skill and add agents to the skill by following the Skills doc.
-
Create an inbound campaign by following the Create Inbound Campaigns doc.
After you create the inbound campaign, run it.
Create VoiceStream
- Sign in to Five9 Admin Console.
-
Search for VoiceStream, and click VoiceStream.

- Click Create.
- Enter a unique VoiceStream subscription name in the Name field.
- Select Other (Self Service) in Streaming Destination field.
- Select gRPC as Streaming Protocol.
- 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
- Click Done.
- The system uses the generated API Key for authorization of post API call events.
- 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
- Sign in to Five9 Admin Console.
- Search for variables, and open Variables.
- Click Create.
- Give the group Name as Kore, and click Create.
-
Click Kore.

- Click Create Variable.
- 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.
- For the question Will the data in this variable be needed in reports?, select No.
- Click Next.
- 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.
- Click Done.
- Click Create Variable.
- 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.
- 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>}}