Associating buyer location with inventory location

Hi,

We are based in the UK and originally had 1 UK DC that fulfilled all of our worldwide orders.

We have recently set up an EU DC to fulfil only orders for EU countries (due to Brexit related issues) and we have everything set up and working with our DCs’ software so that EU orders go to EU DC location and everything else goes to the UK DC location. The inventory of each location shows correctly in Shopify also.

The problem we now have is that our Shopify store doesn’t associate the location of the buyer with the inventory available in their DC location. If it’s in stock anywhere, it will complete the order. So for example, if a product is sold out in our EU DC but still in stock in the UK, a customer from Germany can still complete the purchase. But when the order is pushed to the EU DC is will go to backorder as no stock available.

Is there a way to make Shopify consider the buyers delivery location at the point of purchase so it stops them from placing the order if it’s out of stock at the right DC?

Thanks!