发货报 fulfillment order not assigned
现象#
用自建发货服务给订单发货,fulfillmentCreate 返回 The fulfillment order is not assigned to the requesting fulfillment service,订单仍停在未发货。
原因#
- fulfillment order 已指派给某个地点,只有拥有该地点的服务才能为它创建 fulfillment
- 应用拿的是 write_assigned_fulfillment_orders,却去操作商家自管地点的履约单
- 一次请求里混入不同地点的 fulfillment order,服务端为保一致性拒绝整批
- 订单改过地址或拆过包裹,旧履约单被关闭,手里的 ID 已经失效
处理步骤#
- 查
fulfillmentOrders,读出每节点assignedLocation与supportedActions - 按地点分组,每个地点单独发一次
fulfillmentCreate,不要合并提交 - 自管地点补上
write_merchant_managed_fulfillment_orders并让商家重新授权 - 确认
status为OPEN,已是 CLOSED 的换新 ID 再发 - 第三方服务场景改走
fulfillmentOrderAcceptFulfillmentRequest的接单流程
验收标准#
响应里 fulfillment.status 为 SUCCESS,订单页履约状态变为已发货,且该履约单在 fulfillmentOrders 中状态为 CLOSED。
本文由 风格技术 技术团队整理,适用于 Shopify 标准版与 Plus 店铺。Shopify 平台能力迭代较快,具体操作路径与字段以官方文档和店铺后台实际版本为准。