Back to blog
automatic discount codesVIP discountShopify loyaltyloyalty rewards

How to Create Automatic VIP Discount Codes That Customers Actually Use

Learn how to set up automatic discount code generation in your Shopify loyalty program. Configure percentage, fixed amount, and free shipping rewards that customers actually redeem.

March 31, 20269 min read

You set up a loyalty program. You created rewards. And then... nothing. Customers accumulate points but never redeem them. Sound familiar?

Here is the problem: most loyalty programs require customers to manually redeem their rewards. They need to log in, navigate to a rewards page, click "redeem," copy a code, go back to their cart, and paste it in. That is six steps between earning a reward and using it. Every step is a drop-off point.

Automatic discount codes eliminate all of those steps. When a customer levels up, a unique discount code is generated instantly via the Shopify API, delivered to the customer, and ready to use at checkout. No manual redemption, no forgotten rewards, no friction.

In this guide, we will cover how automatic discount code generation works, the three reward types you can configure, and the settings that make the difference between codes that collect dust and codes that drive repeat purchases.

Why Manual Discount Codes Fail

Before diving into automation, it is worth understanding why the manual approach loses money.

The Redemption Problem

Industry data tells a stark story: $48 billion in loyalty points go unredeemed every year in the US alone. That is not just wasted customer value -- it is wasted marketing spend. Every unredeemed reward represents a customer who earned something but never came back to use it.

The reasons are predictable:

  • Friction kills action. Every additional step between earning and using a reward reduces redemption rates. Manual redemption adds 4-6 unnecessary steps.
  • Out of sight, out of mind. Customers forget they have rewards. Without a prompt at the moment they earn, the reward disappears from their mental model.
  • Confusion over "how to redeem." Points balances are abstract. Customers often do not know how many points they need or what they can get. They give up before trying.

The Autopilot Advantage

Automatic codes solve all three problems at once. The reward arrives the moment it is earned, with a concrete discount code and clear instructions. The customer does not need to figure anything out -- they just use the code at checkout.

Active reward redeemers generate 115% higher revenue per customer and maintain a 50% repeat purchase rate compared to just 10.7% for non-redeemers. The goal is not to give away more discounts -- it is to make sure the discounts you give actually get used.

How Automatic Discount Code Generation Works

Here is what happens behind the scenes when a customer levels up in a system like LevelUp Loyalty:

The Technical Flow

  1. Customer earns XP from a purchase, signup, or other configured action
  2. Level engine checks whether the customer's total XP has crossed the next level threshold
  3. Level-up triggers reward engine which reads the reward configuration for that level
  4. Reward engine calls Shopify's GraphQL API (discountCodeBasicCreate mutation) to create a unique discount code with your configured parameters
  5. Unique code is stored in the customer's record and visible in their loyalty widget
  6. Customer is notified via the storefront widget (and optionally email) with their new code

The entire process takes less than a second. By the time the customer sees their real-time level-up notification in the widget, their discount code is already created and ready to use.

Why Unique Codes Matter

Each customer receives a unique, randomly generated discount code -- not a shared code like "LOYALTY10." This is important for three reasons:

  • Prevents code sharing. A unique code cannot be posted on coupon sites and used by non-members.
  • Enables tracking. You can see exactly which customer used which reward, tying redemption back to your loyalty program's ROI.
  • Allows usage limits. Each code can be limited to single use and tied to a specific customer.

Three Reward Types You Can Automate

Not all discounts are created equal. The right reward type depends on your margins, your AOV, and what motivates your specific customers.

1. Percentage Discount

Best for: Stores with consistent margins across products.

LevelDiscountExample
Silver10% off$50 order = $5 saved
Gold15% off$50 order = $7.50 saved
Platinum20% off$50 order = $10 saved

Percentage discounts scale naturally with order size. Higher-value orders get a bigger absolute discount, which encourages customers to add more to their cart. The downside: on very large orders, the discount amount can exceed what you are comfortable giving away.

Pair percentage discounts with a minimum order requirement. "15% off orders over $40" protects your margins while still feeling generous.

2. Fixed Amount Discount

Best for: Stores that want predictable, capped discount costs.

LevelDiscountExample
Silver$5 offAny order = $5 saved
Gold$10 offAny order = $10 saved
Platinum$20 offAny order = $20 saved

Fixed discounts give you precise control over your reward budget. You know exactly how much each redemption costs. This makes budgeting straightforward and pairs well with monthly budget caps.

Set a minimum order value higher than the discount amount. "$10 off orders over $30" ensures the customer is still spending meaningfully.

3. Free Shipping

Best for: Stores where shipping costs are a purchase barrier.

Free shipping is the most underrated loyalty reward. Nine out of ten online shoppers cite free shipping as their top incentive to buy. When free shipping is locked behind a loyalty level, it creates a powerful reason to stay engaged with your program.

Unlike percentage or fixed discounts that reduce your product revenue, free shipping absorbs a cost you may already be partially subsidizing. For many stores, the per-order shipping cost ($5-8 for domestic) is a small price for a guaranteed repeat purchase.

Make free shipping your mid-tier reward (Gold level). It is high-perceived-value for customers but often lower actual cost than a percentage discount on a large order.

Configuration Settings That Drive Redemption

The difference between a discount code that drives a purchase and one that gets ignored often comes down to five settings.

1. Expiration Period

Recommended: 30 days.

Codes without expiration dates do not create urgency. A code that is always available is a code that is never urgent. Thirty days gives customers enough time to plan a purchase without feeling rushed, while still creating a deadline that motivates action.

Too short (7 days) feels punitive. Too long (90+ days) loses urgency. Thirty days is the sweet spot for most Shopify stores.

2. Usage Limit

Recommended: One use per customer.

Single-use codes protect your margins and make each reward feel special. If a customer can use their 15% code repeatedly, it stops being a reward and starts being a permanent price reduction.

Shopify's discount API supports both total usage limits and per-customer limits. For loyalty rewards, always set the per-customer limit to 1.

3. Minimum Order Requirement

Recommended: Set one, but keep it reasonable.

A minimum order requirement protects you from customers using a $10 discount on a $12 order (effectively 83% off). But set it too high and the code feels unreachable.

A good rule of thumb: set the minimum at 1.5-2x the discount value. A $10 discount should require a minimum $20-25 order. This ensures meaningful revenue on every redemption while keeping the reward accessible.

4. Discount Combinations

Recommended: Allow combination with shipping discounts only.

Shopify supports three combination settings: combine with product discounts, combine with order discounts, and combine with shipping discounts. For loyalty rewards, the safest configuration is:

  • Product discounts: No (prevents double-dipping with sale items)
  • Order discounts: No (prevents stacking with other promo codes)
  • Shipping discounts: Yes (customers expect to stack free shipping with product discounts)

5. Customer Selection

Recommended: All customers (code is unique anyway).

Since each generated code is unique and single-use, you do not need to restrict it to a specific customer segment at the Shopify level. The code itself is the access control -- only the customer who earned it has it.

Setting Up Automatic Rewards in LevelUp Loyalty

Here is how to configure automatic discount code generation in LevelUp Loyalty, step by step:

Step 1: Define Your Levels

Navigate to the Levels section in your LevelUp dashboard. Create your tiers with XP thresholds. Each level can have its own reward configuration.

Step 2: Choose Reward Type

For each level, select the reward type: percentage discount, fixed amount, or free shipping. You can mix types across levels -- for example, 10% off at Silver, $15 off at Gold, and free shipping + 20% off at Platinum.

Step 3: Set Discount Parameters

Configure the value, minimum order requirement, usage limit (1 per customer), expiration period (30 days recommended), and combination rules.

Step 4: Configure Budget Controls

If you are concerned about reward costs, set up monthly budget caps and per-customer limits. This ensures your automatic rewards stay within your planned marketing spend.

Step 5: Test

Use a test customer to trigger a level-up and verify the discount code appears in Shopify's discount admin. Check that the code works at checkout with the correct value, minimum, and restrictions.

LevelUp Loyalty's AI onboarding can configure your levels, XP rules, and reward parameters automatically based on your store's product mix and price range.

Reward Configuration Examples by Store Type

Different stores need different reward strategies. Here are three configurations optimized for common Shopify store profiles:

Fashion Store (AOV: $65)

LevelXP RequiredRewardMin OrderExpires
Newcomer0Welcome: 5% off$3014 days
Trendsetter1,000 XP10% off$5030 days
Style Icon3,000 XP15% off + free shipping$4030 days
VIP7,500 XP20% off + free shipping$045 days

Beauty Store (AOV: $42)

LevelXP RequiredRewardMin OrderExpires
Fresh Face0$3 off$2014 days
Glow Getter800 XP$7 off$3030 days
Beauty Insider2,000 XP$12 off + free shipping$2530 days
Glam Squad5,000 XP$20 off + free shipping$045 days

Pet Store (AOV: $55)

LevelXP RequiredRewardMin OrderExpires
Puppy0Free shipping$2514 days
Good Boy1,000 XP10% off$3530 days
Best Friend3,000 XP15% off + free shipping$3030 days
Pack Leader6,000 XP20% off + free shipping$045 days

Notice the pattern: lower tiers use shorter expiration and higher minimums to protect margins, while top tiers offer the most generous terms to reward your best customers. This graduated approach keeps costs controlled at the bottom while making the top tier aspirational.

For more industry-specific configurations, see our guide to custom XP rules for fashion, food, beauty, and pet stores.

Measuring Whether Your Codes Are Working

Automatic discount codes are only valuable if they actually drive purchases. Here are the three metrics to track:

1. Redemption Rate

Target: 30%+ within 30 days. If fewer than 30% of generated codes are being used, your reward values may be too low, your expiration too short, or your minimum order too high. Adjust one variable at a time and measure the impact.

2. Incremental Revenue per Redemption

Track whether customers using loyalty codes spend more than the discount value. A $10 discount on a $45 order generates $35 in revenue you might not have received otherwise. Compare average order value for loyalty redemptions vs non-loyalty purchases.

3. Repeat Purchase Timing

Measure the average time between purchases for customers with active discount codes vs those without. Effective automatic rewards should shorten the purchase cycle -- a code expiring in 30 days creates a natural deadline that pulls forward purchases that might otherwise happen in 60-90 days.

LevelUp Loyalty's analytics dashboard tracks these metrics automatically, including CSV export for deeper analysis in your preferred spreadsheet tool.

Common Mistakes to Avoid

Mistake 1: Rewards That Are Too Small

A 5% discount on a $30 order saves $1.50. That is not motivating. If your reward does not feel meaningful to the customer, it will not drive a purchase. Make sure the absolute dollar value of your discount feels worth the effort of placing an order.

Mistake 2: No Expiration Date

Codes without deadlines never feel urgent. Always set an expiration. If 30 days feels too aggressive for your customer base, try 45 days -- but never "no expiration."

Mistake 3: Forgetting About Budget

Automatic rewards are powerful, but they can add up quickly if you do not set guardrails. Use budget controls to cap monthly reward spending and per-customer reward limits. Being generous is great -- going broke is not.

Mistake 4: Too Many Reward Types at Once

Offering percentage off, fixed amount, and free shipping at the same level is confusing. Stick to one reward type per level. Let the reward type escalate with the tier to create a clear progression.

The Bottom Line

Automatic discount codes transform loyalty rewards from a passive perk into an active sales driver. By eliminating the friction between earning and using a reward, you increase redemption rates, shorten purchase cycles, and generate incremental revenue that manual programs leave on the table.

The key is configuration: the right reward type, meaningful discount values, smart expiration periods, and protective usage limits. Get these settings right and your loyalty program pays for itself through repeat purchases from your most engaged customers.

Remember: customers who actively redeem rewards generate 115% higher revenue and maintain a 50% repeat purchase rate. The fastest way to activate that behavior is to put the reward directly in their hands, automatically, the moment they earn it.

Automate Your Rewards

LevelUp Loyalty generates unique Shopify discount codes automatically when customers level up. Configure percentage, fixed amount, or free shipping rewards with expiration, usage limits, and combination rules -- all through a simple dashboard.

Install LevelUp Loyalty free and let the app handle discount code creation so you can focus on growing your store.

Ready to gamify your store?

Start free — set up in 5 minutes

Get Started Free

Ready to gamify your store?

Start free — set up in 5 minutes

Get Started Free