SEA WhatsApp Business Bot
Smart auto-responder for Southeast Asian SMEs on WhatsApp.
How to Use This Skill
Step 1: Charge billing
POST to the skill endpoint to authorize payment:
CODEBLOCK0
If successful, you'll receive {"success": true, "data": {"charged": true}}.
If payment fails, you'll receive a payment_url to share with the user.
Step 2: Detect customer language
Use these heuristics to detect the incoming message language:
- - Chinese (zh): More than 30% of characters are CJK (Unicode range \u4e00-\u9fff)
- Bahasa Malaysia (ms): Contains words like: saya, nak, boleh, berapa, bila, mana, encik, puan, terima kasih
- English (en): Default if none of the above match
Step 3: Classify intent
Classify the customer's message into one of these intents:
- - greeting: Hello, hi, selamat, etc.
- appointment: Wants to book/reschedule/cancel an appointment
- faq: Asking a question that matches business FAQ
- order_status: Checking on an order or delivery
- escalate: Angry, frustrated, or requesting to speak to a human
- general: Everything else
Step 4: Generate response
Using the business configuration provided, generate an appropriate response:
Business config structure:
CODEBLOCK1
Response guidelines:
- - Always respond in the customer's detected language
- Be friendly, professional, and concise
- For FAQ matches, use the provided answers but adapt to the conversation
- For appointments, confirm details and suggest next steps
- For escalation, acknowledge the frustration and offer to connect to a human
- For greetings, respond warmly and offer help
- Keep responses under 160 characters when possible (WhatsApp best practice)
Conversation history: If provided, use previous messages for context continuity.
Step 5: Determine action
Based on the intent, suggest an action:
- -
book_appointment — when the customer wants to schedule something - INLINECODE3 — when asking about order/delivery status
- INLINECODE4 — when escalation is needed or the bot can't help
- INLINECODE5 — no action needed (greeting, FAQ answered, general chat)
Output Format
Return the response as JSON:
CODEBLOCK2
Pricing
$0.03 USDT per call via SkillPay.me
SEA WhatsApp Business Bot
面向东南亚中小企业的WhatsApp智能自动回复机器人。
如何使用此技能
第一步:计费充值
向技能端点发送POST请求以授权支付:
POST https://sea-whatsapp-business-bot.swmengappdev.workers.dev/respond
Content-Type: application/json
{user_id: <用户ID>}
如果成功,您将收到 {success: true, data: {charged: true}}。
如果支付失败,您将收到一个 payment_url,可分享给用户。
第二步:检测客户语言
使用以下启发式规则检测传入消息的语言:
- - 中文(zh): 超过30%的字符为中日韩统一表意文字(Unicode范围\u4e00-\u9fff)
- 马来语(ms): 包含以下词语:saya, nak, boleh, berapa, bila, mana, encik, puan, terima kasih
- 英语(en): 如果以上均不匹配,则默认为英语
第三步:意图分类
将客户消息分类为以下意图之一:
- - greeting(问候): 你好、嗨、selamat等
- appointment(预约): 希望预约/重新安排/取消预约
- faq(常见问题): 询问与商家常见问题匹配的问题
- order_status(订单状态): 查询订单或配送状态
- escalate(升级处理): 愤怒、沮丧或要求转接人工客服
- general(一般): 其他所有情况
第四步:生成回复
根据提供的商家配置,生成合适的回复:
商家配置结构:
json
{
name: 商家名称,
hours: 周一至周六上午9点至下午6点,
services: [服务1, 服务2],
faq: [
{question: 常见问题?, answer: 标准答案}
],
languages: [en, ms],
timezone: Asia/Kuala_Lumpur
}
回复指南:
- - 始终使用检测到的客户语言进行回复
- 保持友好、专业且简洁
- 对于匹配的常见问题,使用提供的答案但需适应对话语境
- 对于预约,确认详细信息并建议后续步骤
- 对于升级处理,承认客户的不满并提供转接人工客服
- 对于问候,热情回应并提供帮助
- 尽可能将回复控制在160字符以内(WhatsApp最佳实践)
对话历史: 如果提供,使用之前的消息保持上下文连贯性。
第五步:确定操作
根据意图,建议一个操作:
- - bookappointment(预约)— 当客户希望安排某事时
- checkorder(查询订单)— 当询问订单/配送状态时
- transfertohuman(转接人工)— 需要升级处理或机器人无法提供帮助时
- null(无操作)— 无需操作(问候、已回答的常见问题、一般聊天)
输出格式
以JSON格式返回回复:
json
{
reply: 您好!欢迎光临。今天有什么可以帮您的吗?,
intent: greeting,
action: null,
language: en
}
定价
每次调用0.03 USDT,通过SkillPay.me支付