Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Sunshine And March Vibes (2025 Wallpapers Edition)

      May 24, 2025

      The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

      May 24, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      May 24, 2025

      How To Prevent WordPress SQL Injection Attacks

      May 24, 2025

      Looking for an AI-powered website builder? Here’s your best option in 2025

      May 24, 2025

      SteamOS is officially not just for Steam Deck anymore — now ready for Lenovo Legion Go S and sort of ready for the ROG Ally

      May 23, 2025

      Microsoft’s latest AI model can accurately forecast the weather: “It doesn’t know the laws of physics, so it could make up something completely crazy”

      May 23, 2025

      OpenAI scientists wanted “a doomsday bunker” before AGI surpasses human intelligence and threatens humanity

      May 23, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      A timeline of JavaScript’s history

      May 23, 2025
      Recent

      A timeline of JavaScript’s history

      May 23, 2025

      Loading JSON Data into Snowflake From Local Directory

      May 23, 2025

      Streamline Conditional Logic with Laravel’s Fluent Conditionable Trait

      May 23, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      Open-Typer is a typing tutor application

      May 24, 2025
      Recent

      Open-Typer is a typing tutor application

      May 24, 2025

      RefreshOS is a distribution built on the robust foundation of Debian

      May 24, 2025

      Cosmicding is a client to manage your linkding bookmarks

      May 24, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»Elevate customer experience through an intelligent email automation solution using Amazon Bedrock

    Elevate customer experience through an intelligent email automation solution using Amazon Bedrock

    August 29, 2024

    Organizations spend a lot of resources, effort, and money on running their customer care operations to answer customer questions and provide solutions. Your customers may ask questions through various channels, such as email, chat, or phone, and deploying a workforce to answer those queries can be resource intensive, time-consuming, and unproductive if the answers to those questions are repetitive.

    Although your organization might have the data assets for customer queries and answers, you may still struggle to implement an automated process to reply to your customers. Challenges might include unstructured data, different languages, and a lack of expertise in artificial intelligence (AI) and machine learning (ML) technologies.

    In this post, we show you how to overcome such challenges by using Amazon Bedrock to automate email responses to customer queries. With our solution, you can identify the intent of customer emails and send an automated response if the intent matches your existing knowledge base or data sources. If the intent doesn’t have a match, the email goes to the support team for a manual response.

    Amazon Bedrock is a fully managed service that makes foundation models (FMs) from leading AI startups and Amazon available through an API, so you can choose from a wide range of FMs to find the model that is best suited for your use case. Amazon Bedrock offers a serverless experience so you can get started quickly, privately customize FMs with your own data, and integrate and deploy them into your applications using AWS tools without having to manage infrastructure.

    The following are some common customer intents when contacting customer care:

    Transaction status (for example, status of a money transfer)
    Password reset
    Promo code or discount
    Hours of operation
    Find an agent location
    Report fraud
    Unlock account
    Close account

    Agents for Amazon Bedrock can help you perform classification and entity detection on emails for these intents. For this solution, we show how to classify customer emails for the first three intents. You can also use Agents for Amazon Bedrock to detect key information from emails, so you can automate your business processes with some actions. For example, you can use Agents for Amazon Bedrock to automate the reply to a customer request with specific information related to that query.

    Moreover, Agents for Amazon Bedrock can serve as an intelligent conversational interface, facilitating seamless interactions with both internal team members and external clients, efficiently addressing inquiries and implementing desired actions. Currently, Agents for Amazon Bedrock supports Anthropic Claude models and the Amazon Titan Text G1 – Premier model on Amazon Bedrock.

    Solution overview

    To build our customer email response flow, we use the following services:

    Agents for Amazon Bedrock
    Amazon DynamoDB
    AWS Lambda
    Amazon Simple Email Service (Amazon SES)
    Amazon Simple Notification Service (Amazon SNS)
    Amazon WorkMail

    Although we illustrate this use case using WorkMail, you can use another email tool that allows integration with serverless functions or webhooks to accomplish similar email automation workflows. Agents for Amazon Bedrock enables you to build and configure autonomous agents in your application. An agent helps your end-users complete actions based on organization data and user input. Agents orchestrate interactions between FMs, data sources, software applications, and user conversations. In addition, agents automatically call APIs to take actions and invoke knowledge bases to supplement information for these actions. Developers can save weeks of development effort by integrating agents to accelerate the delivery of generative AI applications. For this use case, we use the Anthropic Claude 3 Sonnet model.

    When you create your agent, you enter details to tell the agent what it should do and how it should interact with users. The instructions replace the $instructions$ placeholder in the orchestration prompt template.

    The following is an example of instructions we used for our use cases:

    “You are a classification and entity recognition agent.

    Task 1: Classify the given text into one of the following categories: “Transfer Status”, “Password Reset”, or “Promo Code”. Return only the category without additional text.

    Task 2: If the classified category is “Transfer Status”, find the 10-digit entity “money_transfer_id” (example: “MTN1234567”) in the text. Call the “GetTransferStatus” action, passing the money_transfer_id as an argument, to retrieve the transfer status.

    Task 3: Write an email reply for the customer based on the received text, the classified category, and the transfer status (if applicable). Include the money_transfer_id in the reply if the category is “Transfer Status”.

    Task 4: Use the email signature “Best regards, Intelligent Corp” at the end of the email reply.”

    An action group defines actions that the agent can help the user perform. For example, you could define an action group called GetTransferStatus with an OpenAPI schema and Lambda function attached to it. Agents for Amazon Bedrock takes care of constructing the API based on the OpenAPI schema and fulfills actions using the Lambda function to get the status from the DynamoDB money_transfer_status table.

    The following architecture diagram highlights the end-to-end solution.

    The solution workflow includes the following steps:

    A customer initiates the process by sending an email to the dedicated customer support email address created within WorkMail.
    Upon receiving the email, WorkMail invokes a Lambda function, setting the subsequent workflow in motion.
    The Lambda function seamlessly relays the email content to Agents for Amazon Bedrock for further processing.
    The agent employs the natural language processing capabilities of Anthropic Claude 3 Sonnet to understand the email’s content classification based on the predefined agent instruction configuration. If relevant entities are detected within the email, such as a money transfer ID, the agent invokes a Lambda function to retrieve the corresponding payment status.
    If the email classification doesn’t pertain to a money transfer inquiry, the agent generates an appropriate email response (for example, password reset instructions) and calls a Lambda function to facilitate the response delivery.
    For inquiries related to money transfer status, the agent action group Lambda function queries the DynamoDB table to fetch the relevant status information based on the provided transfer ID and relays the response back to the agent.
    With the retrieved information, the agent crafts a tailored email response for the customer and invokes a Lambda function to initiate the delivery process.
    The Lambda function uses Amazon SES to send the email response, providing the email body, subject, and customer’s email address.
    Amazon SES delivers the email message to the customer’s inbox, providing seamless communication.
    In scenarios where the agent can’t discern the customer’s intent accurately, it escalates the issue by pushing the message to an SNS topic. This mechanism allows subscribed ticketing system to receive the notification and create a support ticket for further investigation and resolution.

    Prerequisites

    Refer to the README.md file in the GitHub repo to make sure you meet the prerequisites to deploy this solution.

    Deploy the solution

    The solution is comprised of three AWS Cloud Deployment Kit (AWS CDK) stacks:

    WorkmailOrgUserStack – Creates the WorkMail account with domain, user, and inbox access
    BedrockAgentCreation – Creates the Amazon Bedrock agent, agent action group, OpenAPI schema, S3 bucket, DynamoDB table, and agent group Lambda function for getting the transfer status from DynamoDB
    EmailAutomationWorkflowStack – Creates the classification Lambda function that interacts with the agent and integration Lambda function, which is integrated with WorkMail

    To deploy the solution, you also perform some manual configurations using the AWS Management Console.

    For full instructions, refer to the README.md file in the GitHub repo.

    Test the solution

    To test the solution, send an email from your personal email to the support email created as part of the AWS CDK deployment (for this post, we use support@vgs-workmail-org.awsapps.com). We use the following three intents in our sample data for custom classification training:

    MONEYTRANSFER – The customer wants to know the status of a money transfer
    PASSRESET – The customer has a login, account locked, or password request
    PROMOCODE – The customer wants to know about a discount or promo code available for a money transfer

    The following screenshot shows a sample customer email requesting the status of a money transfer.

    The following screenshot shows the email received in a WorkMail inbox.

    The following screenshot shows a response from the agent regarding the customer query.

    If the customer email isn’t classified, the content of the email is forwarded to an SNS topic. The following screenshot shows an example customer email.

    The following screenshot shows the agent response.

    Whoever is subscribed to the topic receives the email content as a message. We subscribed to this SNS topic with the email that we passed with the human_workflow_email parameter during the deployment.

    Clean up

    To avoid incurring ongoing costs, delete the resources you created as part of this solution when you’re done. For instructions, refer to the README.md file.

    Conclusion

    In this post, you learned how to configure an intelligent email automation solution using Agents for Amazon Bedrock, WorkMail, Lambda, DynamoDB, Amazon SNS, and Amazon SES. This solution can provide the following benefits:

    Improved email response time
    Improved customer satisfaction
    Cost savings regarding time and resources
    Ability to focus on key customer issue

    You can expand this solution to other areas in your business and to other industries. Also, you can use this solution to build a self-service chatbot by deploying the BedrockAgentCreation stack to answer customer or internal user queries using Agents for Amazon Bedrock.

    As next steps, check out Agents for Amazon Bedrock to start using its features. Follow Amazon Bedrock on the AWS Machine Learning Blog to keep up to date with new capabilities and use cases for Amazon Bedrock.

    About the Author

    Godwin Sahayaraj Vincent is an Enterprise Solutions Architect at AWS who is passionate about Machine Learning and providing guidance to customers to design, deploy and manage their AWS workloads and architectures. In his spare time, he loves to play cricket with his friends and tennis with his three kids.

    Ramesh Kumar Venkatraman is a Senior Solutions Architect at AWS who is passionate about Generative AI, Containers and Databases. He works with AWS customers to design, deploy and manage their AWS workloads and architectures. In his spare time, he loves to play with his two kids and follows cricket.

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleConnect the Amazon Q Business generative AI coding companion to your GitHub repositories with Amazon Q GitHub (Cloud) connector
    Next Article Build an end-to-end RAG solution using Knowledge Bases for Amazon Bedrock and the AWS CDK

    Related Posts

    Security

    Nmap 7.96 Launches with Lightning-Fast DNS and 612 Scripts

    May 25, 2025
    Common Vulnerabilities and Exposures (CVEs)

    CVE-2025-47568 – ZoomSounds Deserialization Object Injection Vulnerability

    May 25, 2025
    Leave A Reply Cancel Reply

    Continue Reading

    Strategic Finance: A Complete Guide for 2024

    Artificial Intelligence

    Microsoft on how custom AI offers your business better answers, lower costs, faster innovation

    News & Updates

    RFP Templates and Guidebook

    News & Updates

    How to Use WebCurate to Discover Helpful Developer Tools

    Development
    GetResponse

    Highlights

    Expanding Your Global Reach with Localization and Internationalization

    June 30, 2024

    As your business enters international markets, it’ll need to meet the unique needs and demands…

    Web Development for Cybersecurity: How We Build Secure & Scalable Solutions

    February 5, 2025

    Black Hat Preview: 15 Can’t-Miss Sessions, From Cloud to AI Security

    August 5, 2024

    Kodeco Podcast: Surviving Layoffs With Joey deVilla (V2, S2, E11) [FREE]

    June 13, 2024
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.