Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Hi,
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.
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: \"{{ product.id }}\", templateSuffix: "new-product"}) {
product {
id
templateSuffix
}
}
}