AWS Contact Center
Boost customer service with Amazon Connect AI-enhanced email workflows
1. Introduction
Amazon Connect Email delivers built-in capabilities to prioritize, assign, and automate customer service email resolution within Amazon Connect’s unified omni-channel contact center platform. Organizations can manage email interactions alongside voice and chat, route emails based on customer attributes and content, and maintain interaction history within customer profiles.
This blog describes how to add AI-powered workflows to Amazon Connect Email using Amazon Bedrock, providing practical solutions to automate routine inquiries and speed up agent response times.
2. Challenges
Organizations often face gaps between email demand and capacity. Let’s take a company’s customer service team as an example. Their agents require 15 minutes on average to handle a single email—reading, researching, composing, reviewing, and responding. At 2,000 emails per day, incoming volume quickly overwhelms resources, demanding 500 hours of daily agent capacity.

But the company has only 480 hours available. Their 1,000-agent workforce dedicates just 300 people to email support, and those agents spend 20% of their eight-hour shifts processing emails.
This creates a persistent 20-hour gap, equivalent to 2.5 full-time employees short every single day. This is their baseline reality, even before volume spikes or seasonal surges strain agents further. The negative impacts are growing backlogs, SLA breaches, and mounting pressure on both quality and customer satisfaction.
3. Solution
Amazon Connect integrates with Amazon Bedrock to create AI-powered email workflows using large language models (LLMs). The system analyzes incoming emails, parsing customer intent, assessing complexity and risk, and determining optimal handling paths.
3.1 Solution architecture
The following steps outline the email processing flow:

- Email receipt: Amazon Connect receives emails and stores them in Amazon S3.
- Flow activation: Amazon Connect triggers the ACEmailAI-EmailSuggestedResponseConfidenceScore flow.
- Customer lookup: Flow retrieves customer profiles (credit score, service level, etc.)
- AI analysis: AWS Lambda function processes emails asynchronously, invoking Amazon Bedrock API to analyze intent, categorize content, and calculate confidence scores (0-100). Uses Claude 3.5 Haiku with automatic fallback to Claude 3 Haiku.
- Knowledge retrieval: AWS Lambda function performs Amazon Bedrock retrieval using vector-based similarity search with Titan Text Embeddings v2 and Amazon OpenSearch Serverless indexing.
- Results storage: AWS Lambda function saves processing results to Amazon DynamoDB using contact ID as primary key.
- Polling mechanism: Secondary AWS Lambda function polls DynamoDB every three seconds (up to three iterations with initial twelve-second wait).
- Contact attribute retrieval: Flow retrieves results as contact flow attributes for routing decisions.
- Routing decision: Based on confidence threshold (e.g., 80):
- a. High confidence (≥80): Automatically sends generated response
- b. Low confidence (<80): Routes to agent queue
- Step-by-step guides: Display customer attributes, category, intent summary and confidence score with explanation
- Customer context: Provides customer profiles and their contact history
- Case management: Creates cases or updates their intent summaries automatically
- Amazon Q in Connect: Provides email overviews, surfaces knowledge articles, and generates response drafts.
- Agent review: Agents customize AI-suggested responses, ensuring human oversight
3.2 Confidence scoring framework
In step 4 of the solution architecture described above, the system uses the confidence scoring framework with six key factors to calculate the confidence score for each email.

- Missing knowledge: -100 points. When the knowledge base lacks relevant information, the system deducts 100 points. This prevents inaccurate automated responses that can damage customer trust.
- Unclear information: -85 points. Incomplete or ambiguous emails trigger an 85-point deduction. The system avoids guessing customer intent.
- Premium complaints: -50 points. Premium customers raising issues lose 50 points from the confidence score. These customers expect personalized attention and relationship management.
- Angry/frustrated tone: -30 points. The AI detects negative sentiment and deducts 30 points. Frustrated customers benefit from human empathy and exception-handling.
- Urgency: -15 points. Time-sensitive requests result in a 15-point deduction. Urgent requests could require resource allocation.
- Multiple topics: -10 points per topic. Each additional topic beyond the primary inquiry deducts 10 points. Multi-issue emails might require human coordination and review.
The solution uses a two-step process.
- Amazon Bedrock’s LLM evaluates email content and produces binary outputs (0 or 1) for each factor.
- A mathematical function applies the impact values. This helps to ensure precise calculations independent of the LLM and maintains scores within 0-100 range.
For example, an email with missing knowledge (-100), unclear information (-85), and premium complaints (-50) would accumulate -235 points but floors at zero.
The framework is fully customizable by adjusting impact values or adding factors based on business needs.
4. Technical walkthrough
4.1 Prerequisites
Before deploying the stacks, verify that Amazon Connect and other required AWS services are available in your chosen region. Deployment has been tested successfully in us-east-1 and eu-central-1.
Configure the deployment environment on your local machine at first.
Next, execute the following command lines to download the GitHub repository and configure the virtual environment.
Then, ensure the following AWS resources are enabled in your Amazon Connect instance.
- Email capablities
- Customer Profiles
- Cases and case template
- Amazon Q in Connect with Amazon S3 integration
4.2 Configuration
In the project’s root directory,
- Modify the .env file by replacing placeholder text with your actual AWS resource values
- Update the customerprofiles.csv file by replacing existing EmailAddress entries with active email addresses that can send and receive emails
Save both files before proceeding with deployment.
4.3 Solution deployment
Follow these steps to complete the deployment.
4.3.1 Deploy OpenSearch stack
Bootstrap and deploy OpenSearch stack
4.3.2 Create an OpenSearch Index
There are two options to create an OpenSearch index. Please choose only one of them.
Option 1: Using AWS CLI prepared in the scripts:
Linux/macOS: Run the provided bash script:
Windows PowerShell: Run the provided PowerShell script:
Important: Not all Amazon OpenSearch Serverless features are available in every AWS region. If you encounter the error “An error occurred (AccessDeniedException) when calling the CreateIndex operation: API is not supported,” follow the manual index creation steps using the AWS console described in Option 2.
Option 2: Using AWS console:
Go to AWS console → OpenSearch Service → Serverless collections
- Select kb-vector-collection
- Select Indexes tab
- Choose Create index
- Highlight JSON
- Enter Index name kb-email-ai-acemailaisandbox-index
- Copy and paste the following JSON into the mapping field:

- Confirm Create index to complete the process
4.3.3 Deploy main stack
Deploy main stack after the OpenSearch index creation.
4.3.4 Sync knowledge base data
After the main stack deployment, sync your knowledge articles with the Bedrock Knowledge Base.
- Go to AWS Console → Bedrock → Knowledge bases
- Select EmailAIKnowledgeBase
- Choose the data source
- Select “Sync” to ingest knowledge articles
- Monitor sync status until complete
For detailed instructions, see: Sync your data with your Amazon Bedrock knowledge base.
4.3.5 Associate contact flow with email address
After successful stack deployment, manually associate the contact flow with your email address.
- Navigate to Amazon Connect Console → Channels → Email addresses
- Select the email address specified in your AMAZON_CONNECT_EMAIL_ADDRESS environment variable (from .env file)
- Set “Flow” to “ACEmailAI-EmailSuggestedResponseConfidenceScore”
- Select “Save”
4.3.6 Enable Amazon Q in Connect integration for email
This step adds generative AI-powered overviews, suggested actions, and intelligent responses using Amazon Q in Connect.
- Upload all subfolders and files from the knowledge-articles directory to your Amazon S3 bucket
- Update the contact flow:
- Navigate to Amazon Connect Console → Routing → Flows
- Open the flow named “ACEmailAI-EmailSuggestedResponseConfidenceScore”
- Locate the “Amazon Q in Connect” block within the flow
- Update the correct ARN of your Amazon Q in Connect domain with this block
- Save and publish the flow
4.4 Test scenarios and use cases
Send test emails from an address listed in customerprofiles.csv to the email address configured in your Amazon Connect instance that’s associated with the flow.
Sample 1: Low confidence – Agent review required
A customer expresses urgent dissatisfaction about a late payment fee. The system detects factors requiring human intervention and routes the email to a specialized agent queue. The agent receives the customer profile, detailed confidence score, AI-generated draft response, and relevant knowledge articles to personalize the response and determine fee waiver eligibility.
Subject:
Unfair Late Payment Fee Charged
Email message:
Hello AnyCompany Bank,
I am writing to express my dissatisfaction regarding the late payment fee charged to my account. I was charged a full late payment penalty just because my payment was delayed by ONE DAY. This is absolutely ridiculous and unacceptable.
This kind of rigid policy does not reflect well on your company's customer service values.
I look forward to your prompt response and resolution.
This pattern applies to relationship management, policy exceptions, service quality complaints, and escalated issues.
Sample 2: High confidence – Automated response
A customer emails requesting travel credit card recommendations. The system identifies comprehensive knowledge base coverage, a clear request, neutral tone, single-topic focus, and strong creditworthiness. It generates a personalized response within seconds with tailored recommendations, specific benefits, and fee information.
Subject:
Travel Credit Card Recommendations
Email message:
Hello AnyCompany Bank,
As a six-year customer, I'm seeking a travel credit card that converts daily spending into travel rewards. I'd appreciate your card recommendations that include flight and hotel rewards, plus airport lounge access.
Please share details about annual fees and current sign-up bonuses.
This pattern handles account product information, policy explanations, order status tracking, and appointment scheduling.
4.5 Data analytics with Amazon CloudWatch logs insights
Monitor AI email processing performance in CloudWatch Insights in the log group: /aws/lambda/ACEmailAI-EmailAIResponseRouting
1. Track email processing results with confidence score ≥80% and confidence score <70%:

2. Analyze AI email processing patterns and confidence distribution:

You can modify fields and filters to match your specific monitoring needs. These analytics reveal AI performance patterns, enabling targeted improvements in email processing accuracy and efficiency.
4.6 Cleanup
4.6.1 Disassociate contact flow
- Navigate to Amazon Connect Console
- Go to Channels → Email addresses
- Select your email address specified in your AMAZON_CONNECT_EMAIL_ADDRESS environment variable in the file .env
- Change the associated flow to any other one
- Select “Save”
4.6.2 Clean up resources not removable by CDK Destroy
The script cleans up:
- Lambda Log Groups
- Customer Profiles: Deletes test customer profiles created during deployment using account numbers from customerprofiles.csv
Linux/macOS:
Windows PowerShell:
4.6.3 Remove all deployed resources
About the authors
![]() |
Mo Miah is a Senior Specialist Solutions Architect at AWS based in London, specializing in Amazon Connect for the UK Public Sector. With over 20 years of experience in contact center technologies, he has held diverse roles including Enterprise Architect, Contact Centre Architect within Financial Services and Telecommunications industries. Mo is passionate about demonstrating how modern contact center technology can deliver measurable business outcomes while improving operational efficiency and customer satisfaction. Drawing on his extensive background architecting complex, enterprise-scale contact center solutions, Mo provides strategic guidance to help organizations navigate their cloud transformation journeys with confidence and clarity. Outside of work, Mo stays active and enjoys spending time with his two young daughters. |
![]() |
Ying Qian has 19+ years in the contact center technology domain, spanning roles including Solutions Architect, Technical Project Manager, ICT Lead Engineer, and Operations Engineer. She serves as Senior Specialist Solutions Architect at AWS, designing cloud-native contact center solutions for EMEA customers. She focuses on translating complex capabilities into business value, guiding customers on Amazon Connect implementations using AWS Well-Architected Framework principles across security, operational excellence, performance efficiency, reliability, and cost optimization. Outside work, she enjoys jogging, hiking the Alps with family, and swimming in Lake Constance. |

