Change Product Template Based On Stock Quantity

Change Product Template Based On Stock Quantity

1 0 0



I'm trying to create a flow which will change the product template used by a product depending on the quantity in stock of the variants. I have the trigger working correctly using the "Product Variant Quantity Changed" with "Product has out of stock variants equal to 0 - True/False" but cannot find the field in the actions which needs updating to make the change.

Reply 1 (1)

Shopify Staff
3 1 1

Hello! We currently don't have any Actions to update the product template directly. But you can use the SendHTTPRequest action to send a GraphQL mutation to update the product template used. In the example section of the SendHTTPRequest action docs there is a sample of how to use it to send a GraphQL request to Shopify Admin to update a product, you could follow that and instead of updating the product description like in the example you can update the `templateSuffix` property:


mutation {
    productUpdate(input: {id: \"{{ }}\", templateSuffix: "new-product"}) {
        product {



Mat_w | Flow Software Developer @ Shopify
- Finding Flow useful? [Leave us a review](
- Need Flow help? Check out our [help docs](
- Building for Flow? Check out [Flow's dev docs](