---
title: Example - Applying an order discount
related:
  - https://docs.kentico.com/k81/e-commerce-features/configuring-and-managing-your-store/discounts/working-with-order-discounts.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).

The example demonstrates an application of an order discount. The 10% discount is time-limited, targeted at your [customers](https://docs.kentico.com/k81/e-commerce-features/configuring-and-managing-your-store/customers.md) in the Facebook users [role](https://docs.kentico.com/k81/managing-users/role-management.md), and applies to all [orders](https://docs.kentico.com/k81/e-commerce-features/configuring-and-managing-your-store/orders.md) to Texas exceeding 100 USD. It is applied while editing an existing order in the administration interface, and while shopping on the live site.

The example uses the sample _E-commerce Site_.

## Adding an order discount

> **Tip:** The order discount in this example doesn't use discount coupons.
>
> Please refer to [Example - Applying a coupon code to receive a discount on your order ](https://docs.kentico.com/k81/e-commerce-features/configuring-and-managing-your-store/discounts/working-with-discount-coupons/working-with-order-coupons/use-a-coupon-code-to-receive-a-discount.md)to see an example of application of an order discount that uses discount coupons.

First, enter the order discount's general and value properties.

1. Open the **Order discounts** application.
2. Click **New order discount** to open a page where you can specify the discount properties.
3. Enter the following values for the discount's properties:

   - **Name**: Christmas sale
   - **Enabled**: Yes (selected)
   - **Discount**: Percentage
   - **Amount**: 10
4. Click **Save**.

The system saves the order discount. Currently, the discount applies to all orders placed by all customers.

### Limiting the discount's validity

To specify the order discount's period of validity:

1. Enter the properties in the **Duration** section.
   - **Valid from**: 11/15/2014 8:00:00 AM
   - **Valid to**: 12/23/2014 6:00:00 PM
2. Click **Save**.

The system saves the order discount. Currently, the discount applies to all orders placed by all customers within the specified period.

### Specifying the discount's customer target group

To specify the order discount's customer target group:

1. Enter the properties in the **Target customers** section.
   - **Available for**: Selected roles

     1. Click **Select roles**.

        - The system opens the **Select roles** dialog.
     2. Select the **Facebook users**  role.

        ![Specifying the customer target group](https://docs.kentico.com/docsassets/k81/example-applying-an-order-discount/specifying_customer_target_group.png "Specifying the customer target group")
     3. Click **Select**.

        - The system closes the **Select roles** dialog.
2. Click **Save**.

The system saves the order discount. Currently, the discount applies to all orders placed by customers in the Facebook users role within the specified period.

### Specifying the discount's application conditions

To further limit the order discount's application, specify the properties in the **Discount conditions** section.

**Specifying the minimum order amount**

- **Minimum order amount**: 100

**Selecting the discount rule**

1. Click **Edit** to open the **Edit macro condition** dialog.
2. Select the _**Shipping address state is**_ rule in the right part of the dialog.

   ![Selecting the discount rule](https://docs.kentico.com/docsassets/k81/example-applying-an-order-discount/selecting_discount_rules.png "Selecting the discount rule")
3. Click **Add rule** () to add the selected rule to the condition.

**Specifying the rule's parameter**

1. Click select state in the left part of the dialog to opens the **Set parameter value** dialog for the **state** parameter.

2. Select **Texas** from the list of available states.

   ![Specifying the rule's parameter](https://docs.kentico.com/docsassets/k81/example-applying-an-order-discount/specifying_rule_parameter.png "Specifying the rule's parameter")

3. Click **OK**.

   - The system closes the **Set parameter value** dialog.

4. Click **Save & Close** in the **Edit macro condition** dialog.

   - The system closes the dialog saves the macro condition.

5. Click **Save**.

The system saves the order discount. Currently, the discount applies to all orders to Texas exceeding 100 USD placed by customers in the Facebook users role within the specified period.

## Applying the order discount

### While editing an existing order in the administration interface

1. Open the **Orders** application.
2. **Edit** () the selected order to Texas placed by a customer (user) in the Facebook users role.
3. Switch to the **Items** tab.
4. Add the _Nike Race Day_ T-shirt.

   1. Click **Add item**.

      - The system opens the **Add order items** dialog.
   2. Select the _Nike Race Day_ T-shirt.

      > **Note:** Click the name of the [product](https://docs.kentico.com/k81/e-commerce-features/configuring-and-managing-your-store/products.md) leaving the **Quantity** field empty.
      >
      > - The system opens the **Add order items** dialog with the product details displayed.The system behaves like this because the product has [product options](https://docs.kentico.com/k81/e-commerce-features/configuring-and-managing-your-store/products/working-with-product-options.md).
   3. Specify the amount of product items:
      - **Units**: 10
   4. Click **Add to cart**.

      - The system closes the dialog and applies the discount on the order.

        ![Applying the order discount](https://docs.kentico.com/docsassets/k81/example-applying-an-order-discount/applying_order_discount.png "Applying the order discount")

If you now click **Next**, the system saves the order.

### While shopping on the live site

1. View the live site.
2. Sign in as a customer (user) with their address in Texas in the Facebook users role.
3. Select **Clothing -> T-shirts** in your on-line store main menu.

   - The system displays a list of all T-shirts that you offer in your on-line store.
4. Click **Add to cart** in the _Nike Race Day_ section.

   > **Note:** The product has product options. That's why the system now displays the product's details page.
5. Enter _10_ for the amount of product items.
6. Click **Add to cart** again.

   - The system displays the content of the shopping cart of the customer (user) in the selected role, with the discount applied on the order.

     ![Viewing the shopping cart content](https://docs.kentico.com/docsassets/k81/example-applying-an-order-discount/viewing_shopping_cart_content.png "Viewing the shopping cart content")

If you now click **Check out**, you can continue with the [checkout process](https://docs.kentico.com/k81/e-commerce-features/configuring-and-managing-your-store/checkout-process.md).
