Autamatic Best sellers collection

Autamatic Best sellers collection

FlashChoices
Tourist
10 0 5

Hi there! Im using the Flow app for some tagging purposes such as New Arrivals, but I cannot really figure out how to set it for Best sellers. I want to make a collection that updates based on last 30 days best selling products.

Replies 11 (11)

Kalen_Jordan
Shopify Partner
803 39 147

You should be able to do this with a flow that saves a last 30 day sales total metafield to products on the order trigger - and then use that to define a collection. Depends on order volume though because flow is limited in how much data int can pull in at once.

FlashChoices
Tourist
10 0 5

Can you show me how this can be done as Im trying for several days now and cant figure it out?

 

Kalen_Jordan
Shopify Partner
803 39 147

Sorry my ability to provide free help here is limited, but if you're interested in help on a paid basis, the link is in my signature.

Robert_Kanaan
Shopify Partner
91 11 23

@FlashChoices - Give this a go:

 

First create a new Product Metafield (e.g. "Last Purchased Date") with type Date Time

 

Create new workflow as follows:

Start when: Order created

  • For each item in order.lineItems
    • Add products to collections (select "Best Sellers" Collection)
  • For each item in order.lineItems
    • Update product metafield "Last Purchased Date" with value {{order.createdAt}}
  • Wait for: 30 days
    • For each item in order.lineItems
      • Check if "Last Purhase Date" value is equal to order created at
        • Remove products from collection "Best Sellers"

 

Robert Kanaan | Web Developer @ GoVedia
Building apps & custom solutions
robert@govedia.com
https://govedia.com
FlashChoices
Tourist
10 0 5

Hi Robert Kanaan! Thank you for your reply! Can you show me how this needs to be done as Im trying now for 3 hours and cant figure it out.
This is what I made

FlashChoices_0-1729015554432.png

 

FlashChoices_2-1729015741169.png

 

FlashChoices_3-1729015752267.png

 

FlashChoices_4-1729015816032.png

 

Robert_Kanaan
Shopify Partner
91 11 23

Hi @FlashChoices - sure, here's what it looks like in Flow. Refine and test as needed.

best-sellers-flow.PNG

Robert Kanaan | Web Developer @ GoVedia
Building apps & custom solutions
robert@govedia.com
https://govedia.com
FlashChoices
Tourist
10 0 5

Hi Robert! Thank you for that. Will test it right now

 

FlashChoices
Tourist
10 0 5

I have done the flow, but not sure of these 2 are correct. Could you please check on them? Thank you!


FlashChoices_0-1729017044725.png

FlashChoices_1-1729017054654.png

 

 

Robert_Kanaan
Shopify Partner
91 11 23

@FlashChoices  Here's a closer look at those two. Make sure your using the correct namespace and key for the date time metafield you created.

flow-2.PNG

flow-3.PNG

 

Robert Kanaan | Web Developer @ GoVedia
Building apps & custom solutions
robert@govedia.com
https://govedia.com
FlashChoices
Tourist
10 0 5

Thank you Robert! Will try to make it that way and will wait for the day to see if it triggers correctly. Thank you once again for your help! 

 

FlashChoices
Tourist
10 0 5

Sorry about that but I cant really find that value lineItemsForeachitem.product.lastPurchaseDate.value. Im only reaching to lineItemsForeachitem.product. and from there I cant find the rest of it. Can you help with that? Thank you!

 

FlashChoices_0-1729019145890.png