← 返回
未分类

Order Tracker

Track and manage sales orders with status updates, notifications, and dashboard reporting. Supports order creation, status transitions (pending/confirmed/shi...
跟踪和管理销售订单,支持状态更新、通知和仪表盘报表。提供订单创建、状态转换(待处理/已确认/...)等功能。
cjboy007
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 531
下载
💾 0
安装
1
版本
#latest

概述

Order Tracker Skill

Description

本地订单跟踪系统,提供手动订单状态管理、客户邮件通知和命令行看板功能。适用于 Farreach Electronic 外贸订单生命周期管理(从生产到交付),无需对接工厂 ERP 或物流 API。

When to Use

  • 查询某个订单的当前状态
  • 更新订单状态(生产中 → 待发货 → 已发货 → 已完成)
  • 向客户发送订单状态变更邮件通知
  • 查看所有在途订单的看板汇总
  • 检测逾期或紧急(≤7 天)订单

Prerequisites

  • Node.js v16+
  • 已配置 imap-smtp-email skill 的 SMTP .env 文件(用于发送通知邮件)
  • 依赖安装:npm install(在 skill 目录下执行)

Skills Directory

skills/order-tracker/

How to Invoke

All scripts are run from the scripts/ subdirectory.

1. View Order Dashboard

cd 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

# 输出格式(table / compact / json)
node order-dashboard.js --format json

2. Update Order Status

cd skills/order-tracker/scripts

# 预览(dry-run,不写入)
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 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=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所有订单(手动维护)
订单 Schemaconfig/order-schema.jsonJSON 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

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-03 04:23 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Sales Email Automation (IMAP/SMTP)

cjboy007
通过IMAP/SMTP读取和发送邮件。检查新/未读邮件,获取内容,搜索邮箱,标记已读/未读,发送带附件的邮件。
★ 0 📥 389

Quotation Workflow

cjboy007
自动生成报价单(Excel/Word/HTML/PDF),内置数据验证防示例,支持 OKKI CRM
★ 1 📥 402

Test-Driven Revolution

cjboy007
Test-Driven Revolution 实现AI驱动的迭代代码演进系统,包含自动化编码、测试、审计与受控任务工作流。
★ 0 📥 459