ecommerce-support
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese电商客服助手
E-commerce Customer Service Assistant
AI 驱动的电商客服机器人,自动识别客户意图,处理订单查询、商品推荐、投诉工单等场景。
AI-powered e-commerce customer service bot that automatically identifies customer intent and handles scenarios such as order query, product recommendation, and complaint tickets.
触发条件
Trigger Conditions
当用户说以下内容时启动此技能:
- "客服回复"
- "处理客户问题"
- "订单查询"
- "ecommerce support"
- "帮我回复客户"
- "生成客服话术"
This skill is activated when the user says the following content:
- "Customer service reply"
- "Handle customer issues"
- "Order query"
- "ecommerce support"
- "Help me reply to customers"
- "Generate customer service scripts"
依赖的 MCP 服务
Dependent MCP Services
| MCP | 用途 | 必需 |
|---|---|---|
| playwright | 自动登录电商后台查询订单 | 可选 |
| supabase | 存储订单/工单数据 | 可选 |
| memory | 保持对话上下文 | 可选 |
| MCP | Purpose | Required |
|---|---|---|
| playwright | Automatically log in to e-commerce backend to query orders | Optional |
| supabase | Store order/ticket data | Optional |
| memory | Maintain conversation context | Optional |
工作流程
Workflow
┌─────────────────────┐
│ 客户消息输入 │
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ AI 意图识别 │
│ 分析客户需求 │
└──────────┬──────────┘
│
┌─────┼─────┬──────────┐
│ │ │ │
▼ ▼ ▼ ▼
┌───────┐┌───────┐┌───────┐┌───────┐
│订单 ││商品 ││投诉 ││常见 │
│查询 ││推荐 ││工单 ││问答 │
└───┬───┘└───┬───┘└───┬───┘└───┬───┘
│ │ │ │
▼ ▼ ▼ ▼
┌───────┐┌───────┐┌───────┐┌───────┐
│Playwright│ AI ││创建 ││知识库 │
│查后台 ││分析 ││工单 ││匹配 │
└───┬───┘└───┬───┘└───┬───┘└───┬───┘
│ │ │ │
└────────┴────────┴────────┘
│
▼
┌─────────────────┐
│ 生成客服回复 │
│ 保存对话记录 │
└─────────────────┘┌─────────────────────┐
│ Customer Message Input │
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ AI Intent Recognition │
│ Analyze Customer Needs │
└──────────┬──────────┘
│
┌─────┼─────┬──────────┐
│ │ │ │
▼ ▼ ▼ ▼
┌───────┐┌───────┐┌───────┐┌───────┐
│Order ││Product││Complaint││FAQ │
│Query ││Recommendation││Ticket││ │
└───┬───┘└───┬───┘└───┬───┘└───┬───┘
│ │ │ │
▼ ▼ ▼ ▼
┌───────┐┌───────┐┌───────┐┌───────┐
│Playwright│ AI ││Create││Knowledge│
│Query Backend│Analysis││Ticket││Base Matching│
└───┬───┘└───┬───┘└───┬───┘└───┬───┘
│ │ │ │
└────────┴────────┴────────┘
│
▼
┌─────────────────┐
│ Generate Customer Service Reply │
│ Save Conversation History │
└─────────────────┘执行步骤
Execution Steps
步骤 1:接收客户消息
Step 1: Receive Customer Message
输入格式:
用户: 帮我回复这个客户:
"你好,我的订单123456怎么还没发货?已经3天了!"或批量处理:
用户: 处理这些客服消息 [消息列表/文件]Input Format:
User: Help me reply to this customer:
"Hello, why hasn't my order 123456 been shipped yet? It's been 3 days!"Or batch processing:
User: Process these customer service messages [message list/file]步骤 2:AI 意图识别
Step 2: AI Intent Recognition
意图分类:
| 意图 | 关键词 | 处理方式 |
|---|---|---|
| 订单查询 | 订单、发货、物流、到哪了 | 查询订单状态 |
| 退款退货 | 退款、退货、换货、不想要了 | 创建退货工单 |
| 商品咨询 | 有货吗、尺码、颜色、推荐 | 商品推荐 |
| 投诉建议 | 投诉、差评、不满意、垃圾 | 创建投诉工单 |
| 优惠活动 | 优惠券、满减、活动、便宜 | 活动信息 |
| 售后问题 | 坏了、质量问题、维修 | 创建售后工单 |
| 闲聊其他 | 你好、谢谢、在吗 | 常规回复 |
意图识别提示词:
分析以下客户消息的意图:
【客户消息】
{message}
【输出格式】
{
"intent": "order_query|refund|product_inquiry|complaint|promotion|after_sale|chat",
"confidence": 0.95,
"entities": {
"order_id": "123456",
"product_name": "",
"emotion": "negative|neutral|positive"
},
"urgency": "high|medium|low"
}Intent Classification:
| Intent | Keywords | Handling Method |
|---|---|---|
| Order query | Order, shipping, logistics, where is it | Query order status |
| Refund and return | Refund, return, exchange, don't want it | Create return ticket |
| Product inquiry | In stock, size, color, recommendation | Product recommendation |
| Complaint and suggestion | Complaint, bad review, unsatisfied, garbage | Create complaint ticket |
| Promotion activity | Coupon, full reduction, activity, cheap | Provide activity information |
| After-sales issue | Broken, quality problem, repair | Create after-sales ticket |
| Casual chat | Hello, thank you, are you there | Regular reply |
Intent Recognition Prompt:
Analyze the intent of the following customer message:
【Customer Message】
{message}
【Output Format】
{
"intent": "order_query|refund|product_inquiry|complaint|promotion|after_sale|chat",
"confidence": 0.95,
"entities": {
"order_id": "123456",
"product_name": "",
"emotion": "negative|neutral|positive"
},
"urgency": "high|medium|low"
}步骤 3:订单查询处理
Step 3: Order Query Processing
方式 A:使用 Playwright MCP 查询真实订单
Method A: Use Playwright MCP to query real orders
适用场景:需要查询电商后台真实订单状态
javascript
// Playwright MCP 操作步骤
1. 打开电商后台
browser_navigate({ url: "https://seller.taobao.com" })
// 或其他电商平台后台
2. 检查登录状态
- 如未登录,提示用户先登录
- 保存登录状态供后续使用
3. 进入订单管理
browser_click({ element: "订单管理" })
4. 搜索订单号
browser_type({
element: "订单搜索框",
text: "{order_id}"
})
browser_click({ element: "搜索" })
5. 获取订单状态
browser_snapshot() // 截图获取订单信息
6. 解析订单状态
- 订单状态(待发货/已发货/已签收)
- 物流信息
- 预计到达时间支持的电商平台:
- 淘宝/天猫卖家中心
- 京东商家后台
- 拼多多商家版
- Shopify Admin
- 有赞商家后台
Applicable Scenario: Need to query real order status from e-commerce backend
javascript
// Playwright MCP operation steps
1. Open e-commerce backend
browser_navigate({ url: "https://seller.taobao.com" })
// Or other e-commerce platform backends
2. Check login status
- If not logged in, prompt the user to log in first
- Save login status for subsequent use
3. Enter order management
browser_click({ element: "Order Management" })
4. Search for order number
browser_type({
element: "Order search box",
text: "{order_id}"
})
browser_click({ element: "Search" })
5. Get order status
browser_snapshot() // Screenshot to get order information
6. Parse order status
- Order status (pending shipping/shipped/delivered)
- Logistics information
- Estimated arrival timeSupported E-commerce Platforms:
- Taobao/Tmall Seller Center
- JD Merchant Backend
- Pinduoduo Merchant Edition
- Shopify Admin
- Youzan Merchant Backend
方式 B:模拟订单数据
Method B: Simulate order data
适用场景:演示或无后台访问权限
json
{
"order_id": "123456",
"status": "shipped",
"status_text": "已发货,运输中",
"logistics": {
"company": "顺丰速运",
"tracking_no": "SF1234567890",
"last_update": "2025-12-28 15:30",
"location": "深圳转运中心"
},
"estimated_delivery": "2025-12-30"
}Applicable Scenario: Demo or no backend access permission
json
{
"order_id": "123456",
"status": "shipped",
"status_text": "Shipped, in transit",
"logistics": {
"company": "SF Express",
"tracking_no": "SF1234567890",
"last_update": "2025-12-28 15:30",
"location": "Shenzhen Transit Center"
},
"estimated_delivery": "2025-12-30"
}步骤 4:商品推荐处理
Step 4: Product Recommendation Processing
推荐逻辑:
1. 解析客户需求(品类、价格区间、偏好)
2. 匹配商品库/搜索商品
3. 生成推荐话术
【推荐话术模板】
亲,根据您的需求,为您推荐以下商品:
1️⃣ **{商品名1}** - ¥{价格}
{商品亮点}
2️⃣ **{商品名2}** - ¥{价格}
{商品亮点}
您看哪款更合适呢?有任何问题随时问我~Recommendation Logic:
1. Parse customer needs (category, price range, preference)
2. Match product library/search for products
3. Generate recommendation script
【Recommendation Script Template】
Dear customer, according to your needs, we recommend the following products for you:
1️⃣ **{Product Name 1}** - ¥{Price}
{Product Highlights}
2️⃣ **{Product Name 2}** - ¥{Price}
{Product Highlights}
Which one do you think is more suitable? Feel free to ask me any questions~使用 Playwright 获取商品信息
Use Playwright to get product information
javascript
// 从电商平台获取商品详情
1. 打开商品页面
browser_navigate({ url: "{product_url}" })
2. 获取商品信息
browser_snapshot()
3. 解析信息
- 商品名称
- 价格
- 库存状态
- 规格参数javascript
// Get product details from e-commerce platform
1. Open product page
browser_navigate({ url: "{product_url}" })
2. Get product information
browser_snapshot()
3. Parse information
- Product name
- Price
- Stock status
- Specification parameters步骤 5:工单处理
Step 5: Ticket Processing
创建工单:
json
{
"ticket_id": "TK20251229001",
"type": "complaint",
"customer_id": "C12345",
"order_id": "123456",
"description": "客户投诉物流慢",
"priority": "high",
"status": "open",
"created_at": "2025-12-29T10:30:00Z"
}工单处理流程:
- 创建工单记录
- 生成安抚回复
- 通知相关人员(可用邮件MCP)
- 跟踪处理进度
Create Ticket:
json
{
"ticket_id": "TK20251229001",
"type": "complaint",
"customer_id": "C12345",
"order_id": "123456",
"description": "Customer complains about slow logistics",
"priority": "high",
"status": "open",
"created_at": "2025-12-29T10:30:00Z"
}Ticket Processing Flow:
- Create ticket record
- Generate comfort reply
- Notify relevant personnel (available via email MCP)
- Track processing progress
步骤 6:生成客服回复
Step 6: Generate Customer Service Reply
回复生成提示词:
你是一位专业的电商客服,请根据以下信息生成回复:
【客户消息】
{customer_message}
【意图分析】
意图: {intent}
情绪: {emotion}
紧急度: {urgency}
【查询结果】
{query_result}
【回复要求】
1. 称呼亲切(亲/您好)
2. 先共情,再解决
3. 信息准确完整
4. 语气温和专业
5. 如有问题主动道歉
6. 结尾询问是否还有其他需要
【输出格式】
直接输出回复内容,可适当使用emojiReply Generation Prompt:
You are a professional e-commerce customer service representative, please generate a reply based on the following information:
【Customer Message】
{customer_message}
【Intent Analysis】
Intent: {intent}
Emotion: {emotion}
Urgency: {urgency}
【Query Result】
{query_result}
【Reply Requirements】
1. Friendly address (Dear/Hello)
2. Empathize first, then solve the problem
3. Accurate and complete information
4. Gentle and professional tone
5. Apologize actively if there is a problem
6. Ask if there are other needs at the end
【Output Format】
Output the reply content directly, you can use emojis appropriately步骤 7:保存对话记录
Step 7: Save Conversation History
json
{
"conversation_id": "conv_20251229_001",
"customer_id": "C12345",
"messages": [
{
"role": "customer",
"content": "我的订单怎么还没发货?",
"timestamp": "2025-12-29T10:30:00Z"
},
{
"role": "assistant",
"content": "亲,非常抱歉让您久等了...",
"timestamp": "2025-12-29T10:30:05Z",
"intent": "order_query"
}
]
}json
{
"conversation_id": "conv_20251229_001",
"customer_id": "C12345",
"messages": [
{
"role": "customer",
"content": "Why hasn't my order been shipped yet?",
"timestamp": "2025-12-29T10:30:00Z"
},
{
"role": "assistant",
"content": "Dear customer, I'm very sorry to keep you waiting...",
"timestamp": "2025-12-29T10:30:05Z",
"intent": "order_query"
}
]
}客服话术模板库
Customer Service Script Template Library
订单查询回复
Order Query Reply
已发货:
亲,您的订单已经发货啦!🚚
物流信息:
📦 快递公司:{company}
📝 运单号:{tracking_no}
📍 当前位置:{location}
⏰ 预计送达:{estimated_delivery}
您可以点击订单详情查看实时物流~
还有其他问题吗?未发货:
亲,非常抱歉让您久等了!🙏
您的订单目前正在加紧处理中,预计{ship_date}前发出。
给您带来不便深感抱歉,我们会尽快为您安排~
如果着急,我可以帮您催一下仓库哦!Shipped:
Dear customer, your order has been shipped! 🚚
Logistics information:
📦 Courier company: {company}
📝 Tracking number: {tracking_no}
📍 Current location: {location}
⏰ Estimated delivery: {estimated_delivery}
You can click the order details to view real-time logistics~
Do you have any other questions?Not Shipped:
Dear customer, I'm very sorry to keep you waiting! 🙏
Your order is currently being processed urgently and is expected to be shipped before {ship_date}.
We are deeply sorry for the inconvenience caused to you, and we will arrange it for you as soon as possible~
If you are in a hurry, I can help you urge the warehouse!退款处理回复
Refund Processing Reply
亲,收到您的退款申请了~
我这边已经帮您提交处理:
📋 退款单号:{refund_id}
💰 退款金额:¥{amount}
⏰ 预计到账:1-3个工作日
退款会原路返回,届时请留意账户变动。
如有问题随时联系我哦!Dear customer, we have received your refund application~
I have submitted it for processing here:
📋 Refund number: {refund_id}
💰 Refund amount: ¥{amount}
⏰ Expected arrival: 1-3 working days
The refund will be returned to the original account, please pay attention to the account changes then.
Feel free to contact me if you have any questions!投诉安抚回复
Complaint Comfort Reply
亲,真的非常抱歉给您带来了不好的体验!🙏
我完全理解您的心情,这确实是我们的问题。
我已经将您的情况反馈给主管,会尽快给您一个满意的解决方案。
为了表示歉意,这边给您申请了一张{coupon}优惠券,
希望能弥补一点点这次的不愉快。
请问您方便留一下联系电话吗?我们主管会亲自给您回电处理。Dear customer, I'm really sorry for the bad experience we brought you! 🙏
I fully understand your mood, this is indeed our problem.
I have already reported your situation to the supervisor, and we will give you a satisfactory solution as soon as possible.
To express our apology, we have applied for a {coupon} coupon for you,
Hope it can make up for a little bit of this unpleasant experience.
Would you mind leaving your contact number? Our supervisor will call you back personally to handle it.商品咨询回复
Product Inquiry Reply
亲,这款商品的详细信息如下:
📦 {product_name}
💰 价格:¥{price}
📏 规格:{specs}
🎁 赠品:{gifts}
📦 库存:{stock_status}
{product_highlights}
现在下单还有{promotion}活动哦~
需要我帮您看下尺码吗?Dear customer, the detailed information of this product is as follows:
📦 {product_name}
💰 Price: ¥{price}
📏 Specification: {specs}
🎁 Gift: {gifts}
📦 Stock: {stock_status}
{product_highlights}
There is also a {promotion} event when you place an order now~
Do you need me to check the size for you?使用示例
Usage Examples
示例 1:单条消息回复
Example 1: Single Message Reply
用户: 帮我回复:"订单123456到哪了"
Claude:
1. 识别意图:订单查询
2. [可选] 使用Playwright查询后台订单状态
3. 生成回复:
"亲,您的订单123456已经发货啦!
快递:顺丰 SF1234567890
当前位置:深圳转运中心
预计明天送达~还有其他问题吗?"User: Help me reply: "Where is order 123456?"
Claude:
1. Identify intent: Order query
2. [Optional] Use Playwright to query backend order status
3. Generate reply:
"Dear customer, your order 123456 has been shipped!
Courier: SF Express SF1234567890
Current location: Shenzhen Transit Center
Expected to arrive tomorrow~ Do you have any other questions?"示例 2:批量处理
Example 2: Batch Processing
用户: 批量回复这10条客户消息
Claude:
1. 逐条分析意图
2. 批量查询相关信息
3. 生成10条回复
4. 输出结果供复制使用User: Batch reply to these 10 customer messages
Claude:
1. Analyze intent one by one
2. Batch query relevant information
3. Generate 10 replies
4. Output results for copy and use示例 3:接入电商后台
Example 3: Connect to E-commerce Backend
用户: 连接淘宝后台,查询订单123456的真实状态
Claude:
1. 使用Playwright打开淘宝卖家中心
2. 检查登录状态(如需登录则提示)
3. 搜索订单号
4. 截图获取订单状态
5. 解析并生成回复User: Connect to Taobao backend, query the real status of order 123456
Claude:
1. Use Playwright to open Taobao Seller Center
2. Check login status (prompt if login is required)
3. Search for order number
4. Screenshot to get order status
5. Parse and generate reply电商平台后台配置
E-commerce Platform Backend Configuration
淘宝/天猫
Taobao/Tmall
yaml
platform: taobao
login_url: https://login.taobao.com
seller_url: https://myseller.taobao.com
order_path: /home.htm#/order-manage
search_selector: "#keyword"yaml
platform: taobao
login_url: https://login.taobao.com
seller_url: https://myseller.taobao.com
order_path: /home.htm#/order-manage
search_selector: "#keyword"京东商家
JD Merchant
yaml
platform: jd
login_url: https://passport.jd.com
seller_url: https://shop.jd.com
order_path: /order/list
search_selector: ".search-input"yaml
platform: jd
login_url: https://passport.jd.com
seller_url: https://shop.jd.com
order_path: /order/list
search_selector: ".search-input"Shopify
Shopify
yaml
platform: shopify
login_url: https://{store}.myshopify.com/admin
order_path: /admin/orders
search_selector: "#search-query"yaml
platform: shopify
login_url: https://{store}.myshopify.com/admin
order_path: /admin/orders
search_selector: "#search-query"数据存储
Data Storage
- 对话记录:
~/.claude/cache/ecommerce-support/conversations/ - 工单记录:
~/.claude/cache/ecommerce-support/tickets/ - 回复模板:
~/.claude/cache/ecommerce-support/templates/
- Conversation records:
~/.claude/cache/ecommerce-support/conversations/ - Ticket records:
~/.claude/cache/ecommerce-support/tickets/ - Reply templates:
~/.claude/cache/ecommerce-support/templates/
依赖工具
Dependent Tools
- Claude AI: 意图识别 + 回复生成
- playwright MCP: 查询电商后台订单 (可选)
- memory MCP: 保持对话上下文 (可选)
- Write: 保存对话记录
- Claude AI: Intent recognition + reply generation
- playwright MCP: Query e-commerce backend orders (optional)
- memory MCP: Maintain conversation context (optional)
- Write: Save conversation history
最佳实践
Best Practices
提升回复质量
Improve Reply Quality
- 先共情再解决问题
- 信息要准确完整
- 避免机械化回复
- 适当使用emoji增加亲和力
- Empathize first before solving the problem
- Information should be accurate and complete
- Avoid mechanical replies
- Use emojis appropriately to increase affinity
处理负面情绪
Handle Negative Emotions
- 第一时间道歉
- 给出明确解决方案
- 适当补偿(优惠券等)
- 升级通道(主管回电)
- Apologize as soon as possible
- Provide clear solutions
- Appropriate compensation (coupons, etc.)
- Upgrade channel (supervisor call back)
效率提升
Improve Efficiency
- 建立常见问题知识库
- 预设回复模板
- 批量处理相似问题
- 自动分类优先级
- Establish a FAQ knowledge base
- Preset reply templates
- Batch process similar problems
- Automatically classify priorities
原始来源
Original Source
改编自 n8n 模板:
- 模板ID: 7256
- 原名: AI-Powered E-commerce Customer Support Chatbot with GPT-4 & Supabase
- 链接: https://n8n.io/workflows/7256
Adapted from n8n template:
- Template ID: 7256
- Original name: AI-Powered E-commerce Customer Support Chatbot with GPT-4 & Supabase
- Link: https://n8n.io/workflows/7256