Hide/Show Product based on lowest Cost (Shopify Flow)

dancartis
Visitor
2 0 0

Hello,

 

Objective: we have duplicate SKU/Barcode items from different suppliers.  We only want to list the in-stock product with the lowest unit cost.

 

I believe we can accomplish this using Flow but I am open to ideas.  My plan is to create as much of an automated process as possible that captures:

IF
  duplicate Barcode and In-Stock

THEN

  Compare Unit Cost

 

Action: tag lowest Unit Cost item and list in store

 

I tried multiple different workflows but kept hitting a wall at different points.

Replies 2 (2)

paul_n
Shopify Staff
1005 133 240

The solution might depend on how these products enter the system with duplicate skus. Also, are the variants always on the same product or different products? Tags are at the product level, so depending on how that works this might not be possible (or you need to use metafields)

Product variant added

  • Get product variant data (sku:{{variant.sku}})
  • for each (variant)
    • if getVariant.id != variant.id
      • if getVariant.price > variant.price
        • add product tag
      • else:
        • add product 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.
dancartis
Visitor
2 0 0

Thank you.  I will try again and see how close I can get.  I have entered the test products like this in our system:

 

  • SKU/barcode: OASTORE1/12345678912345
    • One product exists at Pitman Creek location with 4.99 unit cost but out of stock
    • One product exists at DSG Outerwear location with 6.99 unit cost
    • One product exists at Kenetrek Boots location with 7.99 unit cost