---
title: Configuring discount rules
related:
  - https://docs.kentico.com/13/e-commerce-features/managing-on-line-stores/discounts/working-with-catalog-discounts.md
  - https://docs.kentico.com/13/e-commerce-features/managing-on-line-stores/discounts/working-with-order-discounts.md
  - https://docs.kentico.com/13/e-commerce-features/managing-on-line-stores/discounts/working-with-free-shipping-offers.md
  - https://docs.kentico.com/13/e-commerce-features/managing-on-line-stores/discounts/working-with-gift-cards.md
  - https://docs.kentico.com/13/macro-expressions/writing-macro-conditions/creating-macro-rules.md
  - https://docs.kentico.com/13/custom-development/extending-the-administration-interface/developing-form-controls/reference-field-editor.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).

Discount rules are user-friendly representations of [macro conditions](https://docs.kentico.com/13/macro-expressions.md) used to limit [catalog discounts](https://docs.kentico.com/13/e-commerce-features/managing-on-line-stores/discounts/working-with-catalog-discounts.md), [order discounts](https://docs.kentico.com/13/e-commerce-features/managing-on-line-stores/discounts/working-with-order-discounts.md), [free shipping offers](https://docs.kentico.com/13/e-commerce-features/managing-on-line-stores/discounts/working-with-free-shipping-offers.md), and [gift cards](https://docs.kentico.com/13/e-commerce-features/managing-on-line-stores/discounts/working-with-gift-cards.md). If the system evaluates the condition as true, the respective discount or offer is valid and the system applies it (unless configured otherwise). This page describes how to extend the default conditions. When writing rule conditions, you can either use the available macro syntax or include [custom macro methods](https://docs.kentico.com/13/e-commerce-features/customizing-on-line-stores/configuring-discount-rules/adding-a-discount-rule-with-a-custom-method.md).

There are two types of the discount rules:

- Catalog rules – used by catalog discounts
- Order rules – used by order discounts, free shipping offers and gift cards

## Catalog and order rule differences

The main difference between the rule types is the data available for the conditions.

- Catalog discounts apply to products. The data available for catalog rules includes product attributes, i.e. the product's _SKUInfo_ object and its properties, available under the **SKU** macro property. For example, _SKU.SKUOrder_, _SKU.SKUPrice_, _SKU.SKUPublicStatus_, etc.
- Order discounts, free shipping offers and gift cards apply to entire orders. The data available for order rules includes values related to the shopping cart or order calculation, such as _Currency_, _Customer_, _PaymentOption_, _ShippingOption_, _GrandTotal_, etc.

> **Warning:** **Using context objects not related to the product or shopping cart calculation data**
>
> We strongly recommend NOT using time-related objects such as _CurrentUser_ or _CurrentPath_ in your custom discount rules.
>
> These objects may no longer be relevant in the session context at the time of evaluation, causing unexpected application of discounts or offers that use the rule in their condition.

> **Note:** **Currency of monetary values in order rules**
>
> For Order rules, all monetary macro properties (_GrandTotal_, _OrderDiscount_, _Tax_, etc.) have values in the currency that the customer selected for the evaluated shopping cart or order.
>
> If you have a store with [multiple currencies](https://docs.kentico.com/13/e-commerce-features/configuring-on-line-stores/configuring-currencies.md) and are creating an order rule that evaluates a monetary value, you need to adjust the condition code according to the currency (for example using the _Currency.CurrencyCode_ property).

## Adding discount rules

You can add new discount rules using macro rules directly from the Xperience administration interface:

1. Open the **Store configuration**application if you want to create a discount rule for the current site. Open the **Multistore configuration** application if you run multiple sites on the same Xperience instance and want to add the rule for all sites.

   > **Tip:** If you are not sure what to choose, see [Choosing site or global e-commerce configuration](https://docs.kentico.com/13/e-commerce-features/configuring-on-line-stores/choosing-site-or-global-e-commerce-configuration.md). If you are not sure about specifics of configuring in these applications, see [Configuring e-commerce settings for a specific site or globally](https://docs.kentico.com/13/e-commerce-features/configuring-on-line-stores/choosing-site-or-global-e-commerce-configuration/configuring-e-commerce-settings-for-a-specific-site-or-globally.md).
2. Select the **Discount rules -> Catalog rules** tab to manage catalog discount rules. Select the **Discount rules -> Order rules** tab to manage order discount rules.
3. Click **New catalog rule**when on the **Catalog rules**tab. Click **New order rule** when on the **Order rules** tab.
4. Fill in the discount rule's properties:

   | General          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
   | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
   | Display name     | The name of the discount rule displayed in the administration interface. For example, when editing a discount.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
   | Name             | The unique identifier of the discount rule object used 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 discount rule easier to use and maintain, you can add an explanation about the scenarios for which the rule is intended, etc. The description does not have any functionality; it is just for your better orientation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
   | Enabled          | Indicates if the discount rule is available to use when editing a discount. If the check box is cleared, the system does not display the rule.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
   | Rule data        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
   | User text        | The text displayed in the discount rule designer window.<br>To add parameters to the text, type their name of a specific parameter enclosed in curly brackets. For example: _{days}_                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
   | Condition        | The macro condition represented by the rule. Define the condition through standard [macro code](https://docs.kentico.com/13/macro-expressions/macro-syntax.md). The field provides [autocomplete support](https://docs.kentico.com/13/macro-expressions/entering-macro-expressions.md).<br>Available data:<br>**Catalog rules** – access the properties of the evaluated SKU (product) by typing _SKU_, a period character, and then pressing CTRL+SPACE. Select properties from the displayed autocomplete menu.<br>**Order rules** – access the data of the evaluated shopping cart or order by pressing CTRL+SPACE. The displayed autocomplete menu offers the most common properties, such as _Currency_, _Customer_, _PaymentOption_, _ShippingOption_, _GrandTotal_, _TotalItemsWeight_, etc. You can access the full shopping cart calculation data via the _Data_ property, which is primarily intended for evaluating the shopping cart content using the _Data.ContainsProducts_ method or for use within [custom macro methods](https://docs.kentico.com/13/e-commerce-features/customizing-on-line-stores/configuring-discount-rules/adding-a-discount-rule-with-a-custom-method.md).![Available data for catalog rules](https://docs.kentico.com/docsassets/13/configuring-discount-rules/available_data_for_catalog_rules.png "Available data for catalog rules") |
   | Required data    | Leave this property empty.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
   | Requires context | Leave this property empty.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |

   > **Tip:** **More detailed information**
   >
   > To learn more about entering the rule data, see [Creating macro rules](https://docs.kentico.com/13/macro-expressions/writing-macro-conditions/creating-macro-rules.md).
5. If your discount rule contains any parameters, switch to the **Parameters** tab.
   1. Configure the parameters as any other field in [Field editor](https://docs.kentico.com/13/custom-development/extending-the-administration-interface/developing-form-controls/reference-field-editor.md).

      ![](https://docs.kentico.com/docsassets/13/configuring-discount-rules/catalog_rule_parameters_tab.png)
   2. Click **Save**.

The discount rule is now configured and saved. Store managers can use the rule for their discounts and special offers.

> **Tip:** **Discount rules using a custom macro method (more advanced)**
>
> For more advanced rules and scenarios that cannot be achieved using the default Xperience macros, you can develop a custom macro method and then call that method in your discount rules.
>
> To learn how to create a discount rule that uses a custom macro method, see: [Adding a discount rule with a custom method](https://docs.kentico.com/13/e-commerce-features/customizing-on-line-stores/configuring-discount-rules/adding-a-discount-rule-with-a-custom-method.md)
