Back to Guides
Promotions
13 min read

How to Create Shopify Discount Codes

Discount codes are powerful tools for driving sales, clearing inventory, and rewarding loyal customers. This guide covers everything from basic codes to advanced promotional strategies.

Flex Commerce Team
Updated February 2024

Understanding Discounts

Shopify offers two main ways to offer discounts: discount codes that customers enter at checkout, and automatic discounts that apply when conditions are met. Each has different use cases and advantages.

Used strategically, discounts can increase average order value, drive urgency, and convert hesitant shoppers. However, overuse can train customers to wait for sales and erode your margins.

Discount Codes vs Automatic Discounts

Discount Codes

  • • Customer enters a code at checkout
  • • Can be shared and tracked easily
  • • Great for email campaigns and influencers
  • • Customers feel rewarded

Automatic Discounts

  • • Applies automatically when conditions are met
  • • No code to remember or enter
  • • Shows discount in cart and checkout
  • • Better for site-wide promotions

Important Note

By default, Shopify only allows one discount code per order. Customers cannot stack codes. However, automatic discounts can combine with discount codes on Shopify Plus plans.

Discount Types

Shopify supports several types of discounts, each suited to different promotional goals. Understanding these helps you choose the right type for your campaign.

Percentage Off

A percentage discount on the order subtotal or specific products. Most versatile and commonly used type.

Examples: 10% off your order, 25% off all dresses, 15% off your first order

Fixed Amount Off

A specific pound amount off the order or products. Works well for higher-value promotions.

Examples: £10 off orders over £50, £5 off any candle, £20 off your next order

Free Shipping

Removes shipping costs. Highly effective as shipping is a top reason for cart abandonment.

Examples: Free standard shipping, free shipping on orders over £30, free express upgrade

Buy X Get Y (BOGO)

Offers a discount when purchasing specific quantities or combinations. Great for increasing units per order.

Examples: Buy 2 get 1 free, buy any shirt get 50% off trousers, buy 3 for £20

Creating Discount Codes

Let us walk through creating a discount code step by step. We will create a 10% off code as an example.

  1. 1
    Navigate to Discounts

    In your Shopify admin, go to Discounts in the left sidebar. Click Create discount.

  2. 2
    Choose Discount Type

    Select the discount type. For our example, choose Amount off productsor Amount off order depending on what you want to discount.

  3. 3
    Enter the Code

    Enter your discount code. Keep it memorable and relevant. Example: SAVE10, WELCOME15, SUMMER20. Click "Generate random code" if you want a unique code.

  4. 4
    Set the Discount Value

    Choose percentage or fixed amount. Enter the value (e.g., 10 for 10% or £10). Select whether it applies to all products or specific collections.

  5. 5
    Set Minimum Requirements

    Choose whether a minimum purchase is required. Options: No minimum, minimum purchase amount (e.g., £50), or minimum quantity of items.

  6. 6
    Configure Eligibility

    Set who can use the discount: all customers, specific customer segments, or specific customers. Use segments for VIP-only codes.

  7. 7
    Set Usage Limits

    Limit total uses (e.g., first 100 customers) and uses per customer (e.g., one use per customer). Important for controlling costs.

  8. 8
    Set Active Dates

    Choose start and end dates. Leave end date empty for ongoing codes, or set a deadline to create urgency.

  9. 9
    Save the Discount

    Click Save discount. Your code is now active and ready to share with customers.

Automatic Discounts

Automatic discounts apply without customers entering a code. They are ideal for site-wide sales, tiered pricing, and BOGO offers where you want everyone to benefit.

Creating an Automatic Discount

  1. 1.Go to Discounts and click Create discount
  2. 2.Select your discount type (Amount off, Free shipping, or Buy X get Y)
  3. 3.Under "Method", select Automatic discount
  4. 4.Enter a title that customers will see (e.g., "Summer Sale: 20% Off")
  5. 5.Configure the discount value and conditions
  6. 6.Set active dates and save

When to Use Automatic Discounts

  • Sitewide sales where everyone gets the same discount
  • Tiered discounts (spend £50 get 10%, spend £100 get 20%)
  • Buy X get Y offers
  • Free shipping thresholds
  • ×When you need to track individual code performance
  • ×Influencer or affiliate tracking

Pro Tip

Automatic discounts show as a line item in the cart, so customers see the savings as they shop. This can increase conversion by showing value before checkout.

Discount Strategies

Different promotional goals call for different discount approaches. Here are proven strategies for common ecommerce objectives.

First Purchase Conversion

Goal: Convert first-time visitors into customers.

Recommended approach:

  • • Offer 10-15% off or free shipping on first order
  • • Collect email in exchange for the code
  • • Use a welcome popup with exit intent
  • • Limit to one use per customer

Increase Average Order Value

Goal: Get customers to spend more per order.

Recommended approach:

  • • Tiered discounts: 10% off £50+, 15% off £100+, 20% off £150+
  • • Free gift with orders over £75
  • • Free shipping threshold above current AOV
  • • Use automatic discounts so savings show in cart

Clear Slow-Moving Inventory

Goal: Move products that are not selling well.

Recommended approach:

  • • Apply discount to specific collection (e.g., "Clearance")
  • • Use steeper discounts (30-50%) to drive urgency
  • • Create time-limited flash sales
  • • Exclude from other promotions to protect margins

Win Back Lapsed Customers

Goal: Re-engage customers who have not purchased recently.

Recommended approach:

  • • Create unique codes for each segment
  • • Offer meaningful discount (15-20%)
  • • Set short expiration (7-14 days) for urgency
  • • Send via email with personalised message

Usage Limits and Conditions

Proper limits prevent discount abuse and help you control promotional costs. Always consider how customers might try to game your discounts.

Available Limits

  • Total number of uses: Limit how many times the code can be used in total (e.g., first 100 customers)
  • One use per customer: Prevents customers from using the code multiple times
  • Minimum purchase: Requires a minimum spend before discount applies
  • Minimum quantity: Requires a minimum number of items in cart
  • Customer eligibility: Restrict to specific customer segments or individuals
  • Product/collection scope: Apply only to certain products or collections

Combining Conditions

Example: VIP Early Access Sale

Configure these settings:

  • Value: 20% off
  • Applies to: Entire order
  • Minimum purchase: £50
  • Customer eligibility: VIP customer segment only
  • Usage limit: One use per customer
  • Active dates: 48 hours before general sale starts

Tracking Performance

Measuring discount performance helps you understand what works and optimise future promotions.

Viewing Discount Analytics

  1. 1.Go to Discounts in your Shopify admin
  2. 2.Click on any discount to see its performance
  3. 3.View total uses, total discount amount, and when it was used

Key Metrics to Track

Usage Count

How many times the code was used. Compare against how many were sent for redemption rate.

Revenue Generated

Total sales from orders using the discount. Use Reports to find this data.

Average Order Value

Compare AOV of discounted orders vs regular orders. Discounts should not dramatically lower AOV.

New vs Returning Customers

Track whether discounts are acquiring new customers or just discounting customers who would buy anyway.

Pro Tip

Use UTM parameters when sharing codes via email or social. This lets you track which channels drive the most discount redemptions in Google Analytics.

Common Mistakes

Discounting Too Often

Constant sales train customers to wait for discounts. Your brand loses perceived value.

Fix: Reserve discounts for specific occasions. Focus on value-adds like free shipping or gifts instead of percentage off.

Not Setting Usage Limits

Unlimited codes can spread beyond your intended audience and cut into margins.

Fix: Always set "one use per customer" for codes. Consider total usage limits for exclusive promotions.

Easily Guessable Codes

Codes like "DISCOUNT10" or "SAVE20" can be guessed by savvy shoppers who were not meant to have them.

Fix: Add random characters or use Shopify's random code generator. Example: SUMMER23-XK7 instead of SUMMER20.

Forgetting to Set End Dates

Codes without end dates stay active indefinitely and can resurface months later.

Fix: Always set an end date. Review and deactivate old codes monthly.

Not Testing Before Launch

Discount logic errors can cost money (too much discount) or frustrate customers (code not working).

Fix: Always test new discounts by placing a test order before sharing the code. Verify the discount applies correctly.

Need Help With Promotions?

Our team can help you plan promotional strategies, set up complex discount rules, and integrate discounts with your email marketing for maximum impact.