Creating Coupon based on Customer Lifetime Spend

How can you create a coupon code based on lifetime spend.

For example, if a customer has spent over $500 get 5% discount.

Hi @Brandon_Heng

To achieve the same you would need a custom app.

Which will follow below steps

  1. Get customer’s id or every successful order.

  2. Access customer data using retrieved customer ID from order webhook.

  3. Check for your threshold amount value with total_spent from customer json object. Which has the total spent amount.

Below is the customer api

https://shopify.dev/docs/api/admin-rest/2022-04/resources/customer

  1. Create instant and personalized coupon code for that category.

Hope it helps…