Limiting Discount Codes to First Time Purchasers Only

Limiting Discount Codes to First Time Purchasers Only

ACR1225
Visitor
1 0 0

Is there a way to create a limit on discount codes used for a single customer over their lifetime? We have customers using the Honey App (the bane of our existence), and code hopping. I'd like to create a limitation that a customer can only use one discount code, once. Basically, only new customers can use coupon codes unless otherwise specified. 

Replies 2 (2)

Sebastian-Sch
Shopify Partner
10 1 3

Hello ACR1225,

once you are in your discount code, you have the option here to set that the code can only be used once per customer.

 

SebastianSch_0-1739643372198.png

Best regards
Sebastian

tobebuilds
Shopify Partner
556 42 150

Hi ACR1225,

 

Your best bet is probably a three-step approach:

  1. Come up with a special tag to add to the account of customers who have used discounts. Maybe "has-used-a-discount"
  2. When an order is placed, if a discount has been applied, check if the customer has the tag.
  3. If they don't have the tag, add it to their account. Otherwise, cancel the order.

You can use either Shopify Flow (a free app provided by Shopify) or a custom app with webhooks to set this up.

 

I considered other approaches, but they won't work:

  • Shopify Cart/Checkout Validation Functions API: These would theoretically be the best way to block orders before they're even placed, but the Shopify Functions API does not provide information about which discounts have been applied to the cart.
  • Checkout UI extensions: You could maybe combine this with the Validation Functions API to set a cart attribute and block orders with that cart attribute, but... This API is only for Shopify Plus. (Not sure if you're on Plus, so I'm assuming you're not).
  • Shopify Discount Functions API: You could create discounts that don't apply to customers with a specific tag (for example, our app does this), but you'd still need a way to automatically add the tag to customer accounts.

 

Another possible idea is to create a customer segment that only contains customers without the "has-used-a-discount" tag. Then, use a script/custom app/etc. to modify all your discount codes to only be usable by that segment.

 

Hope this helps,

Tobe

Founder, Regios Discounts app (4.8 stars, 83 reviews, Built for Shopify)
- Custom discounts made simple
- "Just about any discount you'll ever need"
- Built by an ex-Google software engineer
- Often imitated, never duplicated