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
}
]
}




