Overview
This integration enables Amazon Connect to receive calls, and Kore Agent AI helps agents during voice conversations. We use Amazon Kinesis to store audio streams of both users and agents.
High-level architecture
Prerequisites
- Amazon Connect instance with admin privileges.
- Kore Agent AI account.
- Basic know-how of Amazon Connect.
- Ability to receive voice calls on Amazon Connect agent desktop.
Components Required
This integration consists of the following components:
- Kore Agent AI
- AWS Lambda
- Amazon Kinesis Streams
- Amazon Connect
AWS Lambda
KVS Trigger
- This function pulls the call stream’s metadata and the Amazon Web Services (AWS) credentials from the environment and generates credentials set (SessionToken, AccessKeyId, SecretAccessKey) for accessing the relevant KVS.
- It then triggers the Transcriber to start consuming the KVS and send the transcripts to the specified Kore.ai bot with context of the current Conversation ID.
IFrame Token Generator
- Generates Kore Agent AI IFrame widget token to display properly within Amazon Connect agent workspace.
Transcription Trigger
- This is a microservice that extracts the required parameters from the request body and generates the KVS Processing executable as a separate process with the parameters (like Contact Details, Credentials, and Voice Gateway).
AWS Connect Third Party Application
- This includes the Kore Agent AI widget that renders within the Amazon Connect Agent Workspace with the context of the current conversation.
Integration Setup Guide
Kore Agent AI
To onboard the Kore Agent AI account and create dialog tasks, refer to the Agent AI Setup Guide.
AWS Lambda
KVS Trigger
- Download the Lambda from here and upload to AWS.
- Go to Create function.
- Enter a name in the Function name field.
- Go to Upload from.
- Upload the Lambda zipped file.
- Click Save.
- Go to Runtime settings.
- Click Edit and change the Handler name from index.handler to kvs_trigger.handler.
- Go to Configuration > Environment variables.
- Create the following environment variables within the Lambda:
- kvsAccessKeyId – AWS Client ID
- kvsSecretAccessKey – AWS Client Secret
- region – add your AWS Region
- transcriberURL – https://agentassist.kore.ai/integrations/amzn/voice/
- The final configuration should appear like the following image
IFrame Token Generator
- Download the Lambda from here and upload this function on Lambda .
AWS Connect Third Party Application Configuration
- Go to Amazon Connect > Third-party applications.
- Click Add application.
- Enter a Display name for your app – for example, Kore.ai AgentAssist Application.
- Enter a Namespace for the app – for example, kore.ai-example-ns.
- Enter “https://agentassist.kore.ai/integrations/amzn/tpa-voice/” in the Access URL field.
- Select all the instances that you want to enable AgentAssist for in the Instance association – optional field.
Note: Third Party Apps are not supported for SAML based Amazon Connect instances. To use Kore.ai AgentAssist with SAML based Amazon Connect Instances, refer to this doc.
- Click Add application.
Amazon Connect
Configuring Amazon Connect Instance
- Select your Amazon Connect instance. (To create a new instance, follow Create an Amazon Connect instance.)
- Click Data storage.
- Click Edit next to Live media streaming. Here, you must create instances of Kinesis Video Streams.
- Add an appropriate Prefix for the Kinesis Video Streams and select an AWS Key Management Service.
- Set an appropriate Data retention period – 1 hour should be enough for Kore.ai AgentAssist use cases.
- Click Save.
- Click Data streaming.
- Select the Enable data streaming checkbox.
- Select Kinesis Stream.
- Click Create a new Kinesis Stream for this application, or select an existing one from the dropdown list. You can use the same stream for Contact Trace Records (CTRs) and Agent Events.
- Click Save.
- Click Flows.
- Click Choose an option under AWS Lambda.
- Select KVS Trigger Lambda from the dropdown list.
- Click Add Lambda Function.
- Follow the above two steps for the IFrame Token Generator Lambda.
Configuring Amazon Connect Contact Flow
- Sign in to your Amazon Connect Instance.
- Click Flows.
- Click Create flow.
- Click the dropdown list icon.
- Click Import.
- Select KoreAgentAssist.json from the file upload menu. You can download it from here.
- Click Import.
- Click Set contact attributes and enter the required fields:
- Click Save.
- Click Start Stream and Transcription in Kore Lambda.
- Select your Trigger Lambda Function from the dropdown list.
- Click Save.
- Click Kore Token Generator for TPA Lambda.
- Select your IFrame token generation Lambda.
- Click Save.
- For the Transfer to Flow, select a flow you want to move the user to.
- To use agent dispositions, configure the Set Event Flow block with Disconnect flow for Agent UI hook by importing this flow and selecting it. If not, you can delete the block and connect the remaining blocks to the disconnect block.
Note: The disposition saving logic is at your discretion. Implement as per your use case. Some examples are: - Click Save, and publish the flow.
Attaching Contact Flow to Phone Number
- Click Channels > Phone numbers.
- Select the Phone Number to attach to the flow. If you don’t have a number, go through How to get an Amazon Connect phone number in your current country to claim a phone number.
- Click the dropdown list to select the Contact flow.
- Click the AgentAssist flow you created.
- Click Save.
Test Your Integration
- Open Agent Workspace from the home screen of your Amazon Connect instance.
- Change the agent status to Available. All the third-party applications created in the earlier steps will be visible on the right side under the Apps dropdown.
- Call the Amazon Connect number. Once the incoming call lands into the agent desktop, accept it.
- Click the Apps section, and open the third-party application created earlier.
- The Agent AI widget renders on the right side of the screen.
- The Agent AI widget listens to all the user and agent conversation, and the transcript is visible on the Transcript tab of the widget.
- Based on the use case/dialog task configuration in your Agent AI portal, real-time suggestions appear on the Assist Home tab of the widget from the user message in the transcription.
- Once the call is disconnected, a call summary appears. The agent can modify the summary or copy it to save it into the CRM.
- The Agent AI widget renders on the right side of the screen.