| name | order-tracker |
| description | 订单管理系统,状态跟踪 + 客户通知 |
| metadata | {"openclaw":{"emoji":"📦","requires":{"anyBins":["node"]}}} |
Order Tracker Skill
Description
本地订单跟踪系统,提供手动订单状态管理、客户邮件通知和命令行看板功能。适用于 Your Company 外贸订单生命周期管理(从生产到交付),无需对接工厂 ERP 或物流 API。
When to Use
- 查询某个订单的当前状态
- 更新订单状态(生产中 → 待发货 → 已发货 → 已完成)
- 向客户发送订单状态变更邮件通知
- 查看所有在途订单的看板汇总
- 检测逾期或紧急(≤7 天)订单
Prerequisites
- Node.js v16+
- 已配置
imap-smtp-email skill 的 SMTP .env 文件(用于发送通知邮件)
- 依赖安装:
npm install(在 skill 目录下执行)
Skills Directory
/path/to/your/.openclaw/workspace/skills/order-tracker/
How to Invoke
All scripts are run from the scripts/ subdirectory.
1. View Order Dashboard
cd /path/to/your/.openclaw/workspace/skills/order-tracker/scripts
node order-dashboard.js
node order-dashboard.js --status in_production
node order-dashboard.js --status shipped
node order-dashboard.js --order-id ORD-20260324-001
node order-dashboard.js --format json
2. Update Order Status
cd /path/to/your/.openclaw/workspace/skills/order-tracker/scripts
node update-order-status.js --order-id ORD-20260324-001 --status ready_to_ship --dry-run
node update-order-status.js \
--order-id ORD-20260324-001 \
--status shipped \
--notes "DHL Express, 单号: 1234567890, ETA: 4月25日"
node update-order-status.js \
--order-id ORD-20260324-001 \
--status in_production \
--notes "工厂已排期" \
--trigger-notification
3. Send Customer Notification Email
cd /path/to/your/.openclaw/workspace/skills/order-tracker/scripts
node send-order-notification.js --order-id ORD-20260324-001 --dry-run
node send-order-notification.js --order-id ORD-20260324-001
node send-order-notification.js --order-id ORD-20260324-001 --status shipped
Order Status Model
6 状态机:
pending_production → in_production → ready_to_ship → shipped → completed
↘ cancelled(任意阶段可取消)
| 状态 | 中文 | 说明 |
|---|
pending_production | 待生产 | 订单确认,等待生产 |
in_production | 生产中 | 工厂生产中 |
ready_to_ship | 待发货 | 生产完成,等待发货 |
shipped | 已发货 | 货物已发出 |
completed | 已完成 | 客户确认收货 |
cancelled | 已取消 | 订单取消 |
Email Templates
通知脚本支持 5 种双语(EN/ZH)邮件模板:
in_production — 生产进度通知
ready_to_ship — 准备发货通知
shipped — 发货确认(含物流单号)
completed — 订单完成确认
cancelled — 取消通知
Typical Workflow Example
BASE=/path/to/your/.openclaw/workspace/skills/order-tracker/scripts
ORDER=ORD-20260324-001
node $BASE/update-order-status.js --order-id $ORDER --status in_production --notes "工厂已排期"
node $BASE/send-order-notification.js --order-id $ORDER
node $BASE/update-order-status.js --order-id $ORDER --status shipped --notes "DHL 单号: 1234567890"
node $BASE/send-order-notification.js --order-id $ORDER
node $BASE/order-dashboard.js
Data Files
| 文件 | 路径 | 说明 |
|---|
| 订单数据 | data/orders.json | 所有订单(手动维护) |
| 订单 Schema | config/order-schema.json | JSON Schema 验证定义 |
| 状态变更日志 | logs/status-changes.log | 每次状态更新记录 |
| 通知日志 | logs/notifications.log | 邮件发送记录 |
Constraints
- 不对接工厂 ERP/MES 系统
- 不抓取物流 API
- 状态手动更新
- 数据存储本地 JSON 文件
Source
- Task: task-005(Phase 3)
- Implemented by: IRON (bailian/qwen3.5-plus)
- Reviewed by: WILSON (aiberm/claude-sonnet-4-6)
- Completed: 2026-03-24