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 Loyalty360.org, 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 ecf.app.config

    <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
Optimizely SendGrid SMTP host is deprecated

SendGrid is a services for sending email that is included in Optimizely DXP. Previously smtp.episerver.net was the recommended SMTP server to use,...

Tomas Hensrud Gulla | Dec 4, 2022 | Syndicated blog

Hosting Optimizely CMS 12 on Docker Engine

Since Optimizely CMS can now be deployed as a Docker container, here is a demonstration of building, running and scaling an Optimizely CMS 12 site ...

Stefan Holm Olsen | Dec 4, 2022 | Syndicated blog

How to use CacheTagHelper with content areas in Optimizely CMS 12

I might be going out on a limb here - if you have a better solution, feel very free to share it!  Upgrading your Optimizely web application from .N...

Andreas J | Dec 2, 2022

The 1001st Piece in your 1000 Piece Puzzle: .NET Default Interface Functions

I was recently working with a client who wanted a reasonably large subsystem added to Optimizely that would add automated management to their...

Greg J | Nov 28, 2022 | Syndicated blog