VWD AI Guide v3.9

OrderBridge:用 AI 半天做一个工具OrderBridge: Building a Tool in Half a Day with AI

从电话手写到全自动化 · 内部分享 · Jack Deng · IT 部门 · 2026

From Phone & Handwriting to Full Automation · Internal Knowledge-Share · Jack Deng · IT Dept. · 2026

C

Christy Wu

IT 经理IT Manager · christyw@valuewds.com

J

Jack Deng

ERP 专员ERP Specialist · jackd@valuewds.com

B

Barry Kuang

客户服务经理Customer Service Manager · BarryK@valuewds.com

半天
½ Day
从零到可用工具Zero to working tool
~3 min
新流程处理一张订单Per order, new process
815
SKU 自动匹配SKUs auto-matched

一、背景与项目目的1. Background & Purpose

⚠️ 旧流程⚠️ Before

客户电话下订单,员工接听并手写记录 SKU、数量、客户名,再手动录入 NetSuite ERP。

Customers placed orders over the phone. Staff answered, wrote down SKUs, quantities, and customer names by hand, then manually entered everything into NetSuite ERP.

→
✅ 新流程✅ After

客户填写标准化 Excel 订单表(Form1 / Form2)发回,系统自动生成 NetSuite 可直接导入的 CSV 文件。

Customers fill in a standardized Excel order form (Form 1 or Form 2) and email it back. The system automatically produces a CSV ready to import directly into NetSuite.

🎯 目标Goal

把收订单 → 录订单的全流程压缩到「拖入文件 + 选择客户 + 一键导出」,操作人员无需懂技术。

Compress the entire order-receipt-to-entry workflow into three steps — drop file, select customer, export — with no technical knowledge required from the operator.

二、解决的痛点2. Pain Points Solved

旧流程痛点Old Process Pain Point 说明Description
📞 客户电话报货📞 Phone-in orders 员工手写听错、写错、漏记
🔍 逐行查 NetSuite Item ID🔍 Manual Item ID lookup 耗时,815 个 SKU 难以记忆
📊 手动整理 Tariff 分区逻辑📊 Manual Tariff zone sorting 规则复杂,容易出错
⌨️ 重新录入 ERP⌨️ Re-entering data into ERP 重复劳动,效率低

三、实现方法:三层架构3. How It Works: Three-Layer Architecture

① 数据层 Data Layer Data Layer
  • 815 个 SKU 本地参考 CSV(含料件分类、Tariff Code)
  • 815-SKU local reference CSV (with item category and Tariff Code)
  • NetSuite 实时数据:通过 SuiteQL REST API + OAuth 1.0 认证查询
  • Live NetSuite data: queried via SuiteQL REST API with OAuth 1.0 authentication
② 处理逻辑 Processing Logic Processing Logic
  • 读取 Excel 订单(第 6 行为表头,提取 SKU + 数量)
  • Read Excel order (row 6 = header; extract SKU + quantity)
  • 本地匹配分类和 Tariff Code
  • Match category and Tariff Code from local reference
  • 批量查询 NetSuite Item ID
  • Batch-query NetSuite Item IDs
  • 自动分区排序:有 Tariff 的料件进「上区」,无 Tariff 进「下区」,GSCO SKU 优先置顶
  • Auto-sort into zones: items with Tariff Code → upper zone; without → lower zone; GSCO SKUs pinned to top
  • 自动插入 Subtotal + Tariff Surcharge 行
  • Auto-insert Subtotal and Tariff Surcharge rows
③ 界面(桌面应用)GUI GUI (Desktop App)
  • 🖱️ 拖拽 .xlsx 或点击浏览
  • 🖱️ Drag-and-drop .xlsx or click to browse
  • 🔍 输入客户名实时搜索 NetSuite 客户
  • 🔍 Type a customer name to search NetSuite customers in real time
  • 🎨 预览表格(颜色区分上下区,标红未匹配 SKU)
  • 🎨 Preview table with color-coded zones; unmatched SKUs highlighted in red
  • 📤 一键导出 CSV,含自动生成 External ID
  • 📤 One-click CSV export with auto-generated External ID
  • 📦 打包为单文件 .exe,无需安装 Python
  • 📦 Packaged as a single-file .exe — no Python installation needed

四、版本迭代(半天完成两个版本)4. Version History (Half a Day, Two Versions)

v1.0

上午 — 核心功能跑通Morning — Core pipeline working

Excel 读取 → NetSuite 查询 → CSV 导出;基础 GUI,支持文件浏览和客户选择

Excel read → NetSuite query → CSV export. Basic GUI with file browse and customer selector.

v1.1

下午 — 体验升级Afternoon — UX upgrades

拖拽文件支持(tkinterdnd2);预览表格颜色标记(上/下区、映射状态);字体调节(A−/A+);未匹配 SKU 警告;打包为独立 .exe

Drag-and-drop support (tkinterdnd2); color-coded preview table (upper/lower zone, mapping status); font-size buttons (A−/A+); unmatched-SKU warning dialog; packaged as standalone .exe

⏱ 总耗时:约半天Total time: ~half a workday

五、成果对比:流程前后5. Results: Before vs. After

⚠️ 旧流程(人工)Old Process (Manual) ✅ 新流程(OrderBridge)New Process (OrderBridge)
步骤 1Step 1 客户致电,员工接听并手写记录 SKU、数量、客户名Customer calls in; staff answers phone and hand-writes SKU, quantity, and customer name 客户填写标准化 Excel 订单表后发回邮件Customer fills in the standard Excel order form and emails it back
步骤 2Step 2 人工逐行查阅 NetSuite,确认 815 个 SKU 对应的 Item IDStaff manually looks up each Item ID in NetSuite across 815 SKUs 从邮件下载 Excel,拖入 OrderBridge 窗口Download Excel from email, drag & drop it into the OrderBridge window
步骤 3Step 3 手动整理 Tariff 分区逻辑,查分类规则Manually sort Tariff zone logic and check category rules 搜索并选择客户,点击「生成 CSV」Search & select the customer, then click "Generate CSV"
步骤 4Step 4 逐行录入 NetSuite ERP,核对后提交 Sales OrderEnter every line into NetSuite ERP, verify, and submit the Sales Order 直接将 CSV 导入 NetSuite,完成Import the CSV directly into NetSuite — done
⏱ 几十分钟(且易出错)Tens of minutes (and error-prone) 约 3 分钟 ✨~3 minutes ✨

六、AI 的帮助:角色分工6. How We Used AI: Division of Labor

👤 人做的Human

  • ✅描述业务需求和业务规则Defined business needs and rules
  • ✅提供 Excel 样本和字段说明Provided Excel samples and field descriptions
  • ✅测试运行,反馈 bugRan tests and reported bugs
  • ✅说明 NetSuite API 认证方式Explained the NetSuite API auth method
  • ✅说"要能拖拽"、"要打包 exe"Said "make it drag-and-drop" and "package as .exe"

🤖 AI 做的AI

  • ⚡设计模块结构、编写全部代码Designed module architecture, wrote all code
  • ⚡解析文件格式,写出读取逻辑Parsed file format, built the read logic
  • ⚡定位问题,修改代码Diagnosed issues and patched the code
  • ⚡实现 OAuth1 + SuiteQLImplemented OAuth1 + SuiteQL
  • ⚡选库、集成、配置 PyInstallerSelected libraries, integrated, configured PyInstaller

七、掌握 AI 管理:BRACE 框架7. Mastering AI: The BRACE Framework

要像管理专业实习生一样管理 AI。初学者常犯的错误是把 AI 当搜索引擎用。BRACE 框架通过五个维度规范指令,大幅提升输出质量。

Manage AI like a highly capable but very literal intern. A common beginner mistake is treating AI like a search engine. The BRACE framework structures prompts across five dimensions and dramatically improves output quality.

B
背景 BackgroundBackground
交代前因后果和目标读者Provide context: situation, goals, and intended audience
R
角色 RoleRole
赋予 AI 专业身份(如「资深 ERP 顾问」),对齐专业度Give AI a professional identity (e.g. "Senior ERP Consultant") to align expertise
A
行动 ActionAction
明确具体的任务指令State the specific task clearly
C
约束 ConstraintsConstraints
设定字数、语气、必须包含的关键词等边界Set boundaries: length, tone, required keywords, format
E
示例 ExamplesExamples
提供模仿范例——这是最强大的武器Provide sample output to imitate — this is the most powerful lever

提示词对比示例Prompt Comparison Example

帮我写一个读取 Excel 的程序 Write me a program that reads Excel files.
B:我们公司有客户订单 Excel,第 6 行是表头,A 列是 SKU,H 列是数量,空行需要跳过。 R:你是一位 Python 数据处理专家。 A:写一个函数 read_order_form(path) 读取这个文件,返回 SKU 和数量的 DataFrame。 C:数量必须是正整数,非数字行直接丢弃,不要异常处理以外的代码。 E:返回格式类似 [{"Item SKU": "ABC-001", "Quantity": "5"}] B: Our customer order Excel has headers in row 6. Column A is SKU, column H is quantity. Skip blank rows. R: You are an expert Python data-processing engineer. A: Write a function read_order_form(path) that reads this file and returns a DataFrame of SKU and quantity. C: Quantity must be a positive integer; discard non-numeric rows silently. No code beyond error handling. E: Return format: [{"Item SKU": "ABC-001", "Quantity": "5"}]

八、人的思想对结果的影响8. The Human Element: How Thinking Shapes the Outcome

🧠 业务规则必须由人来定义 — AI 不知道 GSCO 要优先、Tariff Surcharge Item ID 是 12316,这些只有人能提供。

🧠 Business rules must come from humans — AI did not know that GSCO SKUs go first, or that the Tariff Surcharge Item ID is 12316. Only we could provide that.

👤 对用户是谁的判断影响 UI 设计 — 因为操作人员不是程序员,才有了拖拽、中文提示、颜色预览。

👤 Who the user is shapes the UI — Because the operator is not a developer, we got drag-and-drop, color previews, and clear status indicators.

🧪 测试要覆盖真实场景 — "路径含空格的文件"这种边界情况,只有真实测试才能发现。

🧪 Tests must cover real scenarios — Edge cases like "file path contains a space" only surface through real-world testing.

🛑 适时踩刹车 — AI 会建议加配置热重载、单元测试框架;这个体量「够用就好」。

🛑 Know when to stop — AI suggested adding hot-reload config and a full unit-test framework. At this scale, "good enough" is the right call.

九、实战小 Tips9. Quick Tips

VWD AI Guide v3.9 | VWD | 2026 | IT Department