Product Type - Update using Flow App

Product Type - Update using Flow App

gary07
Excursionist
65 0 11

Hi 

 

Is there any way to Fetch all the products (approx 5000) check the Product type Value and update the value using the Flow condition

 

Or 

 

Trigger the flow when the product updates to let's say update the title or tag or update meta field value then trigger the flow to don't need to fetch all the products

gary07_0-1721657552776.png

 

Replies 7 (7)

paul_n
Shopify Staff
1509 164 353

Edit: sorry, I thought you started another thread that was worded similarly. See https://community.shopify.com/c/shopify-flow-app/shopify-flow-product-organisation/td-p/2672155

 

FYI, you can query by "product_type", see filter docs here: https://shopify.dev/docs/api/admin-graphql/2024-04/queries/products#argument-query-filter-product_ty...

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.
gary07
Excursionist
65 0 11

Hi Paul,

 

I am trying to update and delete the custom product type but this does not update if I used 

 

{
"input": {
{{getProductDataForeachitem.handle}},
"customProductType": ""
}
}

 

 

gary07_0-1721834758333.png

 

paul_n
Shopify Staff
1509 164 353

That input doesn't look valid. You need the ID of this thing you want to update. And that handle you are inserting isn't mapped to a key in the JSON. 

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.
gary07
Excursionist
65 0 11

Hi Paul

 

I am using the below getproduct condition to remove the preorder tag but it removes the tag from the variant.inventory_policy:continue

 

tag:preorder AND variant.inventory_policy:deny AND updated_at:<='{{ scheduledAt }}' AND updated_at:>'{{ scheduledAt | date_minus: "1 day" }}'

 

gary07_0-1721915936903.png

 

paul_n
Shopify Staff
1509 164 353

This is not valid: variant.inventory_policy:deny 

 

I don't think you can query by inventory policy on a product. You should instead at a condition to check that field before removing the tag.

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.
gary07
Excursionist
65 0 11

Do u know if Product Type can called in query ?

paul_n
Shopify Staff
1509 164 353

The docs I just mentioned list all of the available queries: https://shopify.dev/docs/api/admin-graphql/2024-04/queries/products#argument-query

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.