---
title: Working with order discounts
related:
  - https://docs.kentico.com/k82/e-commerce-features/configuring-and-managing-your-store/discounts/working-with-discount-coupons/use-order-coupons.md
  - https://docs.kentico.com/k82/e-commerce-features/configuring-and-managing-your-store/discounts/configuring-discount-rules.md
  - https://docs.kentico.com/k82/e-commerce-features/configuring-and-managing-your-store/discounts/configuring-discount-rules/example-adding-an-order-rule.md
  - https://docs.kentico.com/k82/e-commerce-features/configuring-and-managing-your-store/discounts/working-with-discount-coupons/use-order-coupons/usea-coupon-code-to-receive-a-discount.md
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

You can use order discounts to motivate selected customers to purchase more [products](https://docs.kentico.com/k82/e-commerce-features/configuring-and-managing-your-store/products.md). Order discounts relate to a whole order. Specifically, these discounts apply to the sum of prices of product items (including selected product options) added to the shopping cart.

For example, use this discount when you want to provide discount to customers:

- during some special season, e.g., Christmas,
- who pay in some particular currency, e.g., U.S. Dollars,
- whose shopping carts contain goods for more than a specific amount of money, e.g., 500 USD.

You can configure order discounts in detail to apply only if specified rules (macro conditions) are fulfilled. These rules use properties of the shopping cart, and can include shopping cart content, billing/shipping address, [order](https://docs.kentico.com/k82/e-commerce-features/configuring-and-managing-your-store/orders.md) currency, etc. You can also specify periods of validity for order discounts.

> **Info:** The system binds order discounts to specific sites, for example, to the sample _E-commerce Site_.
>
> If you run [multiple sites](https://docs.kentico.com/k82/e-commerce-features/configuring-and-managing-your-store/multisite-store.md) and want to use order discounts, you thus need to define dedicated order discounts for each site.

> **Info:** In all cases, order discounts are calculated after applying taxes. The calculation before applying taxes feature will be addressed in future versions.

## Adding and editing order discounts

You can add or edit order discounts in the **Order discounts** application.

- [Order discounts limited by periods of validity](#order-discounts-limited-by-periods-of-validity)
- [Order discounts targeted at selected customers](#order-discounts-targeted-at-selected-customers)
- [Order discounts limited by conditions](#order-discounts-limited-by-conditions)

> **Info:** You can combine the order discount limitations.
>
> For example, you can add discounts effective on orders made in U.S. Dollars throughout January, and targeted at your registered customers.

### Order discounts limited by periods of validity

To add or to edit order discounts limited by periods of validity:

1. To add a new discount, click **New order discount**. To edit an existing discount, click **Edit** () at the desired discount.
2. Type a **Name** for the discount.
3. Enter the order discount properties in the **Duration** category:

   - **Valid from** – specifies the start of the period of validity.
   - **Valid to** – specifies the end of the period of validity.

   ![Specifying properties in the Duration section](https://docs.kentico.com/docsassets/k82/working-with-order-discounts/specifying_properties_duration_section.png "Specifying properties in the Duration section")

   > **Info:** Leave both fields empty for permanent validity.
4. Click **Save**.

The system saves the order discount. The system now applies the discount only during the discount's period of validity (if the discount is running).

### Order discounts targeted at selected customers

To add or to edit order discounts targeted at selected customers:

1. To add a new discount, click **New order discount**. To edit an existing discount, click **Edit** () at the desired discount.
2. Type a **Name** for the discount.
3. Change the value of the **Available for** property in the **Target customers** category

   - **All** **visitors** – all customers are eligible for the discount; the default option.
   - **Registered users** – only registered customers are eligible for the discount.
   - **Selected roles** – only customers in selected [roles](https://docs.kentico.com/k82/managing-users/role-management.md) are eligible for the discount.
4. Click **Save**.

The system saves the order discount. The system now applies the discount (if the discount is running) only for the selected customers.

> **Info:** If you need to add order discounts targeted at custom groups of customers, for example, at selected users, contact groups, etc., please refer to [Configuring discount rules](https://docs.kentico.com/k82/e-commerce-features/configuring-and-managing-your-store/discounts/configuring-discount-rules.md).

### Order discounts limited by conditions

To add or to edit order discounts limited by conditions:

1. To add a new discount, click **New order discount**. To edit an existing discount, click **Edit** () at the desired discount.
2. Type a **Name** for the discount.
3. Specify **Minimum order amount** in your on-line store [main currency](https://docs.kentico.com/k82/e-commerce-features/configuring-and-managing-your-store/currencies.md).
4. Click **Edit** to set the discount rules and their parameters:

   1. In the **Edit macro condition** dialog that opens, select the required rule in the right part of the dialog.
   2. Use drag & drop, or double-click, or click **Add rule** () button to add the rule.
   3. Click the underlined parts of the rule in the left part of the dialog to open the **Set parameter value** dialog.

      > **Info:** One rule can contain more parameters. That's why there can be more underlined words.
   4. Select the desired parameter:

      ![Specifying the rule parameters](https://docs.kentico.com/docsassets/k82/working-with-order-discounts/specifying_rule_parameters.png "Specifying the rule parameters")
   5. Click **OK**.
   6. (Optional) Repeat editing to set all discount rules and all their parameters you want.
   7. Click **Save & Close**.
5. Click **Save**.

The system saves the order discount. The system now applies the discount only if the specified conditions are fulfilled (if the discount is running).

> **Info:** If you want to allow some other user to add or to edit discounts, see [Role management](https://docs.kentico.com/k82/managing-users/role-management.md) and [Configuring permissions](https://docs.kentico.com/k82/managing-users/configuring-permissions.md).
>
> | Permission           | Description                                                                                                                                                                                                                                                                                                                                                                     |
> | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
> | Read discounts       | Allows users in selected roles to access discounts and free shipping offers.                                                                                                                                                                                                                                                                                                    |
> | Modify discounts     | Allows users in selected roles to create, modify and delete discounts and free shipping offers.                                                                                                                                                                                                                                                                                 |
> | Read configuration   | Allows users in selected roles to access E-commerce configuration, i.e. the on-line store [settings](https://docs.kentico.com/k82/e-commerce-features/configuring-and-managing-your-store/e-commerce-website-settings.md), [discount rules](https://docs.kentico.com/k82/e-commerce-features/configuring-and-managing-your-store/discounts/configuring-discount-rules.md), etc. |
> | Modify configuration | Allows users in selected roles to modify E-commerce configuration.                                                                                                                                                                                                                                                                                                              |

> **Info:** If you edit or delete a discount, the existing orders stay with that discount. To update existing orders according to the new rules, you must edit the required orders manually.

## Displaying order discounts in the invoice

To display a discount applied on the customer's order in the [invoice](https://docs.kentico.com/k82/e-commerce-features/configuring-and-managing-your-store/invoices.md):

1. Open the **Store configuration** application.
2. Switch to the **Invoice** tab.
3. Add the following code into your invoice template:

   ```xml

   {%OrderDiscount.Format(Currency.CurrencyFormatString)#%}

   ```

   ![Invoice template](https://docs.kentico.com/docsassets/k82/working-with-order-discounts/invoice_template.png "Invoice template")
4. Click **Save**.

If you now review an existing order on the **Invoice** tab, you can see that the invoice includes information about order discount(s) applied on the order.

![Invoice - order discount applied](https://docs.kentico.com/docsassets/k82/working-with-order-discounts/invoice_order_discount_applied.png "Invoice - order discount applied")

## Reference

| **General**                                         |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| --------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name                                                | The name of the order discount used throughout the administration interface, e.g., in order discounts lists.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| Code name                                           | The unique identifier of the order discount object used by developers in the code.<br>Unless there is a reason to set a particular value, you can leave the default _(automatic)_ option, and the system generates an appropriate code name automatically.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| Description                                         | To make the order discount easier to use and maintain, you can add an explanation about the scenarios for which the discount is intended, etc. The description doesn't have any functionality, it's just for better orientation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| Enabled                                             | Indicates if the order discount is enabled in the system.<br>While calculating the total price of the order, the system skips disabled discounts.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **Discount value**                                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| Discount                                            | Specify if you want to apply the discount in percentage or in fixed amount.<br>**Percentage** – the discount reduces the total price of the order by a percentage.<br>**Fixed amount** – the discount reduces the total price of the order by a specific amount in your on-line store [main currency](https://docs.kentico.com/k82/e-commerce-features/configuring-and-managing-your-store/currencies.md).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| Amount                                              | Specify an exact value of the discount in percent or in fixed amount according to **Discount**. The system reduces the total price of the shopping cart content (i.e. the total price with taxes without shipping costs) by the discount value.<br>The amount has to be a number. When the amount is in percentage, enter a number between 0 and 100. When the amount is fixed, enter a number greater than 0.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| **Discount conditions**                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| Minimum order amount                                | Specify minimum price of the order that customers need to make to be eligible for the order discount. The price is calculated from the total price with taxes without shipping costs.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| Further conditions                                  | You can enter further conditions that must be fulfilled for the system to apply the order discounts. By utilizing rules (user-friendly representations of macro expressions), you can write any condition according to your specific requirements.<br>Clicking **Edit** opens the **Edit macro condition** dialog, which allows you to add rules through a graphical interface.<br>![Selecting the discount rules](https://docs.kentico.com/docsassets/k82/working-with-order-discounts/selecting_discount_rules.png "Selecting the discount rules")<br>Use drag & drop or double-click or **Add rule** button () to add a rule.<br>Click on a specific rule and click **Delete** () to delete the rule.<br>Click **Clear all rules** () to remove all rules in the current offer.<br>Click on underlined words in the condition part to change their options.<br>**Example**<br>_Currency is Euro_<br>_and_<br>_Payment method is PayPal_<br>The condition ensures that the order discount is only applied if the customer pays in Euro via the PayPal payment gateway.<br>You can also edit macros on the **Code** tab in the **Edit macro condition** dialog. For details about available macro options and syntax, please refer to [Macro expressions](https://docs.kentico.com/k82/macro-expressions.md). |
| **Coupons**                                         |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| Customer has to redeem a coupon to get the discount | If selected, only customers that type a valid coupon code are able to apply the order discount.<br>You can set coupons on the **Coupons** tab in the left menu. After selecting the check box and saving the discount, you will be redirected there automatically.<br>To learn more about coupons, see [Use order coupons](https://docs.kentico.com/k82/e-commerce-features/configuring-and-managing-your-store/discounts/working-with-discount-coupons/use-order-coupons.md).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| **Duration**                                        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| Valid from                                          | Specify from when the discount is running.**Info:** If you leave **Valid from** empty, the discount will be valid permanently till **Valid to**.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| Valid to                                            | Specify to when the discount is running.**Info:** If you leave **Valid to** empty, the discount will be valid permanently from **Valid from**.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| **Target customers**                                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| Available for                                       | Choose [roles of users](https://docs.kentico.com/k82/managing-users/role-management.md) who are able to apply the discount:<br>**All visitors** – all customers are eligible for the discount.<br>**Registered users** – only registered customers are eligible for the discount.<br>**Selected roles** – only customers in selected roles are eligible for the discount. To add roles:<br>Click **Select roles** to open the **Select roles** dialog.<br>Select the required roles.<br>Click **Select**.**Tip:** You can enter roles directly by typing in their code names separated by semicolons, e.g., _\_authenticated\_;Members_.**Tip:** You can add registered customers to roles in the **Customers** application while editing a selected customer on the **Roles** tab.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| **Discount calculation**                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| Priority                                            | Specify in what sequence the system applies the listed running order discounts (if any).<br>Enter _1_ for the highest priority. The number has to be greater than or equal to 1.**Tip:** Use greater intervals between priority numbers. If you want to add a new discount inbetween two already existing, you can add the new discount more easily between 10 and 20 than between 1 and 2. If you already have only small gaps, you can also use decimals.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| Apply lower priority discounts                      | If selected, other order discounts with lower priorities are applied to the shopping cart as well. If cleared, discount processing stops with the last discounts with the same priority level as the edited discount.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
