Preserve pickup in store fulfillment after order edits via the Admin API

We have a Shopify store connected to a Point of Sale System via middleware which handles the transformation, dispatching etc. logic. We have the option for a customer to select a pickup in store delivery type for their order. If either the customer changes their mind about a product or the store is out of stock of the specific item, the order will be edited on the Point of Sale backoffice system. That event is then sent to the middleware where it handles editing the order on Shopify. In our flow we have tried two different methods of editing the order and then ensuring it gets marked ready for pickup to notify the customer:

  • Mark the order ready for pickup and then edit and commit the edited order.
  • Edit and commit the order and then mark ready for pickup.

Unfortunately we have found that when we use option one, we are able to mark the order as ready for pickup, edit and commit the new changes but the fulfillment location reverts to the first location (alphabetically) on our locations list (which does not match the location the order was created for) even though we pass in the location when adding a variant to the edit. When attempting to fulfill the order we then get a fulfillment id error as the method has also defaulted to shipping instead of pickup in store.

With option two we are able to edit and commit the changes but then cannot mark it ready for pickup as we get the same fulfillment id error as above. The delivery type defaults to shipping and the location to the first in the list of our locations (alphabetically).

We have been using the move fulfillment location mutation to ensure that the location gets changed but the delivery type continues to default to shipping, meaning we cannot mark it ready for pickup after the edit.

Does anyone have any suggestions on how to change the delivery type back to the original type from the original order OR how to ensure that we can notify the customer it is ready for pickup after committing the edits?

Having a feature on the admin api to amend delivery type would be a massive win.

Hi @Justin_Vorster

From digging into this it does seem that is a known limitation in how Shopify handles order edits for pickup orders. When you commit an order edit using orderEditCommit, Shopify automatically regenerates the fulfillment orders, which can cause:

  1. Location reversion - The fulfillment location defaults to the first location alphabetically
  2. Delivery method change - The delivery method changes from PICK_UP to SHIPPING

This happens regardless of whether you mark the order ready for pickup before or after committing the edit.

The only reliable way to ensure the correct delivery method is to avoid triggering the condition that causes the fulfillment order to revert to shipping. This may mean re-examining how the order is edited in your middleware or POS system.

If you must edit the order, consider canceling the original fulfillment order and creating a new one with the correct delivery method and location, but this is not always possible or desirable.