Try our conversational search powered by Generative AI!

K Khan
Feb 18, 2016
(4 votes)

Promotions That Drive Customer Engagement - Part1

Offers. Deals. Promotions. Rebates. Coupons. No matter what they are called, offers are a mainstay of loyalty marketing. Customers expect offers from brands and deals have become an integral part of the customer buying behavior. (Recall JC Penney’s recent experience.) This is also true of loyalty programs where promotions drive new or additional purchases. So, promotions create a level of brand engagement. But the experience can be more of a quick hit than a lasting relationship and managing the growing inventory of offers can be a real marketing challenge. (Published in Loyalty Management, the online magazine of, By: Brett Battles, EcoRebates)

EPiServer came with a revoltionary solution for Promotions to answer the changing demands of sharp brains of Mr. Marketing guy. There is a long list of promotions that we are/will be reciving in updates*. 

1. Buy any entry contained within a single [category] and receive a [discount] on all entries located within all child categories.
2. Buy [N] items from [category / set of categories/ catalog entry] and receive a [discount] off any item in different [category / set of categories/ catalog entry].
3. Buy [N] quantity from [category / set of categories/ catalog entry] at a [discount (for every selected item)].
4. Buy [N] quantity from [category / set of categories/ catalog entry] and get the cheapest item for free.
5. Buy [N] items from [category / set of categories/ catalog entry] and get the most expensive item for free.
6. Buy [N] items from [category / set of categories/ catalog entry] and get a [discount] on everything in the cart.
7. Buy any product from [category / set of categories /catalog entry] and receive [discount] off shipping costs.
8. Buy any product from [category / set of categories /catalog entry] and receive free shipping.
9. Spend [currency amount] and receive a [discount] from [N] items from [category / set of categories / catalog entry]
10. Spend [currency amount] and receive a [discount]
11. Spend [currency amount] and receive free item(s)
12. Spend more then [currency amount] and receive [discount] off shipping [type, all types] costs.
13. Spend more then [currency amount] and receive free shipping [type, all types] costs
14. Multiple coupon codes per promotion with the ability to limit the number of times and maybe expiration dates
15. Calculate the discounted prices without having to add a product to a cart

*this is a preliminary list and is subject to change.

And that's not end of it, As a developer we will be able to develop new kind of promotions very rapidly also. In order to use the new promotion system in the workflows WorkflowsVNext feature must be switched on in

    <add feature="WorkflowsVNext" state="Enabled" type="Mediachase.Commerce.Core.Features.WorkflowsVNext, Mediachase.Commerce" />

or use the service locator.

var featureSwitch = ServiceLocator.Current.GetInstance<IFeatureSwitch>();
featureSwitch.Features.Add(new WorkflowsVNext());
featureSwitch.EnableFeature(WorkflowsVNext. FeatureWorkflowsVNext);

Campaigns provide a way to organise marketing activities. In new promotions system, Campaigns are content-based (a type of IContent). It is similar to pages, blocks and catalog data. You work with them in the same way using API, as we do for other Content Types inherited from IContent (e.g. IContentRepository). All Compaigns are managed under a compaign folder i.e. direct child of root node. EPiServer.Commerce.Marketing.SalesCampaign is a out of the box commerce-specific campaign extending the EPiServer.Core.CampaignData with a revenue goal. To create custom campaign we preferabbly can inherit from EPiServer.Commerce.Marketing.SalesCampaign

A custom campaign:

public class CustomCampaign : EPiServer.Commerce.Marketing.SalesCampaign
        [Display(Name = "Region")]
        public virtual string Region { get; set; }

Creating Campaign programatically

public static class CampaignHelper
        public static CustomCampaign CreateCampaign(string name, string code, string description, string region)
            var repository = ServiceLocator.Current.GetInstance<IContentRepository>();
            var campaign = repository.GetDefault<CustomCampaign>(CampaignFolder.CampaignRoot);

            campaign.Name = name;
            campaign.Description = description;
            campaign.Code = code;
            campaign.Region = region;
            campaign.IsActive = true;
            campaign.ValidFrom = DateTime.Today;
            campaign.ValidUntil = DateTime.Today.AddMonths(1);
            campaign.RevenueGoal = 1000000;

            repository.Save(campaign, SaveAction.Publish, AccessLevel.NoAccess);

            return campaign;

Creating Custom Promotions: Part 2

Feb 18, 2016


Feb 18, 2016 06:29 PM

Nice write up. Looking forward to reading part 2 ;)

Mark Prins
Mark Prins Mar 31, 2016 02:28 PM

You create a custom Campaign here. Would it be possible to create a campaign of this custom type from the editor? It seems by default you can only create campaigns of the type SalesCampaign in the editor.

K Khan
K Khan Mar 31, 2016 04:08 PM

Have you tried with the latest version?

Please login to comment.
Latest blogs
Microsoft announces Natural language to SQL

Finally, Microsoft launches "Natural language to SQL," after it has been available for several months in Optimizely CMS!

Tomas Hensrud Gulla | May 23, 2024 | Syndicated blog

Five easy ways to start personalizing your content right now

If you clicked on this article, you already know that getting the right message to the right person at the right time helps drive conversions and...

Kara Andersen | May 23, 2024

ExtendedCms.TinyMceEnhancements – serwer side webp support

Today I will introduce another small feature of TinyMceEnhancements plugin. The functionality is used to automatically detect whether a browser...

Grzegorz Wiecheć | May 22, 2024 | Syndicated blog

Azure AI Language– Detect Healthcare Content in Optimizely CMS

In this blog post, I showcase how the Azure AI Language service's Text Analytics for health feature can be used to detect healthcare content within...

Anil Patel | May 22, 2024 | Syndicated blog