How can I set up location-specific low stock alerts in my dual-warehouse setup?

New Member
7 0 0

I have two separate locations set up in my Shopify store - one for each warehouse. They are distinguished in Shopify with distinct location ID's and each location has its own pot of inventory - key point is that inventory is not shared across locations (aka warehouses). 


I want a low stock alert when a sku's inventory level drops to 0 or below at one of the warehouse. Currently, I have a flow set up to send an alert that looks like this:


  • Start when... inventory quantity changed
  • Check if... inventory quantity prior (for productvariant) is >0 AND inventory quantity is <=0
  • Do this... send an email

This flow works great for the entire pool of inventory and back when we had only 1 location, but we need it to only send an email when the stockout conditions are met at one of our two locations/warehouses.


Issue I'm having is that I'll have SKU 123 stock out at Warehouse 1, however Warehouse 2 might have 5 units of inventory of this SKU. I want to be notified about depletion at Warehouse 1, but Flow still sees 5 units at Warehouse 2 so it doesn't trigger an alert.


How do I add location-specific conditions? What fields do I use? THANK YOU!

Replies 2 (2)

Shopify Staff
1012 133 242

You can definitely check the inventory for a given location. The hard part is that you won't know the previous value of the inventory at that location because the trigger doesn't provide it (the prior quantity is for the variant across locations). So if you want to prevent getting notifications after the inventory hits 0, you need to use variant metafields to store the previous inventory. Here's a template for the Flow part of it:


If you are ok with duplicate notifications (or if you don't think you'll sell below 0), then you can remove the metafields part of the conditions and actions. 

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
1 0 0

Hey Paul, I'm looking for a same solution as the original post, I tried implementing the Flow you linked, but it's not working. If I check the Run log of the Flow I see that it's not matching the condition

Location / Name is equal to store name
As the value for Location / Name includes all locations that are activated for the product, seperated by comma.
Do you know how we can cross-match the value for Location an available quantities?