Solved

Change product status for certain products

formandfold
Visitor
1 0 0

Hi, I need to draft certain products at a specific time but I can't get the flow to work. I either want to filter by product title or tag. See attached. Any idea where I'm going wrong?

Screenshot 2024-03-26 at 9.26.36 am copy.jpg

 

Accepted Solution (1)

DaveMcV
Shopify Staff
87 26 24

This is an accepted solution.

Hi @formandfold,

It's hard to diagnose what might be happening without more information about what is not working. 

 

One thing to check is in the Get product data action, the default number of items returned is 10. You can set this as up to 100. See the attached screenshot for where to edit that. If you have over 100 products, they will not work.

Screenshot 2024-03-25 at 9.12.06 PM.png

 

It would also be worth looking into the Shopify API Search Syntax to write an Advanced query to filter the product data based on the Product API spec. As a tip, this is the same syntax that is used on the product list in the Admin when you enter a custom query. So you can test your query logic to see what products get returned. Based on what I see in your example, it could be worth replacing the condition with a query like:

title:*Pool*

 

That example uses the Product's title field, but your logic may vary. Here's how it could look in a Workflow:

DaveMcV_0-1711416019303.png

 

 

Hope that helps!

DaveMcV | Flow Development 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

Reply 1 (1)

DaveMcV
Shopify Staff
87 26 24

This is an accepted solution.

Hi @formandfold,

It's hard to diagnose what might be happening without more information about what is not working. 

 

One thing to check is in the Get product data action, the default number of items returned is 10. You can set this as up to 100. See the attached screenshot for where to edit that. If you have over 100 products, they will not work.

Screenshot 2024-03-25 at 9.12.06 PM.png

 

It would also be worth looking into the Shopify API Search Syntax to write an Advanced query to filter the product data based on the Product API spec. As a tip, this is the same syntax that is used on the product list in the Admin when you enter a custom query. So you can test your query logic to see what products get returned. Based on what I see in your example, it could be worth replacing the condition with a query like:

title:*Pool*

 

That example uses the Product's title field, but your logic may vary. Here's how it could look in a Workflow:

DaveMcV_0-1711416019303.png

 

 

Hope that helps!

DaveMcV | Flow Development 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.