Tutorial · Customer Service Bot
Build an end-to-end customer-service Agent that looks up orders, answers FAQs, and hands off to humans
Build a production-worthy customer-service Agent from scratch in 45 minutes.
What You'll Get
A customer-service Agent that:
- Answers FAQs (from a FAQ knowledge base)
- Looks up orders (calls the order system API)
- Detects satisfaction (decides whether to hand off to a human)
- Hands off to humans (when out of scope)
Architecture
Prerequisites
- SaaS 5-minute walkthrough completed
- 5–10 FAQ documents (FAQ / return policy / shipping info)
- An order-lookup API (if not, you can mock the "Order lookup" branch)
Step 1 · Build the Knowledge Base (5 minutes)
- Workspace → Data · Knowledge base → New:
Product FAQ - Upload FAQ docs and wait for "ready"
- → Knowledge base in detail
Step 2 · Connect the Order System Tool (10 minutes)
2.1 Register a Credential
2.2 Add the Tool
Workspace → Capabilities · Tools → Add HTTP Plugin:
Test connection → pass.
Step 3 · Create the Chatflow Agent (20 minutes)
3.1 New
Workspace → Apps · Agent → New → Chatflow → name CS Pro.
3.2 Configure the Start Node
3.3 Add an Intent Classification Node
Drag the Intent classification node (in "Logic"), connect to Start:
3.4 Branch · Order Lookup
The classifier's query_order output → drag a Parameter extraction node → extract orderId (string from user message):
→ Connect to a Tool node:
→ Connect to an LLM node:
→ Connect to Direct reply → End.
3.5 Branch · FAQ
The faq output → drag a Knowledge retrieval node:
→ Connect to an LLM node:
→ Connect to Direct reply → End.
3.6 Branch · Handoff
The transfer output → drag an HTTP node (notify the CS system to create a ticket):
→ Connect to Direct reply:
→ End.
3.7 Branch · Fallback
other output → straight LLM node (no knowledge base) → friendly reply.
Step 4 · Debug (5 minutes)
Test each intent in the right-side debug panel:
| Input | Expected branch |
|---|---|
| When will my order ABC12345 arrive? | query_order |
| What's your return policy? | faq |
| Talk to a human | transfer |
| How's the weather today? | other |
Step 5 · Publish (2 minutes)
- Top right of the editor → Publish to Workbench
- Visibility: entire org / CS role only / specific department
- Channels: Workbench + Web embed (for the business team to drop into the product page)
Step 6 · Post-Launch Observability (3 minutes)
Workspace → Observability:
- Intent accuracy (hit rate of the classifier node)
- Unrecognized intents (cold start; tells you what to add)
- Per-node conversion rate (where users go most)
- Cost per conversation (Tokens × model unit price)
Going Further
| I want to… | Add |
|---|---|
| Auto-learn high-frequency questions and accumulate FAQs | A scheduled Workflow that clusters unrecognized intents from chat logs |
| Multi-language support | In the LLM node prompt, add Reply in {{lang}} |
| Multi-channel (DingTalk/WeChat) | Deploy · Channels |
| A/B test prompts | Add a [Conditional node] to route to different LLM nodes |
Next Steps
- Different scenario → Marketing automation
- Post-launch tuning → Observability