Low stock under 3 Products Set to Zero with multiple locations - Flow Automation

Topic summary

A user is attempting to automate inventory management across multiple Shopify locations using Shopify Flow. The goal is to automatically set product variant inventory to 0 when stock drops to 2 or less.

Current Setup:

  • Trigger: Inventory Quantity Changed
  • Condition: Check if inventory < 3
  • Action: Send HTTP request to update inventory to 0

Problem:
The flow works correctly for a single location but fails when attempting to update multiple locations simultaneously. The user tried sending a single HTTP request with an array containing multiple location IDs, but this approach did not work.

Solution Provided:
A separate HTTP request is required for each location. The recommended approach is to:

  • Use a “For each” loop to iterate through locations
  • Send individual requests per location ID
  • Processing locations one-by-one (1x1) is acceptable for this use case

The discussion includes screenshots showing the Flow configuration and the attempted (but unsuccessful) multi-location HTTP request structure.

Summarized with AI on November 11. AI used: claude-sonnet-4-5-20250929.

I have multiple locations where I need to set the inventory of each product variant to 0 if the current inventory is 2 or less.

If there was an action feature to update stock quantity in Shopify Flow, this would solve my problem. I can set the logic as:

Trigger: Inventory Quantity Changed

Then: Check if inventory is less than 3

Action: Update inventory quantity to 0
Send HTTP Request:

Complete Flow

This flow is functioning correctly for a single location. However, I have multiple locations where I need to set the inventory of each product variant to 0 if the current inventory is 2 or less.

I attempted the following HTTP request, but it did not work:

{
“locations”: [
{
“location_id”: 84738277671,
“inventory_item_id”: “{{productVariant.inventoryItem.legacyResourceId}}”,
“available”: 0
},
{
“location_id”: 84738179367,
“inventory_item_id”: “{{productVariant.inventoryItem.legacyResourceId}}”,
“available”: 0
},
{
“location_id”: 93070983463,
“inventory_item_id”: “{{productVariant.inventoryItem.legacyResourceId}}”,
“available”: 0
}
]
}

1 Like

You need a separate request for each of those.

You could probably also loop over the locations for the inventory item and put the location id in via a loop. (Use “for each”).

But doing that 1x1 is fine.