Hey all,
I have been trying to figure out a way to set my inventory levels to match my metafield value. We are using a PIM that regularly updates metafields and currently it’s our best way to automate stock levels. Essentially every product has a metafield called “Website Available Inventory” with namespace and key: web_available_inventory.web_available_inventory
I was able to manually set a single item’s inventory with the following (successfully):
So I know the settings are all correct and I just need help with the Body. However when I try to update it to a for each loop to iterate through every product and then use it’s metafield.value where the key is equal, I get error 400.
Any guidance would be greatly appreciated!


