---
title: Working with order discounts
related:
  - https://docs.kentico.com/k8/e-commerce-features/configuring-and-managing-your-store/discounts/working-with-discount-coupons/use-coupons-for-discounts-and-free-shipping.md
  - https://docs.kentico.com/k8/e-commerce-features/configuring-and-managing-your-store/discounts/configuring-discount-rules.md
  - https://docs.kentico.com/k8/e-commerce-features/configuring-and-managing-your-store/discounts/configuring-discount-rules/example-adding-an-order-rule.md
  - https://docs.kentico.com/k8/e-commerce-features/configuring-and-managing-your-store/discounts/working-with-discount-coupons/use-coupons-for-discounts-and-free-shipping/use-a-code-to-receive-a-discount-on-order.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/k8/e-commerce-features/configuring-and-managing-your-store/products.md). The system applies order discounts on your eligible [customers'](https://docs.kentico.com/k8/e-commerce-features/configuring-and-managing-your-store/customers.md) whole shopping. Specifically, these discounts apply to the sum of prices of product items (including selected product options) added to the shopping cart.

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

For example, you can provide special Christmas sale discounts to all eligible customers who make the purchase between November 15 and December 23, and pay in U.S. Dollars.

> **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/k8/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 order discounts

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

- [Adding order discounts limited by periods of validity](#adding-order-discounts-limited-by-periods-of-validity)
- [Adding order discounts targeted on selected customers](#adding-order-discounts-targeted-on-selected-customers)
- [Adding order discounts limited by conditions](#adding-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 on your registered customers.

### Adding order discounts limited by periods of validity

To add order discounts limited by periods of validity:

1. Click**New order discount**.
2. Enter the order discount [properties](#reference).

   You need to specify the properties in the **Duration** section:

   - **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/k8/working-with-order-discounts/specifying_properties_duration_section.png "Specifying properties in the Duration section")

> **Info:** If you leave both properties in the **Duration** section empty, the discount has unlimited validity.
>
> If you enter the **Valid from** property but leave the **Valid to** property empty, the discount has validity unlimited towards the future. The period of validity starts as specified in its **Valid from** property.
>
> If you enter the **Valid to** property but leave the **Valid from** property empty, the discount has limited validity. The period of validity starts upon the discount's adding to the system and finishes as specified in its **Valid to** property.

1. Click **Save**.

The system creates a new order discount. The system applies the discount only during the discount's period of validity (if active).

> **Tip:** If you open the _Order discounts_ application, you can see that the system displays for each listed order discount its status:
>
> | Status      | Description                                                                                                                                                                                                                                                    |
> | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
> | Active      | The order discount is enabled in the system (the _Enabled_ property is turned on).<br>If period of validity is specified for the discount (the _Valid from_, _Valid to_ properties), the discount is currently effective.                                      |
> | Disabled    | The order discount is not enabled in the system (the _Enabled_ property is turned off).<br>If period of validity is specified for the discount (the _Valid from_, _Valid to_ properties), it has no effect.                                                    |
> | Not started | The order discount is enabled in the system (the _Enabled_ property is turned on), and its period of validity is specified (the _Valid from_, _Valid to_ properties).<br>The discount is currently ineffective because its period of validity has not started. |
> | Finished    | The order discount is enabled in the system (the _Enabled_ property is turned on), and its period of validity is specified (the _Valid from_, _Valid to_ properties).<br>The discount is currently ineffective because its period of validity has finished.    |

### Adding order discounts targeted on selected customers

To add order discounts targeted on selected customers:

1. Click**New order discount**.
2. Enter the order discount [properties](#reference).

   While entering the discount's properties, make sure you change the value of the **Only for these customers** property in the **Customers** section:

   - **All** - 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/k8/managing-users/role-management.md) are eligible for the discount. To add roles:       

     1. Click **Select roles**.

        - This opens the **Select roles** dialog.
     2. Select the required roles.
     3. 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.

   ![Specifying properties in the Customers section](https://docs.kentico.com/docsassets/k8/working-with-order-discounts/specifying_properties_customers_section.png "Specifying properties in the Customers section")
3. Click **Save**.

The system creates a new order discount. The system applies the discount (if active) only for the selected customers.

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

### Adding order discounts limited by conditions

To add order discounts limited by conditions:

1. Click**New order discount**.
2. Enter the order discount [properties](#reference).

   While entering the discount's properties, make sure you specify the values of the properties in the **Discount conditions** section:

   ![Specifying order discount conditions](https://docs.kentico.com/docsassets/k8/working-with-order-discounts/specifying_order_discount_conditions.png "Specifying order discount conditions")

   **Specifying the minimum order amount**    

   - Enter the minimum order amount in your on-line store [main currency](https://docs.kentico.com/k8/e-commerce-features/configuring-and-managing-your-store/currencies.md).**Selecting the discount rules**

   1. Click **Edit condition** to edit the **Further conditions** property.

      - This opens the **Edit macro condition** dialog on the **Rule designer** tab.

   2. Select the required rule in the right part of the dialog.

   3. Click **Add rule** () to add the rule to the condition.

   4. (Optional) Repeat Steps _b._ and _c._ to add more rules.

      ![Selecting the discount rules](https://docs.kentico.com/docsassets/k8/working-with-order-discounts/selecting_discount_rules.png "Selecting the discount rules")**Specifying the rule parameters**

   5. Click the underlined part of the rule in the left part of the dialog.

      - This opens the **Set parameter value** dialog.

   6. Select the parameter.

   7. Click **OK**.

      - The system closes the **Set parameter value** dialog. The **Edit macro condition** dialog is open for editing.

   8. (Optional) Repeat Steps _a._ through _c._ if the rule contains more parameters, or if you added more rules.

      ![Specifying the rule parameters](https://docs.kentico.com/docsassets/k8/working-with-order-discounts/specifying_rule_parameters.png "Specifying the rule parameters")

   9. Click **Save & Close**.

      - The system closes the **Edit macro condition** dialog and saves the condition limiting the discount's application.
3. Click **Save**.

The system creates a new order discount. The system applies the discount only if the specified conditions are fulfilled (if active).

## Modifying order discounts

You can modify order discounts in the **Order discounts** application.

1. Select an order discount and click **Edit** ().
2. Modify the order discount [properties](#reference) as required.
3. Click **Save**.

You can now use the order discount with its updated settings.

## Displaying order discounts in the invoice

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

1. Open the **Store configuration**.
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/k8/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/k8/working-with-order-discounts/invoice_order_discount_applied.png "Invoice - order discount applied")

## Managing access to order discounts for selected users

In Kentico, managing access to order discounts for selected users is managing corresponding E-commerce Solution [permissions](https://docs.kentico.com/k8/managing-users/configuring-permissions.md) for the roles to which the users are assigned.

1. Open the **Roles** application.
2. Select the required site.
   - The system displays a list of all roles available on the selected site.
3. **Edit** () the selected role.

### Adding the users to the role

First, you need to make sure that the selected [users](https://docs.kentico.com/k8/managing-users.md) are in appropriate roles. This is because you cannot add permissions directly to the users but to the [roles](https://docs.kentico.com/k8/managing-users/role-management.md) to which the users are assigned.

1. Switch to the **Users** tab.
2. Click **Add users**.
   - This opens the **Select users** dialog.
3. Select the user(s).
4. Click **Save & Close**.

The system closes the **Select users** dialog and adds the selected user(s) to the current role. Now you can manage access to order discounts for the selected user(s) by assigning / unassigning the corresponding E-commerce permissions for the role.

> **Tip:** Alternatively, you can add registered customers to roles in the **Customers** application while editing selected customers on the **Roles** tab.

### Assigning / unassigning permissions for the role

1. Switch to the **Permissions** tab.
2. Select _Module_ (**Permissions for**, left).
3. Select _E-commerce_ (**Permissions for**, right).

   - The system displays a list of all E-commerce permissions available for the current role.
4. Enable/disable the permissions as required.

   | 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/k8/e-commerce-features/configuring-and-managing-your-store/e-commerce-website-settings.md), [discount rules](https://docs.kentico.com/k8/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.                                                                                                                                                                                                                                                                                                            |

The system allows/restricts for all users in the current role the selected permissions. The users now have / do not have the permissions and can / cannot access order discounts.

> **Tip:** You can hide order discounts from the administration interface for selected users by disabling the corresponding UI elements for the roles to which the users are assigned.
>
> Please refer to [Reference - Managing UI elements](https://docs.kentico.com/k8/custom-development/creating-custom-modules/reference-managing-ui-elements.md) for more details.

## Removing order discounts

You can remove order discounts from your on-line store in the **Order discounts** application.

1. Select an order discount.
2. Click **Delete** ().
3. Confirm that you want to remove the discount (**OK**).

The system removes the order discount from your on-line store.

## Reference

| **General**                                                   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name                                                          | The name of the order discount used in various parts of the system's administration interface, e.g. in order discounts lists.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| Code name                                                     | The string identifier of the order discount object used by developers in the code. 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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| 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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| Enabled                                                       | Indicates if the order discount is enabled in the system (active).<br>While calculating the total price of the shopping cart content, the system skips disabled discounts.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| **Discount value**                                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| Discount                                                      | Here you can specify the form of discount:<br>**By %** - use this option if you want to reduce the total price of the order by a percentage.<br>**By \<currency code>** - use this option if you want to reduce the total price of the order by a given amount in your on-line store main currency[ ](https://docs.kentico.com/k8/e-commerce-features/configuring-and-managing-your-store/currencies.md#configuring-the-main-currency).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| Value                                                         | Indicates an absolute discount value (in your on-line store main currency) or relative discount value (in per cent).<br>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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| **Discount conditions**                                       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| Minimum order amount                                          | Here you can specify the minimum total price of the shopping cart content for the system to apply the order discount. The price is calculated from the total price with taxes without shipping costs.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| Further conditions                                            | Here you can enter further condition(s) that must be fulfilled for the system to apply the order discount. By utilizing [rules](https://docs.kentico.com/k8/e-commerce-features/configuring-and-managing-your-store/discounts/configuring-discount-rules.md) (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. You can click **Clear** to remove the current content of the condition field.<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>For details about available macro options and syntax, please refer to [Macro expressions](https://docs.kentico.com/k8/macro-expressions.md). |
| **Coupons**                                                   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| The customer must enter a coupon code to receive the discount | Here you can specify whether the system applies the discount only if the customer enters an appropriate coupon code.<br>You can manage the order discount's coupons on its **Coupons** tab.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| **Duration**                                                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| Valid from                                                    | Indicates since when the order discount is valid. You can click **Now** to insert the current date and time or you can click  to choose the date and time from the calendar.<br>For unlimited validity, leave the field empty.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| Valid to                                                      | Indicates until when the order discount is valid. You can click **Now** to insert the current date and time or you can click  to choose the date and time from the calendar.<br>For unlimited validity, leave the field empty.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| **Customers**                                                 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| Only for these customers                                      | Allows you to specify customers eligible for the order discount:<br>**All** - 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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| **Discount calculation**                                      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| Priority                                                      | Here you can specify in what sequence the system applies the listed active order discounts (if any).<br>Enter _1_ for the highest priority.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| Apply further discounts with lower priority                   | Here you can specify if the system applies order discounts with a lower priority (if any) after applying the current order discount.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
