Local Delivery orders default to prioritised Location rather than closest

Topic summary

Main issue: Local Delivery in Shopify assigns orders to the prioritised “Warehouse” location instead of the closer “Store,” even when the Store has the required inventory.

Context: Two locations (Warehouse and Store). Warehouse is prioritised for shipping, but this priority is overriding proximity for Local Delivery.

Impact: Local delivery routes may be less efficient, triggering fulfillment from a farther location despite stock availability at a nearer site.

Technical notes: Shopify “location priority” determines default fulfillment location. Based on the report, Local Delivery appears to use this priority rather than distance or nearest-inventory logic.

Request: A workaround to make Local Delivery select the closest location with available inventory.

Status: No responses or solutions yet; the question remains open and unresolved.

Summarized with AI on February 28. AI used: gpt-5.

Hi all,

We have recently started using Shopify’s built-in Local Delivery. We have 2 locations, Warehouse and Store. The Warehouse location is prioritised as that’s where we ship orders from if we can. The trouble we now have it Local Delivery prioritises the Warehouse location, even if the Store has all the inventory and is much closer by distance. Is there any workaround?

Thanks in advance.

Turn off “Local Delivery” for Warehouse?

If this is not an option, then limiting the delivery radius may help…
Read more at https://help.shopify.com/en/manual/fulfillment/setup/delivery-methods/local-delivery#set-up-the-local-delivery-option


if my post is helpful, please like it ♡ and mark as a solution -- this will help others find it

Hi @tim_1, thanks for the reply! The issue I have is we don’t have all the inventory at the Store so we need the Warehouse as an option. Similarly it gives us a wider reach in terms of where we can delivery to. Reducing the radius might impact a situation where the Warehouse has the inventory and we can no longer delivery to a zip code.

Really the ultimate solution would be different routing rules for shipping and local delivery. I also thought about creating different Store and Warehouse locations just for local delivery (i.e. turning off local delivery on the regular Store and Warehouse locations and enabling them on the new ones) which would allow me to add a routing rule for closest distance, which I’d apply only to those new locations. But it’s how to keep the inventory mirrored across them…

Maybe fiddle a bit more with order routing rules in Shipping and delivery – like prioritize the “Ship from the closest location” criteria …

I’d avoid the Synchronising inventory approach.

Thanks again @tim_1. The trouble with the routing rules is they apply to shipping and local delivery orders. For shipping orders we want to maintain the Warehouse priority. I can’t see a way to adjust these that would work for both shipping and local delivery unless I’m missing something?

One other thing I thought would be to adjust the routing rules so delivery distance is prioritised, then use Flow to switch shipping orders from Store to Warehouse after the order is placed where all inventory is available at Warehouse. However, I’ve tried something similar in the past and I believe a run code step is required to achieve this, which is just a bit beyond my technical ability.

Yes, unfortunately, it does look like the rules apply the same for both Shipping and Local Delivery.
Shopify has a new Function to enhance this but is’s still beta and Plus-only.

As for the Flow – it does have a “Move Fulfillment Order” action, so can potentially do that.
May be an option to try.
What do you think you’d need a “Run code” for?

Hi @tim_1, I appreciate your ongoing help with this. Good to see there is a beta feature available which will hopefully make its way to non-Plus customers in the future.

When I tried to create a similar Flow in the past, the move fulfilment order part was fine but there didn’t seem to be a way to check if the quantity to be fulfilled is less than or equal to the available inventory at Warehouse. I did post at the time and it was suggested that run code was required to compare 2 lists of data (line Item quantity and location inventory).

1 Like

Have you tried to just go ahead and try moving without checking?

API Manual says that it will check itself.

So the worst case is the flow will fail. You may have another flow to see if the move was successful.

@tim_1 Genius! I didn’t consider this. Let me give it a try and I’ll report back. Thanks again.

Hi @tim_1, unfortunately this doesn’t work in that it moves the fulfilment location even when that location doesn’t have the inventory. :cry:

If we can work out how to add a run code step to loop through the line items and ensure the Warehouse has enough inventory before moving the location, this solution will work.

Interesting. This contradicts the manual. Can’t test it hough.

You may not need a “Run code” still.
I’d try it like a screenshot below.
The idea is to loop over all items in the fulfilment order and if the item has not enough stock at warehouse, fail the flow.

Otherwise, move FO to warehouse after last iteration.

Hi @tim_1, thank you once again for this, I will test it today and report back.

On reflection, I think a Location stocking at item refers to it carrying the item rather than it having inventory:

Yes, but you can’t fulfil the item if you have no inventory, right?

Hi @tim_1, Shopify certainly allows you to fulfil if the item is stocked but there’s no inventory.

I’ve amended the Flow and switched it on. I don’t think it’s right because (unless I’m mistaken) it’s not checking the stock at the Warehouse specifically. I think it’s checking that the inventory item is stocked at the Warehouse (every item in our store is stocked at both Locations) and then the available quantity at both Locations:

It should not be like this.

The logic of condition should be:
For this lineItem it fetches a list of lineItem.variant.inventoryItem.inventoryLevels
and then
there is at least one inventoryLevel which
has location.name “Warehouse” and at the same time this inventoryItem.available is less then what we need to fulfil.

I can’t really see what I’ve done differently to yours (other than using Location ID rather than name, which I’ve just changed so we can compare like with like). This is what mine looks like. I have an additional condition step before the for each loop as I only want it to apply to shipping orders and there’s no need proceed if the order is already assigned to Warehouse. Otherwise I think it’s the same:

Once again, I really appreciate your continued help with this @tim_1.

Hi @tim_1, I actually think this is working, I just misunderstood the Flow run details. I am monitoring the runs and will update this thread again.

1 Like

Hi @tim_1, this is working perfectly. Thank you so much!

1 Like