AWS Logo
Menu

Crafting Barista-Style Responses for Online Coffee Shoppers

On this article I will show you how I solved my coffee shop problem using Amazon Q Apps and some extra tips on how to also automate API Calls.

José Yapur
Amazon Employee
Published Nov 25, 2024
Last Modified Nov 26, 2024
A couple of years ago, I embarked on a journey to create an online coffee shop called Kayari, dedicated to offering exceptional coffee beans sourced directly from specialty producers in Villa Rica, a lush rainforest region in Peru. My passion for coffee often takes me on breathtaking journeys, starting from Lima’s seashore and ascending over 5,000 meters into the Andes mountains. Along the way, I soak in the majestic views of lakes, glaciers, and towering peaks before descending into the rainforest, where the landscape bursts into vibrant green, rivers swell, and waterfalls cascade along the highways. These journeys, which I undertake during my spare time away from my role as a Developer Advocate at AWS, highlight the connection between our coffee and the beautiful environment it comes from, taking nine hours of scenic driving that feels like a meditative escape.
Kayari started as a shared dream with two of my closest companions—my dearest friend and my wife. As coffee enthusiasts working in different industries, we often found ourselves fielding questions from other coffee lovers curious about our favorite brews. Despite creating a comprehensive website and online store, many customers preferred a personal touch, often reaching out to us directly for advice and guidance. What began as a side project quickly grew beyond our expectations, leading to an overwhelming influx of inquiries. Eventually, we hired staff to handle the demand, but maintaining the same level of personalized service became a challenge. Training our team to match our deep knowledge of coffee proved difficult, and the quality of assistance began to decline. It was at this critical juncture that Amazon Q Apps came to the rescue, helping us streamline operations while preserving the personalized experience our customers loved.

Amazon Q Apps

Amazon Q Apps is a feature within Amazon Q Business that enables users to create lightweight, purpose-built applications powered by generative AI. These apps are designed to streamline tasks and enhance productivity by leveraging an organization's internal data. Users can build these applications using natural language, either by transforming conversations with Amazon Q Business into reusable apps or by describing their needs in their own words.
Once created, these apps can be securely published to the organization's app library, making them accessible to other team members. Amazon Q Apps inherit user permissions, access controls, and enterprise guardrails from Amazon Q Business, ensuring secure sharing and adherence to data governance policies. This capability allows people to quickly convert their ideas into generative AI-powered applications, facilitating task automation and boosting both individual and team productivity.

How I solved my company challenge with Amazon Q Apps?

First, I needed:
  • An AWS Account, you can get one for free here
  • All my coffee products detailed, fortunately I had everything consolidated at the company website https://kayari.pe
With everything in place I need to navigate to the AWS Console and select Amazon Q Business, if you want a shortcut you can also click here and follow the steps:
  • Go to Applications and then click in “Create Application”, I named my Application “KayariCoffeeSupport”. And select IAM Identity Center as identity provider for this application. This way is easier to manage employee identity through the app without giving them access to any AWS resources.
  • Once created, navigate in the left menu to “Enhancements” and click to “Data Sources” where I can add my company website without building my own web crawler and without maintaining different data sources at the same time. This was a time and effort saver!
  • Now that the data is active and synced, I will click into “Amazon Q Apps”, this is where the magic starts and I can start building applications with no more than a chat. Just click in “View library in web experience”
  • This will open a web chat where we will be prompt to authenticate. You have to use the credentials that you created in the AWS IAM Identity Center. If you don’t know where to start you can follow this link to learn more.
  • Make sure you select Company Knowledge when you prompt, to use the data from your own repos. I will start by asking the cheapest coffee that we sell and if it’s good for some specific coffee brewing methods, those are some of the most frequent questions that we get.
  • I can also ask to create a sales pitch for copy-paste directly into the customer conversation.
  • And now, we can convert this chat experience into a unique Web Application available for all sellers that need instant support to close their sales. It’s not rocket science, I just need to click into “Create Amazon Q App” from the upper right corner and it will automatically create the application for me.
  • As you can see, it inferred from the conversation that the inputs are the coffee brand and the brewing method, based on that it will suggest a product with all the details, share the brewing method recommended and instructions and create a product pitch that I can just copy-paste to the customer.
  • You can also add new “variables” as Cards in the web interface, to fine tune the application and add extra context, but in my case it was good enough. We decided to follow this approach instead of using a 100% automated chatbot because we appreciate the human interaction that we get with our customers, and we always ensure that we are getting the best answer and support as possible.

An extra-useful function to automate order creation

Do you know that you can create a “Custom Plugin” to call your own API’s? I used this feature to create orders directly from the chat. My developer side, would never let me finish this story without doing some code 😆 I got some inspiration for this part by my dear friend Ricardo Ceci and his article about Amazon Bedrock and Shopify.
I will create a Lambda function that abstracts the order fulfillment with just entering the following fields:
  • Customer Name, Email, Address and Phone
  • Product Name and Quantity
  • Payment method
Also using Amazon Q Developer I created the OpenAPI 3.0 definition for my lambda function
To make this work I just need to go to Enhancements and then click into “Plugins” where I will select “Custom Plugin”

Then we will copy the OpenAPI definition that we created before selecting the option “Define with in-line OpenAPI schema editor”

We can now test it through the Amazon Q Business chat. I will select the plugin “CreateOrder” and ask for an order creation with all the data needed.

It will convert my request into a Form with all the information that I filled out and the pending data and I just need to click on “Submit”

And now my order was submitted successfully

Again, I can transform this chat into an Amazon Q App and publish it.

I hope my own experience helps you to streamline your experience and unlock the power of Amazon Q Apps in your own business problems. To get started you just need you AWS Account and your imagination to make super fast applications with the power of Generative AI.
 

Any opinions in this post are those of the individual author and may not reflect the opinions of AWS.

2 Comments