Borti
April 4, 2024, 12:03pm
1
Hi there,
I’m having problems when creating a flow.
Currently we have in the store many discounted products (priced below their price in comparison)
What I intend to do with the flow is to go through all the products identifying those that have a discount equal to or greater than 50%
If the condition is met, it adds the label “50_off ” to the product, otherwise it does nothing.
In my opinion, I think that apparently the logic is good, but it is not working.
This is the flow
In the first “Then” after executing the trigger, the rule of the image_A is executed.
Then image_B is executed.
Finally image_C is executed where the label is added.
Can someone help me?
Thanks.
2 Likes
paul_n
April 4, 2024, 1:06pm
2
You may need to read up on the query syntax. compareAtPrice is not an available filter and you cannot add math to the query.
These docs link to help on the query syntax and the filters:
https://help.shopify.com/en/manual/shopify-flow/reference/actions/get-product-variant-data
Filters are here… there isn’t a filter for price on variants:
https://shopify.dev/docs/api/admin-graphql/2024-04/queries/productVariants#argument-query
The closest I could find is on the product query:
https://shopify.dev/docs/api/admin-graphql/2024-04/queries/products#argument-query-filter-is_price_reduced
1 Like
Looks like this may not be possible to do in Flow, since there isn’t a supported filter on the compareAt price. If you’re open to 3rd party apps, we have a database that you can pull products into and you can use that to identify products with specific discount rates and then build workflows on top of that.
This is an example of a workflow that uses the database, but I can build something out for your use case here.