# Discounts

> Make codes such as WINTER15 and automatic offers such as buy 2 boots, get socks free. Take a percentage or an amount off, make shipping free, and decide which discounts work together.

Source: https://docs.bifrostorbit.com/commerce/everyone/discount-codes/

There are two kinds of discount under **Discounts**:

- **Codes** that shoppers type in the cart or at checkout, such as `WINTER15`.
- **Automatic offers** that apply by themselves when the cart matches, such as "Winter boots: socks on us". Shoppers see the offer's name in the cart. Automatic offers are in the Growth and Enterprise plans; on Starter they stay in the list but don't apply at checkout. Buy X, get Y works as a code on every plan.

Each discount shows as its own amount on the order. Editors and Admins can make and change them; everyone can see them.

## Make a code or an offer

1. Open **Discounts** and select **New code** or **New offer**.
2. For a code, type the **code**, such as `WINTER15`. Codes have 3 to 40 characters: letters, numbers, hyphens and underscores. Shoppers can type them in small or capital letters. For an offer, give it the **name shoppers see**.
3. Choose what it gives:

| Kind | What it takes off |
| --- | --- |
| **A percentage** | From 1% to 100% of the products it applies to, in any currency. |
| **An amount** | An amount such as €20 off the order, in the currency you choose. It only works on orders in that currency, and never takes off more than the products it applies to cost. |
| **Free shipping** | The delivery rate the shopper chooses. Products keep their price. |
| **Buy X, get Y** | When they buy a number of some products, they get a number of others free or at a percentage off. See below. |

4. Choose what it applies to: **everything**, chosen **products**, or the products in chosen **collections**. A rule-based collection counts the products in it at the moment of checkout.
5. Set the limits you want, all optional:
   - **Minimum order:** the products in the cart must add up to at least this, such as €100
   - **Can be used from** and **Until the end of:** the dates it works between
   - **Most uses:** how many orders can use it in total
6. Save it. It works straight away unless you set a start date or switch it off.

## Buy X, get Y

For an offer such as buy 2 Fjell GTX boots, get a pair of Ullvik socks free:

1. Choose **Buy X, get Y**.
2. Under **When they buy**, set how many and of what: **2** of **Some products**, then choose the boots.
3. Under **They get**, set **1** of **Some products**, choose the socks, and keep **100% off** for free, or lower it for a percentage off.
4. Set **Times per order** to stop it repeating, or leave it empty so 4 boots get 2 pairs of socks.

The cheapest matching items are the ones that come off. An item never counts both as bought and as given. It works as a code or as an automatic offer.

## Using several discounts

A cart can have one code and any number of automatic offers. Commerce Orbit works them out highest **priority** first. At the same priority, automatic offers go before codes, and older before newer.

The first discount that gives something is used. Another one is only used as well when it and every one already used have **Works with other discounts** on. Each one comes off what is left after the ones before, so 20% and then 10% is 28% off.

When a code can't be used because of another discount, the cart says so, such as "That code can't be used with Winter boots: socks on us".

## How the discount is worked out

- Discounts come off the products, not the shipping. Free shipping is a kind of its own.
- They come after volume prices and price lists. See [Volume prices and quantity rules](https://docs.bifrostorbit.com/commerce/everyone/volume-pricing/).
- A discount on several products is shared out over them by price, so each order line and its VAT show the right amount.
- Gift cards bought in the cart get no discount. Gift cards used to pay come after every discount. See [Gift cards](https://docs.bifrostorbit.com/commerce/everyone/gift-cards/).

A use is counted when the order is paid or placed on invoice. A shopper who leaves checkout doesn't use it up.

## What shoppers see

When a code doesn't work, the cart says why, and the shopper can carry on without it:

| Message | Why |
| --- | --- |
| "That code doesn't exist" | No code with that name. |
| "That code is no longer active" | You switched it off. |
| "That code isn't valid yet" or "That code has expired" | Outside its dates. |
| "That code has been used up" | It reached its number of uses. |
| "That code only works for orders in EUR" | A fixed amount, and the cart is in another currency. |
| "Add a little more to use that code" | The cart is below the minimum order. |
| "That code doesn't apply to anything in your cart" | None of the products it applies to are in the cart. |
| "Add the items the offer needs to use that code" | A buy X, get Y code, and the cart doesn't have what it needs. |
| "That code can't be used with …" | A discount with a higher priority is used, and they don't work together. |

An automatic offer that doesn't apply says nothing.

## Change, switch off or remove a discount

Change a discount at any time. Orders already placed keep the discount they got. Switch it off to stop it working while keeping it for later.

**Delete** removes a discount nobody has used. One that has been used is switched off instead, so past orders can still show it.

## Not there yet

Limits per customer aren't part of Commerce Orbit yet. For a lasting company discount, use a price list. See [Customers and companies](https://docs.bifrostorbit.com/commerce/everyone/customers-and-companies/).
