Updating a published product status to draft at a set time

Updating a published product status to draft at a set time

SGM24
Visitor
2 0 0

I am trying to automatically change products in our store to draft at a set time via Flow and have not had any success. If anyone can help/ walk me through the if this is possible that would much appreciated,

Replies 3 (3)

RPiii
Shopify Staff
160 27 48

Hi @SGM24 👋 Depending on your goals, this might be possible with a Scheduled time trigger followed by a Get product data action that queries for the relevant products and then an Update product status action to change those products to draft.

SGM24
Visitor
2 0 0

What we are trying to do is create a online ticketed event without having to spend any money on an app. Therefore we need the product to be automatically set to draft at a certain time before the event to suspend sales. I have tried to set up a flow as you have mentioned but I struggle with knowing how to use the get product data for just products that we need to suspend sales on. Can you find individual products by product title with Get product data action.

RPiii
Shopify Staff
160 27 48

You can find products by a number of attributes, such as title or tags, by defining a query in Get Product Data action. The documentation contains a link to the available product filters as well as guidance on syntax. You can test queries in your shop by using the Shopify GraphiQL app to ensure it returns what you expect.