Shopify Flow - Duplicate SKUs on an order

I’ve tried several scenarios, but can’t seem to find a flow that will either:

  1. Email me when there are two line items with the same SKU on an order.

  2. Remove the duplicate SKU.

We have a third party app that adds a free gift to the cart when the subtotal is over $100 and a specific discount code is used, but it sometimes adds the product to the order twice (not a line item quantity of two, two separate line items with the same SKU/variant ID/product title). This seems to be a cart refresh issue. I want to catch these scenarios before the orders get shipped with two free gifts.

I know next to nothing about coding or writing queries. Any help is appreciated!

Hi @rossiedees , Lesle this side from Dollarlabs. We help brands solve for better promotions and loyalty use cases.

I can help setup a flow that will check if the same SKU ID is repeated more than one qty per order and notify you internally.

The flow will follow this structure, you’ll need to use the run code node as checking for the items in the order and keeping track is something that requires advanced logic written in code

Feel free to reach out / DM for any questions or assistance.

Happy to help :slightly_smiling_face: