How to schedule product unavailability on Shopify?

Solved

How to schedule product unavailability on Shopify?

Ricarda
Shopify Partner
6 0 12

Dear community,

right now we are having a sale on our edding nailpolish on our shop. After the 31st of March I have to make these products unavailable.

However, I can only seem to schedule the availability to PUBLISHED on the product pages, so I wanted to create a Shopify flow for this. 

I am having trouble with getting the query for product data right. Does someone know where the error  is? 

Ricarda_0-1679051903669.png

This is the test workflow I ran to see if it would work, but the Test tag was not added 😕

Ricarda_1-1679051954957.png

 

Accepted Solution (1)

paul_n
Shopify Staff
1336 151 305

This is an accepted solution.

Yeah, you might want to check out the docs linked to from our help center article. The relevant GraphQL query is here: https://shopify.dev/docs/api/admin-graphql/2023-01/objects/QueryRoot#connection-queryroot-products

Edit:
Here's the flow doc as well: https://help.shopify.com/en/manual/shopify-flow/reference/actions/get-product-data

 

TL:DR... use `product_type` not `ProductType`. I'd also recommend testing this in PostMan or another HTTP client tool first to make sure the query and data matches what you expect.

Paul_N | Flow Product Manager @ 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.

View solution in original post

Replies 2 (2)

paul_n
Shopify Staff
1336 151 305

This is an accepted solution.

Yeah, you might want to check out the docs linked to from our help center article. The relevant GraphQL query is here: https://shopify.dev/docs/api/admin-graphql/2023-01/objects/QueryRoot#connection-queryroot-products

Edit:
Here's the flow doc as well: https://help.shopify.com/en/manual/shopify-flow/reference/actions/get-product-data

 

TL:DR... use `product_type` not `ProductType`. I'd also recommend testing this in PostMan or another HTTP client tool first to make sure the query and data matches what you expect.

Paul_N | Flow Product Manager @ 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.
Ricarda
Shopify Partner
6 0 12

Hi Paul!

Thank you very much. This helped a lot in creating my first custom flow 😎