---
title: Configuring discount rules
related:
  - https://docs.kentico.com/k8/e-commerce-features/configuring-and-managing-your-store/discounts/working-with-catalog-discounts.md
  - https://docs.kentico.com/k8/e-commerce-features/configuring-and-managing-your-store/discounts/working-with-order-discounts.md
  - https://docs.kentico.com/k8/e-commerce-features/configuring-and-managing-your-store/discounts/working-with-free-shipping-offers.md
  - https://docs.kentico.com/k8/macro-expressions/writing-macro-conditions/creating-macro-rules.md
  - https://docs.kentico.com/k8/custom-development/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 discount- and free shipping offer-related [macro conditions](https://docs.kentico.com/k8/macro-expressions.md). These conditions allow your on-line store administrators to limit the application of discounts (catalog and order) and [free shipping offers](https://docs.kentico.com/k8/e-commerce-features/configuring-and-managing-your-store/discounts/working-with-free-shipping-offers.md). If the condition is evaluated as true, the respective discount / free shipping offer is valid and the system applies it (unless configured otherwise).

## Catalog rules

Catalog rules are user‑friendly representations of catalog discount-related macro expressions. Using these rules in the **Rule designer** mode of the macro condition editor (while editing the catalog discounts' **Apply to** property), you can build conditions limiting your catalog discounts' application.

![Selecting catalog rules](https://docs.kentico.com/docsassets/k8/configuring-discount-rules/selecting_catalog_rules.png "Selecting catalog rules")

### Available data for the catalog rules

> **Warning:** We recommend that you do not use time-related objects such as _CurrentUser_, _CurrentPath_, etc. in your custom catalog rules.
>
> This is because such objects can no longer be relevant in the current session context.

The data available for catalog rules includes _**SKU**_ and its properties, for example _**SKUOrder**_, _**SKUPrice**_, _**SKUPublicStatus**_, etc.

You can easily access the data in **Store** / **Multistore configuration -> Discount rules -> Catalog rules** by typing **SKU.** while editing the rule's **Condition** property on the **General** tab.

![Available data for catalog rules](https://docs.kentico.com/docsassets/k8/configuring-discount-rules/available_data_for_catalog_rules.png "Available data for catalog rules")

## Order rules

Order rules are user‑friendly representations of order discount- and free shipping offer-related macro expressions. Using these rules in the **Rule designer** mode of the macro condition editor (while editing the order discounts' / free shipping offers' **Further conditions** property), you can build conditions limiting your order discounts' / free shipping offers' application.

![Selecting order rules](https://docs.kentico.com/docsassets/k8/configuring-discount-rules/selecting_order_rules.png "Selecting order rules")

### Available data for the order rules

> **Warning:** We recommend that you do not use time-related objects such as _CurrentUser_, _CurrentPath_, etc. in your custom order rules.
>
> This is because such objects can no longer be relevant in the current session context.

The data available for order rules includes _**ShoppingCart**_ and its properties, for example _**Currency**_, _**PaymentOption**_, _**ShippingOption**_, etc.

You can easily access the data in **Store** / **Multistore configuration -> Discount rules -> Order rules** by typing **CTRL+SPACE** while editing the rule's **Condition** property on the **General** tab.

![Available data for order rules](https://docs.kentico.com/docsassets/k8/configuring-discount-rules/available_data_for_order_rules.png "Available data for order rules")

## Adding discount rules

You can add discount rules in **Store configuration -> Discount rules** on the **Catalog rules** / **Order rules** tab (alternatively also in the **Multistore configuration** application).

> **Info:** To build the discount rules' macro conditions, you can use only the data available for the respective type of discount rules ([data](#available-data-for-the-catalog-rules) available for catalog rules, [data](#available-data-for-the-order-rules) available for order rules). Or you can customize the system's code to build more complex conditions.

1. (Optional) Add a new classto the **App\_Code\CMSModules\Ecommerce\\** sub-folder in your Kentico installation directory.
   - Make sure the class inherits from the **MacroMethodContainer** class.
   1. Add your custom methods into the class.
   2. [Register your macro method container class](https://docs.kentico.com/k8/macro-expressions/extending-the-macro-engine/registering-custom-macro-methods.md) into the macro engine.
   3. Save the class and build your solution.

      - You can now use your custom methods in the discount rule's condition.
      - Refer to [Example - Adding an order rule](https://docs.kentico.com/k8/e-commerce-features/configuring-and-managing-your-store/discounts/configuring-discount-rules/example-adding-an-order-rule.md#exampleaddinganorderrule-00) to see an example.
2. Open the **Store configuration** application.
3. Switch to the **Discount rules** tab.
4. Switch to catalog rules (order rules) using the corresponding tab.
5. Click **New catalog rule** (**New order rule**).
6. Enter the discount rule [properties](#general-tab) as required.

   ![Adding a catalog rule - General tab](https://docs.kentico.com/docsassets/k8/configuring-discount-rules/catalog_rule_general_tab.png "Adding a catalog rule - General tab")
7. Click **Save**.
   - The system creates a new discount rule leaving it open on the **General** tab.
8. (Optional) Switch to the **Parameters** tab.
9. Define the discount rule's [parameter(s)](#parameters-tab) if required.

   ![Adding a catalog rule - Parameters tab](https://docs.kentico.com/docsassets/k8/configuring-discount-rules/catalog_rule_parameters_tab.png "Adding a catalog rule - Parameters tab")
10. Click **Save**.

You can now use the discount rule to limit the application of your discounts / free shipping offers.

> **Tip:** Please refer to [Example - Adding an order rule ](https://docs.kentico.com/k8/e-commerce-features/configuring-and-managing-your-store/discounts/configuring-discount-rules/example-adding-an-order-rule.md)for an example of adding a custom discount rule with a macro condition calling a custom method.

## Filtering discount rules

The system allows you to view only discount rules matching certain search criteria (the display name of the rule, its condition and status).

1. Open the **Store configuration** (**Multistore configuration**) application.
2. Use the tabs to view the list of available catalog rules / order rules.

   - The system shows all corresponding discount rules available in the system.

     ![Catalog rules](https://docs.kentico.com/docsassets/k8/configuring-discount-rules/catalog_rules.png "Catalog rules")
3. Specify your search criteria.
4. Click **Search**.
5. (Optional) Click **Reset** to view all catalog rules / order rules available in the system.

The system shows only discount rules matching your search criteria.

![Catalog rules - filtered](https://docs.kentico.com/docsassets/k8/configuring-discount-rules/catalog_rules_listed.png "Catalog rules - filtered")

## Modifying discount rules

You can modify discount rules in **Store configuration -> Discount rules** on the **Catalog rules** / **Order rules** tab (alternatively also in the **Multistore configuration** application).

1. Using the tabs, select either catalog rules or order rules.
2. Select a discount rule and click **Edit** ().
3. Modify the rule's [properties](#general-tab) as required.
4. (Optional) Switch to the **Parameters** tab.
5. (Optional) Modify the rule's [parameters](#parameters-tab) (if any).
6. Click **Save**.

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

## Removing discount rules

You can remove discount rules from the system in **Store configuration -> Discount rules** on the **Catalog rules** / **Order rules** tab (alternatively also in the **Multistore configuration** application).

1. Using the tabs, select either catalog rules or order rules.
2. Select a discount rule.
3. Click **Delete** ().
4. Confirm that you want to remove the discount rule (**OK**).

The system removes the discount rule from your on-line store(s).

## Reference

### General tab

See [Creating macro rules](https://docs.kentico.com/k8/macro-expressions/writing-macro-conditions/creating-macro-rules.md).

### Parameters tab

See [Reference - Field editor](https://docs.kentico.com/k8/custom-development/developing-form-controls/reference-field-editor.md).
