Chapter 1: Goal and preparation
In this use case you’ll build a customer service system for an online shop. Each enquiry first goes through an agent that classifies it into one of three levels, and then a specialised agent handles it:
| Level | Which enquiries it handles | How it resolves them |
|---|---|---|
| Level 1 | General questions: shipping, returns, opening hours… | It looks for the answer in a document with the shop’s policies. |
| Level 2 | The status of an order or product details | It queries the shop’s API. |
| Level 3 | Returns, or cases where the customer asks to speak to a person | It alerts the support team on Telegram and tells the customer. |
This is an advanced case: it’s best to do the email and calendar assistant first, which explains how an agent uses tools.
What you need
- A document with the shop’s policies saved in Google Drive, for example a PDF.
- The address of your shop’s orders API and, if it requires one, its key.
- A Telegram bot and the support team’s chat it will send alerts to.
Prepare the credentials
In Credentials, create these three. If it’s your first time, see Credentials.
| Service | Example name | What to fill in |
|---|---|---|
| Google Gemini | Shop Gemini | Your Gemini key in Google Api Key. The models and the document search will use it. |
| Google Drive | Shop Drive | Leave NappAI in Select Project, choose Read Only access and click Sign in with Google. |
| Telegram bot API | Support bot | Your bot’s token in Telegram bot token. BotFather gives it to you when you create the bot. |
The shop’s API doesn’t need a credential: if it asks for a key, you’ll type it into the component that calls it, in chapter 3.
In the next chapter you’ll create the knowledge base with the policies document.