# 工作台数据文件地图（2026-07-26 考古确认）

> 用途：`~/Desktop/Hermes输出-工作类/数据/` 下几十个 JSON 哪些可信、什么口径、什么格式。写聚合脚本/排查数据前先查此表。

## 客户主数据（权威源）

| 文件 | 内容 | 口径 |
|---|---|---|
| `pricing/_index.json` | 1197 客户索引：name/file/total/orders/products/contacts/opps/latest_date/group_name | **ERP 客户主数据（权威）** |
| `pricing/<客户名>.json` | 单客户详情：group/salesperson/short_name/years/products(sku,name,total_amt,latest_price,is_gift) | ERP 价格档案，约1200个文件 |
| `cust_yearly.json` | `{客户名: {"2024":x,"2025":y,"2026":z}}` | ERP 三年采购额（2026=H1） |
| `pricing/_key_customers.json` | 75 大客户聚合（sales_2024/25/26, group, sales） | _index 的子集增强版 |

**⚠️ `mcp_customers.json`（1700条）不是客户主数据**：缺核心客户（丽珠/伯杰/诺瓦都不在）、578 条名字带"-浙江/-广东"区域后缀（匹配前需剥离）。只用作 MCP 元数据补充（owner/等级 field_17186c/集团 field_c3224b/fid）。

**客户名匹配规则**：跨源匹配用 ERP 全名（pricing 为准）；对 mcp 名字先剥离尾部区域后缀：`-(浙江|广东|江苏|北京|上海|华北|华南|华中|华东|华西|...)$`。**MQL 拉回的 name 可能带 `\t` 制表符/空格，匹配前必须 `.strip()`**。

| 文件 | 内容 | 口径 |
|---|---|---|
| `customer_levels.json` | `{客户名: {level:"大客户/重点客户", tier:"A/B/C/D/准A类"}}`（140家：大44+重点96） | **客户级别权威源**，`脚本/pull_customer_levels.py` 走 MQL 拉 `field_c8e80d`(客户级别)+`field_17186c`(客户等级)。注意：`mcp_customers.json` 里这两个字段全空（拉取管道漏字段），勿从那里读级别 |

## 订单/物流

| 文件 | 内容 | 注意 |
|---|---|---|
| `shipment_status.json` | 343 单 H2 订单（英文键：orderId/customer/mcpCustomer/product/taxTotal/creator/trackingNo/shipment{status,routes}）+ h1_summary + full_year_tax | **由 ad-hoc 会话生成，无生成脚本**；shipment.status 只三值 delivered/in_transit/no_data（前端兼容）；顺丰刷新由 `~/.hermes/scripts/sf_delivery_watchdog.py` 原地更新 |
| `mcp_orders.json` | 2500 条 **FO 预测订单**（field_xxx 原始格式：field_e1001d=客户, field_4a1b47=单号, field_3a3ccb=产品） | ❌ 不是 ZHBR 标准销售订单，勿当订单源 |
| `h1_archive.json` | H1(1-6月) 汇总：3785单/2154万，无明细 | 客户级 H1 明细不存在，只有汇总 |

**订单→客户桥**：订单的 `mcpCustomer` 字段是 ERP名→飞书客户名的映射，但命中率仅约 6%（桥本身不完整）。360 聚合直接按 customer 原名匹配 pricing。

## 活动/商机/客诉

| 文件 | 内容 | 注意 |
|---|---|---|
| `mcp_activities.json` | 2500 条活动（field_5f20fc=客户全名, field_76654e=方式, field_b99055=纪要, start_time, name） | **恰好2500=50×50 疑似分页截断，仅覆盖32个客户**；500条客户字段为空。覆盖不全，勿用于"无活动"风险判定 |
| `activities_q2q3_2026.json` | mcp_refresh.py 拉的全年活动 | 字段不含客户名（MQL 未 SELECT 客户） |
| `opps_by_customer.json` | `{客户全名: [{name,status,creator,id,url}]}` | 活跃商机，URL 可直接用 |
| `opportunity_sandbox.json` | 339 沙盘商机（customer/name/target/q1-q4/y2024/y2025/sales/dept/type） | 金额单位混杂（Pitfall 57），target 多为元 |
| `mcp_complaints.json` | 350 客诉（field_ac5caf=[{label:客户全名}], name, work_item_status=[{label}], work_item_id） | 客诉URL模板：`https://project.feishu.cn/br-shgl/khts/detail/{work_item_id}` |
| `test_feedback.json` | 258 测试反馈（group=课题组名） | 生命科学口径，与公司客户名基本不匹配 |

## 聚合产物

| 文件 | 生成者 | 用途 |
|---|---|---|
| `customer_360.json` | `脚本/build_customer_360.py`（1204客户×11维度，~800KB；1197 ERP + 7个MCP标签无ERP记录占位卡；含 level/tier 字段） | 客户360档案卡（`工具/客户360档案.html`，支持 `?name=` 深链，自动剥区域后缀；工作台客户表已加"360°"互链按钮） |

## 数据管道运行现状（2026-07-26）

- `cb_sync.sh`（cron 每2h）：跑 mcp_refresh + mcp_kpi + refresh_erp + 上传13个JSON到CloudBase。**不含顺丰、不含 build_customer_360**
- `shipment_pipeline.py`：半孤儿（读 mcp_orders_input.json 的入口不存在于任何 cron），且 SF 查询缺 checkPhoneNo（见 hermes-pitfalls-learned Pitfall 62）
- 顺丰监控：`sf_delivery_watchdog.py` cron `20 9,15 * * *`，自刷轨迹+比对推送
- 客诉 URL / 客户 URL / 活动 URL 模板见上表及 Pitfall 12/19
