1688采购全流程
1688采购全流程技能。用于1688授权链接、授权店铺检查、收货地址、商品SKU、下单预览、创建订单、支付链接、订单状态、物流、物流轨迹、取消订单、确认收货、开发票等已授权采购履约场景。用户提到1688采购、1688下单、1688授权、1688订单、1688支付、1688物流、1688开发票、1688开票、1688发票、1688 sourcing procurement或1688 order processing时触发。以图搜图使用linkfox-1688-search-by-image。 Skill: 1688采购全流程 Owner: linkfox-ai Summary: 1688采购全流程技能。用于1688授权链接、授权店铺检查、收货地址、商品SKU、下单预览、创建订单、支付链接、订单状态、物流、物流轨迹、取消订单、确认收货、开发票等已授权采购履约场景。用户提到1688采购、1688下单、1688授权、1688订单、1688支付、1688物流、1688开发票、1688开票、1688发票、1688 sourcing procurement或1688 order processing时触发。以图搜图使用linkfox-1688-search-by-image。 Tags: latest:1.0.5 Version history: v1.0.5 | 2026-09-14T04:52:09.546Z | user Update from 1.0.4 to 1.0.5 v1.0.4 | 2026-08-21T10:1
Rank
62
Safety
84
Downloads
1.1k
Updated
Oct 11, 2026
Version
1.0.5
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Oct 11, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 11, 2026
- Adoption signal
- 1.1K downloadsadoption · observed Oct 11, 2026
- Latest release
- 1.0.5release · observed Sep 14, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install s171g8b6m2khwdy9ye8bxj0wx183vd4z:linkfox-1688-procurement- Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-1688-procurement/snapshot"
Documentation
CLAWHUB
145,670 characters of source documentation, loaded on request.
Extracted files
5 files captured from the source.
SKILL.md
--- name: linkfox-1688-procurement description: 1688采购全流程技能。用于1688授权链接、授权店铺检查、收货地址、商品SKU、下单预览、创建订单、支付链接、订单状态、物流、物流轨迹、取消订单、确认收货、开发票等已授权采购履约场景。用户提到1688采购、1688下单、1688授权、1688订单、1688支付、1688物流、1688开发票、1688开票、1688发票、1688 sourcing procurement或1688 order processing时触发。以图搜图使用linkfox-1688-search-by-image。 --- # 1688 Procurement Workflow This skill helps LinkFox users run authorized 1688 procurement: OAuth status checks, SKU and address lookup, order preview, guarded order creation, payment URL retrieval, order tracking, logistics, cancellation, receipt confirmation, and post-completion invoicing. Use `linkfox-1688-search-by-image` for image-based product discovery. This skill does not include image search. ## Core Rules - Every script requires LinkFox platform identity from `LINKFOX_AGENT_API_KEY` or `LINKFOXAGENT_API_KEY`. - `authorize_url.py` starts 1688 OAuth; `authorized_stores.py` checks the current LinkFox user's 1688 OAuth state. - Except those two authorization scripts, every procurement operation runs a script-level `authorizedStores` precheck before calling the target endpoint. - If no store has `status=ACTIVE` and `expired=false`, the target endpoint is not called. - After authorization is valid, procurement tools may be used independently as the user requests; the workflow is guidance, not a mandatory linear script. Image search remains in `linkfox-1688-search-by-image`. - Treat the workflow as a map, not full automation. Do not create orders, get payment URLs, cancel orders, confirm receipt, or apply for invoices based on earlier phrases like "continue". - Use exact internal request field names from `references/api.md` when calling scripts. Do not show these field names in normal user-facing text. - Treat ordinary 1688 procurement as the only user-facing procurement mode. Apply backend defaults internally per `references/api.md`; do not mention procurement type or ask users to choose one. - `cancel_order.py` only attempts to cancel a 1688 order. It is not a refund or after-sales request. For paid orders, including paid-but-unshipped orders, do not call cancellation as a workaround; tell the user this Skill has no refund-application tool and refunds/after-sales must be handled on 1688 unless the backend adds that ability. - MCP enable/disable only controls MCP exposure. These scripts call tool-gateway HTTP routes directly; fully disabling a capability requires disabling the route or backend operation. Read `references/api.md` for endpoint details and `references/workflow.md` before multi-step procurement. ## Tools | Script | Risk | OAuth precheck | Purpose | |---|---:|---:|---| | `authorize_url.py` | Low | No | Generate a 1688 authorization link | | `authorized_stores.py` | Low | No | Check current user's authorized 1688 accounts | | `receive_address_list.py` | Low | Yes | Query receive addresses | | `sku.py` | Low | Yes | Query product SKU/specification data | | `order_preview.py` | Medium | Yes | Preview order price, freight, SKU, and
_meta.json
{
"ownerId": "kn7dmc1t4j28hem1twwyav85p182pb1j",
"slug": "linkfox-1688-procurement",
"version": "1.0.5",
"publishedAt": 1789361529546
}references/api.md
# 1688采购流程 API 参考
## 调用规范
- **请求地址**:`${LINKFOX_TOOL_GATEWAY}/alibaba1688/<endpoint>`,默认网关为 `https://tool-gateway.linkfox.com`
- **请求方式**:POST,Content-Type: `application/json; charset=utf-8`
- **认证方式**:Header `Authorization: <api_key>`,api_key 从环境变量 `LINKFOX_AGENT_API_KEY` 或 `LINKFOXAGENT_API_KEY` 读取(如未配置,按 SKILL.md 的 **## 解决认证和算力问题** 处理)
- **User-Agent**:`LinkFox-Skill/2.0`
- **超时**:150s
- **缓存**:本采购 Skill 不做 24h 响应缓存;授权、价格、库存、订单状态和物流以实时返回为准,高风险写操作不得缓存或自动重放。
Windows 推荐使用 `--payload-env` 或 `--payload-file`,避免 shell 转义破坏 JSON。
```powershell
$env:PAYLOAD = "{}"
python scripts/authorized_stores.py --payload-env PAYLOAD --inline
```
## API 与脚本
| 能力 | Path | Script | 风险 | OAuth 前置检查 | 确认字段 |
|---|---|---|---|---|---|
| 生成授权链接 | `/alibaba1688/authorizeUrl` | `authorize_url.py` | 低 | 否 | - |
| 查询已授权账号 | `/alibaba1688/authorizedStores` | `authorized_stores.py` | 低 | 否 | - |
| 查询收货地址 | `/alibaba1688/receiveAddressList` | `receive_address_list.py` | 低 | 是 | - |
| 查询 SKU | `/alibaba1688/sku` | `sku.py` | 低 | 是 | - |
| 下单预览 | `/alibaba1688/orderPreview` | `order_preview.py` | 中 | 是 | - |
| 创建订单 | `/alibaba1688/createOrder` | `create_order.py` | 高 | 是 | `confirmCreateOrder=true` |
| 获取支付链接 | `/alibaba1688/paymentUrl` | `payment_url.py` | 高 | 是 | `confirmGetPaymentUrl=true` |
| 查询订单状态 | `/alibaba1688/orderStatus` | `order_status.py` | 低 | 是 | - |
| 查询物流 | `/alibaba1688/logistics` | `logistics.py` | 低 | 是 | - |
| 查询物流轨迹 | `/alibaba1688/logisticsTrace` | `logistics_trace.py` | 低 | 是 | - |
| 确认收货 | `/alibaba1688/confirmReceive` | `confirm_receive.py` | 高 | 是 | `confirmReceive=true` |
| 取消订单 | `/alibaba1688/cancelOrder` | `cancel_order.py` | 高 | 是 | `confirmCancel=true` |
| 查询可开票金额 | `/alibaba1688/invoiceAmount` | `invoice_amount.py` | 低 | 是 | - |
| 申请开票 | `/alibaba1688/invoiceApply` | `invoice_apply.py` | 高 | 是 | `confirmApplyInvoice=true` |
`_alibaba1688_imageSearch` 由 `linkfox-1688-search-by-image` 独立承担,本 Skill 不包含图搜脚本。不要把 `/alibaba1688/proxy/callback`、`/alibaba1688/authorizeCallback`、`/alibaba1688/oauth/callback` 暴露为 Skill 能力。
## 请求参数
POST Body(JSON):
| 能力 | 参数 | 必填 | 说明 |
|---|---|---:|---|
| `authorizeUrl` | `accountName` | 是 | 授权账号展示名,用于标识本次 1688 OAuth 授权。 |
| `authorizedStores` | - | 否 | 通常传 `{}`。返回当前 LinkFox 用户的 1688 授权状态,不是全库账号列表。 |
| `receiveAddressList` | - | 否 | 通常传 `{}`。返回当前用户可用收货地址。 |
| `sku` | `offerId` | 是 | 1688 商品 ID,必须用字符串,避免 JS 大数精度丢失。 |
| `orderPreview` | `addressId` 或 `addressParam` | 条件必填 | 二选一。优先使用 `receiveAddressList` 返回的 `addressId`;`addressParam` 至少含 `fullName`、`mobile`、`address`。 |
| `orderPreview` | `cargoParamList` | 是 | 货品列表,每项含 `offerId`、可选 `specId`、`quantity`;`quantity >= 1`。 |
| `orderPreview` | `flow` | 是 | 下单流程类型。当前主流程为普通采购,默认 `general`;脚本缺省时会补 `general`,直接调 API 时必须显式传。仅当用户明确要求分销/精选货源分销时,才可透传 `fenxiao`/`boutiquefenxiao`;本 Skill 不提供分销专属校验或保障。 |
| `orderPreview` | `isvBizType` | 否 | 默认 `cross`;仅支持 `cross`、`cross_daigou`、`cross_distribution`。 |
| `createOrder` | `confirmCreateOrder` | 是 | 必须是 JSON boolean `true`。未传或 falsreferences/onboarding.md
# 解决认证和算力问题
调用本 skill 时若网关返回 **auth** 或 **billing** 错误,走本 skill 自带的 `scripts/onboarding.py` 完成引导。
**auth 场景**:`errcode=401` 或消息含 `authorized error`/`鉴权失败`/`未授权`/`unauthorized`;或 `LINKFOX_AGENT_API_KEY` 与 `LINKFOXAGENT_API_KEY` 均为空。
1. 若已配置 key → 先让用户重启会话(最常见误判),仍失败让用户重新取 key 或换手机号重注册
2. 未配置 → 询问:自助去 https://agent.linkfox.com/ 取 key,或提供手机号让脚本注册
3. 手机号路径:
- `python scripts/onboarding.py send-code <phone>` → 展示 JSON 里的 phone/agreements
- 收到验证码后:`python scripts/onboarding.py login <phone> <code>`
- 拿到 `api_key` 后把下面三平台配置转发给用户,提示重启会话生效:
- Windows PowerShell(永久):`setx LINKFOX_AGENT_API_KEY "<key>"`
- macOS zsh:`echo 'export LINKFOX_AGENT_API_KEY="<key>"' >> ~/.zshrc && source ~/.zshrc`
- Linux bash:`echo 'export LINKFOX_AGENT_API_KEY="<key>"' >> ~/.bashrc && source ~/.bashrc`
- 变量名 `LINKFOX_AGENT_API_KEY`(主推)或 `LINKFOXAGENT_API_KEY`(老规范)任一即可
**billing 场景**:`errcode=402` 或消息含 `算力/余额/quota/insufficient/充值/套餐到期`。
- `python scripts/onboarding.py list-plans` → 有 AskUserQuestion 就弹菜单,否则输出编号清单让用户选
- 校验 `plan_id` ∈ 清单、支付方式 ∈ 该套餐 `available_methods`(通常 `wechat/alipay`)
- `python scripts/onboarding.py order <plan_id> <method>` → 展示优先级 PNG > `pay_url` > `ascii_qr`(标注兜底)
- 已付款可选调 `python scripts/onboarding.py query <order_id>`,不主动轮询
排除 `errcode=403`(无权限,不归入这两类)。所有子命令输出 stdout JSON,`error` 字段已含阶段前缀,透传给用户即可。完整用法:`python scripts/onboarding.py --help`。references/workflow.md
# 1688采购流程地图
本文档是流程地图,不是自动化脚本。Agent 可以按步骤协助用户完成采购,但不能一次性自动执行完整下单闭环。
## 总原则
1. 采购业务先查授权,再查商品和地址,再预览,再让用户确认。
2. 图搜找货使用 `linkfox-1688-search-by-image`,本 Skill 只处理采购履约。
3. 除 `authorizeUrl` 和 `authorizedStores` 外,脚本会在每个采购 endpoint 前自动检查当前用户 ACTIVE 授权。
4. 下单、支付链接、取消订单、确认收货、申请开票都是独立高风险动作,各自需要单独确认。
5. Agent 刚刚复述清楚一个具体高风险动作和对象后,用户紧接着回复“确认”也算有效确认;用户更早说过“继续”“可以”“按上面来”,不能作为后续高风险动作的确认。
6. 授权有效后,除以图搜图外,本 Skill 的查询、预览、下单、支付链接、状态、物流等能力都可按用户需求单独使用;不要强迫用户从第 1 步重新跑完整流程。
## 1. 授权检查
运行:
```powershell
$env:PAYLOAD = "{}"
python scripts/authorized_stores.py --payload-env PAYLOAD --inline
```
判断:
- 授权有效且未过期:可以继续采购流程。
- 没有可用授权:进入授权步骤。
- 若授权检查返回不可用,提示用户重新授权;不要向用户展示 token 失效、有效期或过期时间等内部细节。
- 浏览器最后跳到 MyERP 登录页不等于授权失败;以 `authorized_stores.py` 返回为准。
`authorizedStores` 应只返回当前 LinkFox API key 对应用户的授权店铺。不要把它理解为后台全库账号列表。
## 2. 发起授权
运行 `authorize_url.py` 获取 1688 授权链接,并让用户在浏览器打开。
用户完成授权后,再运行 `authorized_stores.py` 验证是否出现 ACTIVE 账号。
不要让用户提供 1688 token、refresh token 或 callback code。授权 token 保存由 MyERP/ecom-plat 后端闭环完成。
## 3. 找货与 SKU
如果用户按图片找货:
1. 切换到 `linkfox-1688-search-by-image`。
2. 从图搜结果中选择目标 `offerId`。
3. 回到本 Skill,用 `sku.py` 查询 SKU/规格。
如果用户已提供 1688 商品 ID:
1. 直接运行 `sku.py`。
2. 展示 SKU、规格、价格、起订量、库存等关键字段。
3. 让用户选择明确的 SKU 和数量。SKU 阶段的价格和库存只作规格选择参考,真实可购性、最终价格、运费和优惠以订单预览为准。
## 4. 收货地址
运行 `receive_address_list.py` 查询当前用户可用的 1688 收货地址。
展示地址时应包含:
- 收货人
- 手机/电话(如返回)
- 省市区与详细地址
- 地址标识
不要猜测默认地址。多地址时让用户明确选择。
## 5. 下单预览
运行 `order_preview.py` 前确认已具备:
- 商品
- SKU/规格
- 数量:必须结合 SKU 返回的售卖单位、起批量/最小采购量理解;按瓦、米、件等非“件”单位计价的商品,不要默认买 1 个单位
- 收货地址
- Agent 调脚本时按 `references/api.md` 组装内部请求字段,不要把字段名展示给用户
预览结果必须先展示给用户:
- 商品
- SKU/规格
- 数量
- 单价与商品总价
- 运费
- 收货地址
- 订单总额
- 任何异常、库存或价格变化提示
预览失败时停止,不要进入创建订单。收到预览返回不代表可以下单;必须确认预览结果明确通过、金额和商品行有效。失败时展示上游提示和关键异常,并优先复核 SKU/规格、起批量、售卖单位、数量和收货地址。
## 6. 创建订单
创建订单是高风险动作。必须先询问用户是否确认创建该订单,并复述预览摘要。用户只需要中文自然语言确认,例如“确认”或“确认创建这个订单”;不要要求或展示内部确认字段、请求字段名或实现细节。
只有用户针对本次订单明确确认后,Agent 才在脚本调用中自动加入内部安全字段。
`create_order.py` 会拒绝缺少内部安全字段的请求;这是脚本保护机制,不要展示给普通用户。
创建成功后,`createOrder` 返回的 `orderId` 就是后续获取支付链接、查询状态、物流、取消和确认收货使用的 1688 订单号;对用户可称为“订单号”。
## 7. 获取支付链接
获取支付链接也是独立高风险动作。创建订单成功不等于用户同意获取支付链接。用户只需要中文自然语言确认,例如“确认”或“确认获取支付链接”;不要要求或展示内部确认字段、请求字段名或实现细节。
用户单独确认后,Agent 在脚本调用中自动加入内部安全字段和订单号。
## 8. 订单状态与物流
查询类动作可在用户请求时执行:
- `order_status.py`
- `logistics.py`
- `logistics_trace.py`
不要在没有用户要求的情况下连续轮询。只有响应明确返回 `costToken`、402 或余额不足信息时,才提示计费/余额影响。
## 9. 取消订单
取消订单是高风险动作,但它不是退款或售后申请。`cancel_order.py` 只会尝试取消 1688 订单;是否允许取消由 1688 根据订单状态判断,本 Skill 当前没有申请退款能力。
执行前优先查询或确认订单状态,并按状态分流:
- 未付款/待付款:可进入取消订单确认流程。
- 已付款待发货:不要调用取消订单,也不要把取消订单作为退款方案。直接提示用户到 1688 订单页发起退款/售后。
- 已发货/已完成:不要调用取消订单,应提示用户到 1688 处理退货退款或售后。
- 已取消:无需重复取消。
进入取消确认前展示:
- 订单号
- 当前订单状态
- 取消原因
- 取消不等于退款,是否成功以 1688 返回为准
只有用户针对该订单明确确认取消后,Agent 才运行 `cancel_order.py`,并在脚本调用中自动加入内部安全字段和订单号。若上一条消息已明确复述取消对象,用户回复“确认”即可。
## 10. 确认收货
确认收货是高风险动作。用户查询物流、看到已签收、或问“状态怎么样”,都不等于确认收货。
只有用户明确确认收货后,Agent 才运行 `confirm_receive.py`,并在脚本调用中自动加入内部安全字段和订单号。若上一条消息已明确复述确认收货对象,用户回复“确认”即可。
## 11. 开发票
1688 下单接口不支持发票信息,发票须在订单完成(建议确认收货后)通过独AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/linkfox-ai/skills/linkfox-1688-procurement",
"sourceUrl": "https://clawhub.ai/linkfox-ai/skills/linkfox-1688-procurement",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T11:29:40.039Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-1688-procurement/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-1688-procurement/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-11T11:29:40.039Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1.1K downloads",
"href": "https://clawhub.ai/linkfox-ai/linkfox-1688-procurement",
"sourceUrl": "https://clawhub.ai/linkfox-ai/linkfox-1688-procurement",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T11:29:40.039Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "1.0.5",
"href": "https://clawhub.ai/linkfox-ai/linkfox-1688-procurement",
"sourceUrl": "https://clawhub.ai/linkfox-ai/linkfox-1688-procurement",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-09-14T04:52:09.546Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-1688-procurement/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-1688-procurement/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 1.0.5",
"description": "Update from 1.0.4 to 1.0.5",
"href": "https://clawhub.ai/linkfox-ai/linkfox-1688-procurement",
"sourceUrl": "https://clawhub.ai/linkfox-ai/linkfox-1688-procurement",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-09-14T04:52:09.546Z",
"isPublic": true
}
]
}Record generated Oct 11, 2026.
