For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create a discount code

Build a discount your shoppers unlock with a code at checkout — set the code, the value, the schedule, and the products it covers.

A discount code only applies when the shopper types it at checkout, which makes it the right type for campaigns, newsletters, and influencer partnerships.

The editor is the same as for an automatic discount, with two differences: there is a Discount code field, and there is no New price display option — a code does not exist until it is entered, so the price on the product page cannot be changed in advance.

1

Open the Discounts page

In your Shopify admin, open the Sami Product Labels app and click Discounts in the app sidebar.

The Discounts entry in the Sami Product Labels app sidebar
Discounts sits between Badge groups and Extra Features in the sidebar.
2

Click Create discount, then choose Discount code

Click Create discount. In the Choose discount type dialog, click Select next to Discount code.

The Choose discount type dialog with Select highlighted next to Discount code
The page heading becomes Create discount code.

The type cannot be changed later. For a discount that applies on its own, see Create an automatic discount.

3

Name the discount and set its status

In General information, type a Discount name — internal only, and unique in your store — and set the selector beside it to Active or Draft.

The General information section of a discount code with the name field and the Active/Draft selector
The name is what you see in the list; the code is what shoppers type.
4

Set the discount code

In the Discount section, type the code shoppers will enter into Discount code, or click Generate random code to have the app produce a 12-character code for you.

The Discount code field with a generated code and the Generate random code link
Customers must enter this code at checkout to apply the discount.
5

Set the discount value

Below the code, pick a Discount value type and enter the number:

Type
What it does

Percentage (%)

Takes that percentage off each matching item. Maximum 100%.

Fixed amount

Takes that amount off each matching item, in your store currency.

New price

Sells each matching item at the price you type, instead of its own price.

Then choose a Purchase type: One-time purchase, Subscription, or Both one-time purchase and subscription.

The discount value type, value field, and purchase type selector on a discount code
The value field switches between a % suffix and your currency prefix.
6

(Optional) Add a minimum purchase requirement

Open the Requirement selector in Minimum purchase requirements and choose No minimum requirements, Minimum purchase amount, or Minimum quantity of items. The last two add a Requirement value field, counted only across the products this discount applies to.

The Minimum purchase requirements section with a requirement value field
The cart has to reach this value before the code is accepted.
7

Schedule the discount

In Discount time, set the Start date and Start time, pre-filled with the current date and time. Tick Set end date to add an End date and End time; the end must be later than the start.

The Discount time section with start date, start time, and the Set end date checkbox
Give campaign codes an end date so they stop working on their own.
8

Choose which discounts it can combine with

Combinations starts with Product discounts, Order discounts, and Shipping discounts all allowed. Click the x on a row to stop this code from stacking with that type; the pencil icon in the section header reopens the full list of checkboxes.

Click the counter on a row to see which active discounts of that type your store already has.

The Combinations section of a discount code with the three combination types
Only one shipping discount can apply per order — the best value wins.
9

(Optional) Add tags

Click Add tags in the Tags section to tick an existing discount tag or create a new one. Tags are internal and are used to filter your discounts.

10

Choose which products the code applies to

Switch to the Product conditions tab and pick All products, Specific products, or Matching conditions.

For Specific products, search in the field or click Browse to open the Shopify product picker, then use Edit on a row to narrow the selection down to individual variants.

The Product conditions tab of a discount code with the three product modes
The code is only accepted for the products this tab covers.

To match products by collection, title, or tag instead of listing them, see Use matching conditions.

11

Save and share the code

Click Save in the bar at the top of the screen. Errors, if any, appear in a red banner and the editor jumps to the tab that owns the first one.

Back on the Discounts page, the row shows Discount code as its type with the code beside it — use the copy button to put the code on your clipboard before sharing it.

A discount code row in the Discounts list with the code and its copy button
Copy the code straight from the list when you are ready to publish the campaign.

Show the code on your product pages

A discount code cannot change the price shown on your storefront, but a badge can advertise it. After saving, click Create badge on the Don't let this discount go unnoticed card and write the code into the badge text with the {sami_discount_code} variable.

{sami_discount_code} only resolves on a badge that uses the Sami discount condition — which the Create badge button sets up for you. See Dynamic variables reference.

Next steps

Last updated

Was this helpful?