HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunitySubmit a ticketLog In
GitHubNuGetDev CommunitySubmit a ticket


You can exclude catalog items from _all promotions_, or from _one promotion_, using the APIs described in the following_._

Components mentioned here are available in the EPiServer.Commerce.Marketing namespace.

## Exclude catalog items on all promotions

Use this code to ignore catalog items when evaluating promotions and applying discounts. For example, while promotions on sneakers may be enacted from time to time, you never want the Faded Glory Mens Canvas Slip-On Shoe to receive a discount or to be included in discount-related events (such as **Buy at least X items...Get the following discount**).

To exclude a product from the promotion engine, implement the IEntryFilter. In most cases, you can use the EntryFilterSettings class to configure the default implementation. If that does not meet your needs, create your own IEntryFilter implementation.

The default implementation of IEntryFilter uses the EntryFilterSettings class to implement the Filter method. If using that implementation, you only need to add filters to the instance of EntryFilterSettings. The following example illustrates various ways to configure the settings.

**Example**

Add filters when a site is initialized.

Note

If you want the filters to work on the front end and the back end site, you must configure them on both sites.



## Exclude catalog items from a promotion [New in 13.0.0]

Excluding catalog items from a promotion (discount) can be done from the **Marketing** user interface.

797


You can also set it through the API. To exclude catalog entries from a single promotion, set the promotion's ExcludedCatalogItems property to a list of ContentReference.

**Example**



Use ContentReferences to specify catalogs, categories, and entries.

Note

The exclusion is always _recursive_. If you add a category to ExcludedCatalogItems, all subcategories and their subcategories will also be excluded.

To change the default way to exclude catalog items, implement the IPromotionExcludedCatalogItemService interface, then register it in one of your initialization modules. See [Initialization](🔗).

**Example**



**Related blog post: **[New feature in Commerce 13: Exclude catalog items per promotion](🔗)