Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
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
}
]
}
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.
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024