Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

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
Remove a segment from the URL in CMS 12

Problem : I have created thousands of pages dynamically using schedule jobs with different templates (e.g. one column, two columns, etc..) and stor...

Sanjay Kumar | Jun 21, 2024

Copying property values part 2

After publishing my last article about copying property values to other language versions, I received constructive feedback on how could I change t...

Grzegorz Wiecheć | Jun 18, 2024 | Syndicated blog

Enhancing online shopping through Optimizely's personalized product recommendations

In this blog, I have summarized my experience of using and learning product recommendation feature of Optimizely Personalization Artificial...

Hetaxi | Jun 18, 2024

New Series: Building a .NET Core headless site on Optimizely Graph and SaaS CMS

Welcome to this new multi-post series where you can follow along as I indulge in yet another crazy experiment: Can we make our beloved Alloy site r...

Allan Thraen | Jun 14, 2024 | Syndicated blog