Shopify 是一个电商插件,以插件能力的形式出现在指令树「扩展能力」中。安装或内置加载后,可把插件里的节点拖到工作流画布使用。
插件标识:rpa-plugin-shopify
插件分类:电商插件
节点数量:7 个
| 方式 | 怎么用 | 适合人群 |
|---|
| 可视化编排(推荐) | 在「扩展能力」中找到 Shopify,拖入需要的节点并填写参数 | 大多数用户,适合按表单配置插件能力 |
| 代码编排(执行指令 XML) | 通过「执行指令(XML)」调用节点的 type 与参数 | 需要动态拼装、循环调用或批量处理的用户 |
- Shopify Admin REST API 跨境电商插件:7 个原子节点覆盖 订单查询 / 订单详情 / 履约发货 / 商品查询 / 库存更新 / 商品更新(含上下架/改价)。Custom App Bearer Token 鉴权,长期有效;自动 429 退避(含 Retry-After)。基于 Admin REST API 2024-10。
- 需要在自动化流程中复用该插件提供的读取、写入、同步或处理能力。
- 需要先配置连接:shopify。
- 涉及订单、商品、库存、价格或平台数据时,建议先用测试数据跑通,再用于正式数据。
- 建议先运行连通性、查询或只读节点,确认权限和参数正确后再执行写入类节点。
| 连接类型 | 名称 | 说明 |
|---|
shopify | shopify | Shopify Admin REST API 凭据(自建 Custom App / 长期 Bearer token) |
| 节点名称 | 节点标识 | 说明 |
|---|
| 连通性测试 | ShopifyPing | 调一次 GET /shop.json 验证 access_token 有效 + Custom App 已正确安装 |
| 查询订单列表 | ListShopifyOrders | 按状态 + 时间窗分页查询订单(自动 cursor 翻页 / maxRecords 上限保护) |
| 取订单详情 | GetShopifyOrder | 按 orderId 取详情 |
| 履约发货 | FulfillShopifyOrder | 标记订单已履约并上传物流单号。本节点自动先取 fulfillment_orders → 再调 POST /fulfillments.json(Shopify 2022-07+ 流程) |
| 查询商品列表 | ListShopifyProducts | 分页查询商品(自动 cursor 翻页) |
| 更新库存 | UpdateShopifyInventory | 按 (inventory_item_id, location_id) 二维更新库存。多条会串行调(注意 Shopify 限流) 注意:会直接修改线上库存;建议先在测试店铺或小范围 SKU 验证。失败时即使 ok=false 也会返回 data.succeeded/data.failed/total。 |
| 更新商品(上下架/改价/标题) | UpdateShopifyProduct | PUT /products/{id}.json:可同时改 title / status(active=上架 / archived=下架 / draft=草稿) / vendor / tags / bodyHtml / variants 的 price/compareAtPrice/sku 注意:会直接影响线上商品标题、上下架状态、价格和 SKU 信息;建议先在测试店铺或单个商品验证。 |
- 节点标识:
ShopifyPing
- 节点说明: 调一次 GET /shop.json 验证 access_token 有效 + Custom App 已正确安装
- XML 示例:
<ShopifyPing connectionId="" outKey="pingResult" />
| 界面名称 | 代码属性名 | 类型 | 必填 | 默认值 | 说明 |
|---|
| Shopify 连接 | connectionId | connection | 是 | - | |
| 输出变量名 | outKey | output | 否 | pingResult | |
| 失败时抛错 | failOnError | boolean | 否 | true | |
输出字段:
| 字段 | 类型 | 说明 |
|---|
pingResult | object | { ok:true, data:{ connected:true, shop:{ id, name, domain, plan, currency, timezone, countryCode } } } |
- 节点标识:
ListShopifyOrders
- 节点说明: 按状态 + 时间窗分页查询订单(自动 cursor 翻页 / maxRecords 上限保护)
- XML 示例:
<ListShopifyOrders connectionId="" outKey="orders" />
| 界面名称 | 代码属性名 | 类型 | 必填 | 默认值 | 说明 |
|---|
| Shopify 连接 | connectionId | connection | 是 | - | |
| 订单状态 | status | select | 否 | any | |
| 支付状态 | financialStatus | select | 否 | - | |
| 履约状态 | fulfillmentStatus | select | 否 | - | |
| 创建时间≥(ISO8601) | createdAtMin | string | 否 | - | 2026-01-01T00:00:00-07:00 |
| 创建时间<(ISO8601) | createdAtMax | string | 否 | - | |
| 更新时间≥(ISO8601) | updatedAtMin | string | 否 | - | |
| 更新时间<(ISO8601) | updatedAtMax | string | 否 | - | |
| 返回字段(逗号分隔) | fields | string | 否 | - | 限制返回字段可大幅提速并降低 rate limit 消耗 |
| 每页条数 | limit | number | 否 | 50 | 默认 50,上限 250 |
| 自动翻页 | autoPaginate | boolean | 否 | true | |
| 最多翻页数 | maxPages | number | 否 | 20 | |
| 记录数上限 | maxRecords | number | 否 | - | |
| 输出变量名 | outKey | output | 否 | orders | |
| 失败时抛错 | failOnError | boolean | 否 | true | |
输出字段:
| 字段 | 类型 | 说明 |
|---|
orders | object | { ok:true, data:{ orders:[{…原始订单结构}], total, hasMore, nextPageInfo? } } |
- 节点标识:
GetShopifyOrder
- 节点说明: 按 orderId 取详情
- XML 示例:
<GetShopifyOrder connectionId="" orderId="" outKey="orderDetail" />
| 界面名称 | 代码属性名 | 类型 | 必填 | 默认值 | 说明 |
|---|
| Shopify 连接 | connectionId | connection | 是 | - | |
| 订单 ID | orderId | string | 是 | - | |
| 返回字段(逗号分隔) | fields | string | 否 | - | |
| 输出变量名 | outKey | output | 否 | orderDetail | |
| 失败时抛错 | failOnError | boolean | 否 | true | |
输出字段:
| 字段 | 类型 | 说明 |
|---|
orderDetail | object | { ok:true, data:{ order:{…} } } |
- 节点标识:
FulfillShopifyOrder
- 节点说明: 标记订单已履约并上传物流单号。本节点自动先取 fulfillment_orders → 再调 POST /fulfillments.json(Shopify 2022-07+ 流程)
- XML 示例:
<FulfillShopifyOrder connectionId="" orderId="" trackingNumber="" outKey="fulfillResult" />
| 界面名称 | 代码属性名 | 类型 | 必填 | 默认值 | 说明 |
|---|
| Shopify 连接 | connectionId | connection | 是 | - | |
| 订单 ID | orderId | string | 是 | - | |
| 物流单号 | trackingNumber | string | 否 | - | |
| 物流商 | trackingCompany | string | 否 | - | 推荐填,Shopify 据此显示物流公司 logo & 跟踪链接 |
| 物流跟踪 URL | trackingUrl | string | 否 | - | |
| 通知买家 | notifyCustomer | boolean | 否 | true | Shopify 会发送发货邮件 |
| fulfillment_order_id 列表(高级,跳过第一步) | fulfillmentOrderIds | string | 否 | - | 不填则本节点自动调 GET /orders/:id/fulfillment_orders.json 取;逗号分隔 / JSON 数组 |
| 输出变量名 | outKey | output | 否 | fulfillResult | |
| 失败时抛错 | failOnError | boolean | 否 | true | |
输出字段:
| 字段 | 类型 | 说明 |
|---|
fulfillResult | object | { ok:true, data:{ orderId, fulfillmentId, trackingNumber, raw } } |
- 节点标识:
ListShopifyProducts
- 节点说明: 分页查询商品(自动 cursor 翻页)
- XML 示例:
<ListShopifyProducts connectionId="" outKey="products" />
| 界面名称 | 代码属性名 | 类型 | 必填 | 默认值 | 说明 |
|---|
| Shopify 连接 | connectionId | connection | 是 | - | |
| 商品状态 | status | select | 否 | - | |
| Vendor 过滤 | vendor | string | 否 | - | |
| Product Type 过滤 | productType | string | 否 | - | |
| 创建时间≥(ISO8601) | createdAtMin | string | 否 | - | |
| 创建时间<(ISO8601) | createdAtMax | string | 否 | - | |
| 更新时间≥(ISO8601) | updatedAtMin | string | 否 | - | |
| 更新时间<(ISO8601) | updatedAtMax | string | 否 | - | |
| 返回字段(逗号分隔) | fields | string | 否 | - | |
| 每页条数 | limit | number | 否 | 50 | |
| 自动翻页 | autoPaginate | boolean | 否 | true | |
| 最多翻页数 | maxPages | number | 否 | 20 | |
| 记录数上限 | maxRecords | number | 否 | - | |
| 输出变量名 | outKey | output | 否 | products | |
| 失败时抛错 | failOnError | boolean | 否 | true | |
输出字段:
| 字段 | 类型 | 说明 |
|---|
products | object | { ok:true, data:{ products:[…], total, hasMore, nextPageInfo? } } |
- 节点标识:
UpdateShopifyInventory
- 节点说明: 按 (inventory_item_id, location_id) 二维更新库存。多条会串行调(注意 Shopify 限流) 注意:会直接修改线上库存;建议先在测试店铺或小范围 SKU 验证。失败时即使 ok=false 也会返回 data.succeeded/data.failed/total。
- XML 示例:
<UpdateShopifyInventory connectionId="" items="[]" outKey="inventoryResult" />
| 界面名称 | 代码属性名 | 类型 | 必填 | 默认值 | 说明 |
|---|
| Shopify 连接 | connectionId | connection | 是 | - | |
| 库存项(JSON 数组) | items | textarea | 是 | [] | 每项 { inventoryItemId, locationId, available:整数 } |
| 单条失败时继续 | continueOnError | boolean | 否 | - | false(默认):任一失败立即停,hint 含已成功条数;true:跳过失败继续 |
| 输出变量名 | outKey | output | 否 | inventoryResult | |
| 失败时抛错 | failOnError | boolean | 否 | true | |
输出字段:
| 字段 | 类型 | 说明 |
|---|
inventoryResult | object | { ok:true, data:{ succeeded:[…], failed:[{…,error}], total } } |
- 节点标识:
UpdateShopifyProduct
- 节点说明: PUT /products/{id}.json:可同时改 title / status(active=上架 / archived=下架 / draft=草稿) / vendor / tags / bodyHtml / variants 的 price/compareAtPrice/sku 注意:会直接影响线上商品标题、上下架状态、价格和 SKU 信息;建议先在测试店铺或单个商品验证。
- XML 示例:
<UpdateShopifyProduct connectionId="" productId="" outKey="productResult" />
| 界面名称 | 代码属性名 | 类型 | 必填 | 默认值 | 说明 |
|---|
| Shopify 连接 | connectionId | connection | 是 | - | |
| 商品 ID | productId | string | 是 | - | |
| 上下架状态 | status | select | 否 | - | |
| 标题 | title | string | 否 | - | 不传则不改 |
| Vendor(品牌/供应商) | vendor | string | 否 | - | |
| Tags(逗号分隔) | tags | string | 否 | - | |
| 商品描述(HTML) | bodyHtml | textarea | 否 | - | |
| Variants 改价/SKU(JSON 数组) | variants | textarea | 否 | - | 简化形态 { id, price, compareAtPrice?, sku? };不改的字段不要写 |
| 输出变量名 | outKey | output | 否 | productResult | |
| 失败时抛错 | failOnError | boolean | 否 | true | |
输出字段:
| 字段 | 类型 | 说明 |
|---|
productResult | object | { ok:true, data:{ product:{…更新后的完整商品} } } |
- 节点运行状态为成功。
- 输出变量中包含预期字段,且可被下游节点引用。
- 对外部系统有写入动作的节点,目标系统中的数据状态与配置一致。
| 现象 / 报错 | 可能原因 | 处理建议 |
|---|
| 找不到插件分组 | 插件未安装、未加载或当前端不是桌面客户端 | 在「扩展能力」中刷新/重新扫描插件,必要时重启客户端。 |
| 连接或鉴权失败 | 连接配置缺失、令牌过期或权限不足 | 重新配置连接,确认账号具备对应资源权限。 |
| 查询结果为空 | 筛选条件过窄、目标资源为空或页面状态不正确 | 放宽条件,检查资源 ID、日期范围和页面登录态。 |
| 写入类操作失败 | 参数格式不符合平台要求或目标资源不可写 | 先用少量测试数据验证,再检查必填字段、ID 和权限。 |
- 插件能力由桌面端扩展能力机制加载,和普通后端指令树不是同一数据源。
- 插件页按插件维度整理;每个节点的帮助入口会跳到所属插件页,页面内可查节点标识、参数和输出。