---
title: Promotion exclusions
slug: commerce-connect-14/docs/promotion-exclusions
docTags: 
createdAt: 2026-07-23T10:25:35.527Z
---

You can determine which promotions cannot be combined with other promotions. For example, you are running a 20% off automotive supplies sale. Customers should not be able to combine this promotion with the Get cheapest item 50% off promotion on the same item.

## Use order and unit-level exclusions

The Commerce Connect API supports both order-level and unit (item)-level exclusions. The components mentioned here are available in the `EPiServer.Commerce.Marketing` namespace.

Set the desired action through the `ExclusionLevel` property on the `PromotionEngineSettings` passed when running the `PromotionEngine`. Here are examples of using exclusion levels with the `PromotionEngine`.

### Call the PromotionEngine directly

```csharp
var cart = ServiceLocator.Current.GetInstance<IOrderRepository>().LoadOrCreateCart<Cart>(PrincipalInfo.CurrentPrincipal.GetContactId(), Cart.DefaultName);
    ServiceLocator.Current.GetInstance<IPromotionEngine>().Run(cart, new PromotionEngineSettings() { ExclusionLevel = ExclusionLevel.Unit }));
```

###  Use the ApplyDiscounts extension method

```csharp
var cart = ServiceLocator.Current.GetInstance<IOrderRepository>().LoadOrCreateCart<ICart>(PrincipalInfo.CurrentPrincipal.GetContactId(), Cart.DefaultName);
    cart.ApplyDiscounts(_promotionEngine, new PromotionEngineSettings() { ExclusionLevel = ExclusionLevel.Unit });
```

You can find another sample implementation in the [Optimizely QuickSilver sample site](https://github.com/episerver/Quicksilver), in the `CartService` class.

## Order level exclusion

`ExclusionLevel.Order`, the default setting, ensures that two promotions excluding each other are not applied within the same `OrderGroup`. If both are applied, the higher-priority promotion is used, while the other promotion is ignored.

To exclude promotions, set a list of `ContentReference` to the `ExcludedItems` property of the `PromotionData`. The following samples illustrate this.

```csharp
promotionData.ExcludedItems.Add(campaignLink);
    promotionData.ExcludedItems.Add(anotherPromotionLink);
```

Three types of `ContentReference` can be added to the `ExcludedItems` property:

- The `SalesCampaign.CampaignRoot` – This promotion cannot be combined with *any* other promotions.
- A campaign's `ContentLink` – This promotion cannot be combined with any promotions *in that campaign*.
- A promotion's `ContentLink` – This promotion cannot be combined with *that specific promotion*.

## Unit level exclusion

Use `ExclusionLevel.Unit` with promotions whose `DiscountType` value is `LineItem`.

:::hint{type="info"}
**Note**
If you use `ExclusionLevel.Unit` with any promotion type other than `LineItem`, its behavior is the same as `ExlusionLevel.Order`.
:::

Unit level exclusion mean that two promotions that exclude each other are both applied in an `OrderGroup`.

As with `Orders`, you exclude promotions by adding `ContentReferences` to the `ExcludedItems` list.

```csharp
promotionData.ExcludedItems.Add(campaignLink);
    promotionData.ExcludedItems.Add(anotherPromotionLink);
```

### Example

**Preconditions**

- Promotion **P1** is “Buy 3 of product **A** and get a 10% discount on 1 product A”.
- Promotion **P2** is “Get 5% off product **A**”.
- **P1** has a higher priority than **P2**.
- An order group has the following line item: SKU = **A**, quantity = 10.

If either P1 or P2 excludes the other

- P1 gives one unit a 10% discount.
- The 2 other units used in the P1 promotion are charged full price.
- The remaining 7 units are available for P2, each receiving a 5% discount.

:::hint{type="info"}
**Note**
The sequence in which promotions are executed is determined by their priority.
:::
