Currently on GQL API 2024-07 (working on migrating to 2025-04
)
I’m noticing that the fulfillmentOrder.deliveryMethod.serviceCode
gets set when an order is created, using data from order.shipping_lines
, but it never seems to get updated when the order.shipping_lines
change.
For example, I create an order with “Standard Shipping”, and a fulfillment order gets created with deliveryMethod.serviceCode: "Standard Shipping"
. But if I cancel the fulfillment request on that fulfillment order, edit the shipping on the order to something like “Economy Shipping”, then submit a new fulfillment request the new fulfillment order that gets generated still has deliveryMethod.serviceCode: "Standard Shipping"
even though the order shipping_lines
shows “Economy Shipping” as the most recent in the array of values, and the “Standard Shipping” shipping line is marked as is_removed: true
.
When the new fulfillment order gets generated I would expect it to have the new shipping info of deliveryMethod.serviceCode: "Economy Shipping"
, but that’s not happening. Is this a bug, or intended behavior? If it’s the latter, then what is the point of the deliveryMethod
field on fulfillment orders?
Hi @ktbishop - Based on the available documentation and Shopify’s fulfillment order model:
- The
deliveryMethod.serviceCode
on a FulfillmentOrder
is set at the time the fulfillment order is created, using the shipping information from the order’s shipping_lines
.
- If you change the shipping method on the order (e.g., from “Standard Shipping” to “Economy Shipping”) after the fulfillment order is created, and then cancel the fulfillment request and submit a new one, the new fulfillment order may still reflect the original shipping method in its
deliveryMethod.serviceCode
.
This is intended behavior. The fulfillment order’s delivery method is not automatically updated to reflect changes in the order’s shipping lines after the fulfillment order has been created. The fulfillment order is designed to represent the fulfillment process as it was at the time of its creation, including the shipping method that was selected at that time.
Where in the documentation is it mentioned that the deliveryMethod.serviceCode
is only set “at the time the fulfillment order is created”? I’m lookin at the docs and all I see is:
Also, by saying “set at the time the fulfillment order is created”, you’re just restating the problem. When a Fulfillment Request is cancelled, and then a new Fulfillment Request is created, a new Fulfillment Order is created as well. If a ship method change was made in between the cancellation of the original Fulfillment Request and the creation of the new Fulfillment Request (and the new Fulfillment Order), then it would stand to reason that the new ship method values should be “set at the time the fulfillment order is created” (in this case, on the new Fulfillment Order created by the new Fulfillment Request).
The fact that this doesn’t work the way you’re describing it effectively makes this field useless.