Great trying it out
Topic summary
Goal: change a product variant’s “allow overselling” via Shopify Flow.
-
Approach: Use Flow’s “Send HTTP Request” to call the Admin GraphQL mutation productVariantUpdate and set inventoryPolicy to CONTINUE (allows overselling). Use POST to https://.myshopify.com/admin/api/latest/graphql.json with valid headers and an access token from a custom/private app.
-
Debugging: Initial failures were due to using GET instead of POST, a missing /admin/ in the URL, and incorrect key–value header formatting. After fixing these, the mutation succeeded and overselling could be set to “Continue.” Screenshots showed the misconfigurations during troubleshooting.
-
Next task: Create a second Flow condition to compare a variant’s inventoryQuantity to a variant metafield (smartpack.po-qty). Current options are: (1) build a Condition that reads the metafield and insert the inventory variable via the <> selector, or (2) use “Run code” to compute the comparison (example repo provided). A release improving metafield access is “very soon,” but timing may slip.
-
Status: Overselling update solved. Metafield comparison is being tested; an issue remains about conditions evaluating metafields across different variants in an order (no final resolution yet).