Class PromotionFilterContext
Contains a collection of Promotion
Inheritance
Inherited Members
Namespace: EPiServer.Commerce.Marketing
Assembly: EPiServer.Business.Commerce.dll
Version: 13.30.0Syntax
public class PromotionFilterContext
Constructors
PromotionFilterContext(IEnumerable<PromotionData>, RequestFulfillmentStatus)
Initializes a new instance of the Promotion
Declaration
public PromotionFilterContext(IEnumerable<PromotionData> promotions, RequestFulfillmentStatus requestedStatuses)
Parameters
Type | Name | Description |
---|---|---|
System. |
promotions | The promotions. |
Request |
requestedStatuses | The statuses to generate Reward |
Properties
ExcludedPromotionDescriptions
Contains Reward
Declaration
public IEnumerable<RewardDescription> ExcludedPromotionDescriptions { get; }
Property Value
Type | Description |
---|---|
System. |
IncludedPromotions
Contains the included promotions, i.e. the promotions that have fulfilled the
conditions of the filters that have processed the context and are kept for
evaluation by the Promotion
Declaration
public IEnumerable<PromotionData> IncludedPromotions { get; }
Property Value
Type | Description |
---|---|
System. |
RequestedStatuses
Gets the statuses to generate Reward
Declaration
public RequestFulfillmentStatus RequestedStatuses { get; }
Property Value
Type | Description |
---|---|
Request |
Methods
AddCouponCode(Guid, String)
Adds a connection between a promotion and a coupon code to describe that
the promotion was included (i.e. kept in Included
Declaration
public void AddCouponCode(Guid promotionGuid, string promotionCode)
Parameters
Type | Name | Description |
---|---|---|
System. |
promotionGuid | The promotion identifier. |
System. |
promotionCode | The promotion code. |
AddVisitorGroup(ContentReference, Guid)
Adds a connection between a campaign and a visitor group to describe that the
promotions of the campaign were included (i.e. kept in Included
Declaration
public void AddVisitorGroup(ContentReference campaignLink, Guid visitorGroupId)
Parameters
Type | Name | Description |
---|---|---|
EPi |
campaignLink | The campaign link. |
System. |
visitorGroupId | The visitor group ID. |
ExcludePromotion(PromotionData, FulfillmentStatus, Boolean)
Excludes a promotion from Included
Declaration
public void ExcludePromotion(PromotionData promotion, FulfillmentStatus reason, bool createDescription)
Parameters
Type | Name | Description |
---|---|---|
Promotion |
promotion | The promotion to exclude. |
Fulfillment |
reason | A reason for excluding the promotion. Used to add an instance to
Excluded |
System. |
createDescription |
|
GetCouponCode(Guid)
Gets the coupon code that was used to include a promotion (i.e. kept in
Included
Declaration
public string GetCouponCode(Guid promotionGuid)
Parameters
Type | Name | Description |
---|---|---|
System. |
promotionGuid | The promotion identifier. |
Returns
Type | Description |
---|---|
System. |
The used coupon code, or |
GetVisitorGroup(ContentReference)
Gets the visitor group that the filter used to include the promotions of a campaign (i.e.
keep the promotions in Included
Declaration
public Guid? GetVisitorGroup(ContentReference campaignLink)
Parameters
Type | Name | Description |
---|---|---|
EPi |
campaignLink |
Returns
Type | Description |
---|---|
System. |
The id of the EPi |