Re: Shopify Flow Compare-at Price

Solved

How to trigger updates for product variants with compare-at price in Flow?

ap96
Tourist
6 0 1

I'm currently setting up a Flow that will check if a product variant has a compare-at price that exists and then have it update one of the product's metafields to filter it by sale one our website. The problem I keep running into is finding the proper trigger. Ideally the trigger would be "when the price updates" but that isn't an option. Wondering if anyone knows any work around for this? 

Accepted Solution (1)
paul_n
Shopify Staff
1494 161 349

This is an accepted solution.

  1. Schedule trigger
  2. Get product data
  3. For each loop. For each item - product :
    1. Condition
      1. Action
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 14 (14)

paul_n
Shopify Staff
1494 161 349

There isn't a shopify event for "price changed" yet. You could use a scheduled trigger (every hour) and then "Get product data" to get products that changed in the last hour. Then check conditions for each of the returned products and do something.

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.
ap96
Tourist
6 0 1

Ooooooh! Okay.  I've been trying to play around with the "Get product data" but I'm not sure how to check the conditions for each option, if that makes sense haha.

paul_n
Shopify Staff
1494 161 349

This is an accepted solution.

  1. Schedule trigger
  2. Get product data
  3. For each loop. For each item - product :
    1. Condition
      1. Action
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.
ap96
Tourist
6 0 1

Thank you Paul! I got it set up and it's working smoothly 🙂

Newbie10
Tourist
13 0 3

Hi, Do you mind attaching a screenshot of this flow? I'm struggling to make it work on my end. Thanks!

formandfold
Tourist
4 0 0

I would like to see this too! Was this ever shared?

paul_n
Shopify Staff
1494 161 349

See what exactly? You can replicate it by adding the steps to the canvas.

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.
formandfold
Tourist
4 0 0

a screenshot of this flow

paul_n
Shopify Staff
1494 161 349

Not sure how that helps, but here you go: 

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.
formandfold
Tourist
4 0 0

Thank you!

Newbie10
Tourist
13 0 3
I’ll add a screenshot later today.
zaidkhan
Shopify Partner
15 0 1

The product_updated query works just fine to listen for products that were updated.
The problem for me is not all products are updated all the time and I still want to take action on those items.
If I use the query product_created to update all products on my store, it only fetches the first 100 products even if I repeat the schedule.
Anybody has a workaround for this?

paul_n
Shopify Staff
1494 161 349

What you are trying to do isn't 100% clear. But one way to handle that it to check `tag_not:processed` and then add a "processed" tag in the workflow so that the product doesn't show up again in the 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.
zaidkhan
Shopify Partner
15 0 1

Hello Paul_n,
 Thanks for getting back on this. here is the problem statement:
  I want to disalow shopify coupons for any items that are on sale. For that I have to add a metafiled on the product to indicate that the item is not on sale and than create a collection for non-sale items. I got the conditions right. To populate  all the products according to the price conditions I have to loop through the whole store which is roughly 1500 products. later on I will switch to 'updated_at' query when the metafields are in place. I did like your suggestion and I am going to work on that.