Add a discount code
Add a discount code is an automation that applies a code for the buyer when your rules pass, as if they typed it. Use it to give a code only in some situations, such as a first order, a VIP customer or a big cart, without the buyer knowing the code.
Requires: Shopify Plus and the Buddy plan.
Set it up
Section titled “Set it up”- Create the code in Shopify admin under Discounts, or as a Checkout Buddy discount with a code.
- In Checkout Buddy, go to Customizations → Discounts → Create customization → Add a discount code.
- Under What it does, enter the Discount code. The editor warns you if it isn’t in your Discounts, has expired or hasn’t started yet.
- Choose when it acts, add your rules under Which checkouts, and an optional message, such as “Code SAVE10 was added to your order.”
- Publish it, save, and make sure a Content app block is in one of checkout’s sections. See where it runs.
When it acts
Section titled “When it acts”It starts as Once per checkout · Leave it: the code goes on the first time the rules pass, and stays. A buyer who removes it keeps it off.
| Choice | For this automation |
|---|---|
| Once per checkout | Applied the first time the rules pass. If the buyer removes it, it stays off. |
| Each time the rules start to pass | Applied again after the rules stopped passing and pass again |
| Keep it that way | If the buyer or another app removes the code, it’s added again |
| Leave it | When the rules stop passing, the code stays on |
| Undo it | When the rules stop passing, the code it added comes off. A code the buyer typed stays. |
Examples
Section titled “Examples”| You want | Rules | When it acts |
|---|---|---|
| A welcome code on first orders | Customer · is · On their first order | Once per checkout · Leave it |
| A VIP code | Customer metafield · custom.field · is · VIP |
Keep it that way · Undo it |
| A code for carts of 10 items or more | Number of items · is at least · 10 | Keep it that way · Undo it |
| A local code for one country | Shipping address · Country · is any of · CA |
Keep it that way · Undo it |
Things to know
Section titled “Things to know”- A code Shopify refuses isn’t applied: it doesn’t exist, has expired, the cart doesn’t qualify, or it doesn’t combine with another code. Your message doesn’t show, but Shopify shows its own note under the discount field, such as “BULK2 is valid but not applicable. Check discount terms.” So give the automation the same rules as the code’s own requirements, such as Number of items · is at least · 2 for a code that needs 2 items. The automation tries again once something else in checkout changes, such as the cart.
- Its rules can check discount codes, such as “only while no code is used”, but adding the code changes them. With Undo it, that can go back and forth until the brake stops it, and the editor warns you.
- The code only goes on once the buyer reaches a step with the app block. Buyers who pay with Apple Pay or Google Pay from the cart skip checkout.
- Automatic discounts are often simpler. When the discount should apply whenever the same conditions are met, an automatic discount applies on Shopify’s side with no code and no app block.
- To refuse codes, use Code rules. The older Remove discount code block isn’t offered for new blocks.
- A button buyers tap instead: the Discount buttons card makes a content block with Apply code buttons.
