Interface IPromotionEngine

Evaluates the condition on all active promotions, and gives award to specific orders when the conditions are fulfilled.

Namespace: EPiServer.Commerce.Marketing
Assembly: EPiServer.Business.Commerce.dll
Version: 10.8.0
Syntax
public interface IPromotionEngine

Methods

Evaluate(IEnumerable<ContentReference>, IMarket, Currency, RequestFulfillmentStatus)

Gets the information about all promotions related to a multiple entries but individually evaluated.

Declaration
IEnumerable<RewardDescription> Evaluate(IEnumerable<ContentReference> entryLinks, IMarket market, Currency currency, RequestFulfillmentStatus requestFulfillmentStatus)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<EPiServer.Core.ContentReference> entryLinks

The entries to get the promotion information about.

IMarket market

The market.

Currency currency

The currency.

RequestFulfillmentStatus requestFulfillmentStatus

The request fulfillment status.

Returns
Type Description
System.Collections.Generic.IEnumerable<RewardDescription>

A list of RewardDescription giving us the reward information associated to the list of provided EPiServer.Core.ContentReferences.

Run(IOrderGroup, PromotionEngineSettings)

Checks the condition for all active promotions, and gives rewards for the promotions where the condition has been fulfilled. Promotions with higher priority (lower Priority value) will be evaluated first and all excluded promotions will not be evaluated.

Declaration
IEnumerable<RewardDescription> Run(IOrderGroup orderGroup, PromotionEngineSettings settings)
Parameters
Type Name Description
IOrderGroup orderGroup

The order group which will receive rewards.

PromotionEngineSettings settings

The settings for this run of the engine.

Returns
Type Description
System.Collections.Generic.IEnumerable<RewardDescription>

A list of RewardDescription telling whether any promotion was fulfilled, which items the promotion was applied to and to which amount.

Extension Methods