Try our conversational search powered by Generative AI!

K Khan
Mar 31, 2016
  2172
(1 votes)

Promotions That Drive Customer Engagement - Part2

A successful online promotional campaign is depending on 3 vital steps i.e.

Effective promotional strategy
Segmenting and targeting your clients
Evaluating promotions and correcting them

A successful promotional campaign requires a well though strategy to target every potential customer. For the best results businesses targets specific offers to the right people at the right time. At the same time evaluating your promotional campaigns, including client’s behaviour, profit margins or desired customer engagement can make a huge impact. Introducing user specific coupon codes is one of the ways to achive this.

Businesses usually have to find the best Ecommerce solution that fits with their business requirements and have to rely on that with very less customization. EPiServer’s new promotion system is potentially able to resolve any complex promotion scenarios that a business will be looking to achieve their business goals and can fit with any promotional model. 

How promotion system overall works?

Image custompromotions.PNG

Promotion Data (inherit EntryPromotion, OrderPromotion or ShippingPromotion): This is the model that makes up the promotion. In our case this is the visitor group we need to match and the discount percentage to apply to the order

Promotion Processor (inherit PromotionProcessorBase<T>): This processor evaluates eligibility for the promotions and returns an instance of IPromotionResult Promotion Result (implements IPromotionResult) This is returned by our processor and does the work of applying the promotion

Promotion Engine (inherit EPiServer.Commerce.Marketing.PromotionEngine): Evaluates the condition on all active promotions and gives reward to specific orders when the conditions are fulfilled.

New promotion system is capable to handle most complex promotion situations also even if those are not available out of the box. As even we can create our own custom promotion engine also if existing one is not fitting well with the current business.

How to create a custom promotion?

Best example so far is, http://www.david-tec.com/2015/07/creating-a-custom-promotion-with-the-new-episerver-commerce-9-promotion-engine-beta---part-1

How to create a custom promotion engine? *

You will require to implement a CustomPromotionEngine Class Inherited from EPiServer.Commerce.Marketing.PromotionEngine and register your CustomPromotionEngine for IPromotionEngine at site initialization

public class CustomPromotionEngine : EPiServer.Commerce.Marketing.PromotionEngine
    {

        public CustomPromotionEngine(EPiServer.Commerce.Marketing.PromotionProcessorResolver promotionProcessorResolver, 
            IContentLoader contentLoader,
            EPiServer.Commerce.Marketing.CampaignInfoExtractor campaignInfoExtractor,
            EPiServer.Commerce.Marketing.RewardApplicatorResolver rewardApplicator,
            EPiServer.Commerce.Marketing.IAdditionalPromotionInformationCreator additionalPromotionInformationCreator,
            EPiServer.Commerce.Marketing.ICouponFilter couponFilter, 
            ReferenceConverter referenceConverter) :
            base(promotionProcessorResolver, contentLoader, campaignInfoExtractor, rewardApplicator, additionalPromotionInformationCreator, couponFilter, referenceConverter)
        {
        }

        public override IEnumerable<RewardDescription> Run(Mediachase.Commerce.Orders.IOrderGroup orderGroup)
        {
        }
    }

How to add a coupon code into cart? *

Coupon codes stored via MarketingContext.Current.AddCouponToMarketingContext will not be processed via promotion engines. Instead, IOrderForm have a new property CouponCodes that can be used to record all the coupon codes applied on order. Promotion engine will process the IOrderForm.CouponCodes e.g.

(CartHelper.Cart.OrderForms[0] as IOrderForm).CouponCodes.Add("CoupoCode");

How to evaluate your coupon usage for reporting?

public class CustomCouponUsage : ICouponUsage
{
    public void Report(IEnumerable<PromotionInformation> appliedPromotions)
    {
        foreach (var promotion in appliedPromotions)
        {
            var code = promotion.CouponCode;
            //RedeemCouponCode class is a DDS based class to store entries for used coupons
            RedeemCouponCode red = new RedeemCouponCode();
            red.Color = "Red";
            red.CouponCode = code;            
            red.Redeem();
        }
    }
}

* It is tested on EPiServer Commerce 9.10.0, It may be different on older versions, This area is subject to change as is available in Beta mode.

Please note, this post is part of my research on new promotion systems and is not based on real time implementation, Feel free to discuss if you find something is dodgy.

Part 1

Part 3: Working Custom Promotion Engine, Record used coupons [In Progress]

Mar 31, 2016

Comments

Please login to comment.
Latest blogs
Optimizely and the never-ending story of the missing globe!

I've worked with Optimizely CMS for 14 years, and there are two things I'm obsessed with: Link validation and the globe that keeps disappearing on...

Tomas Hensrud Gulla | Apr 18, 2024 | Syndicated blog

Visitor Groups Usage Report For Optimizely CMS 12

This add-on offers detailed information on how visitor groups are used and how effective they are within Optimizely CMS. Editors can monitor and...

Adnan Zameer | Apr 18, 2024 | Syndicated blog

Azure AI Language – Abstractive Summarisation in Optimizely CMS

In this article, I show how the abstraction summarisation feature provided by the Azure AI Language platform, can be used within Optimizely CMS to...

Anil Patel | Apr 18, 2024 | Syndicated blog

Fix your Search & Navigation (Find) indexing job, please

Once upon a time, a colleague asked me to look into a customer database with weird spikes in database log usage. (You might start to wonder why I a...

Quan Mai | Apr 17, 2024 | Syndicated blog

The A/A Test: What You Need to Know

Sure, we all know what an A/B test can do. But what is an A/A test? How is it different? With an A/B test, we know that we can take a webpage (our...

Lindsey Rogers | Apr 15, 2024

.Net Core Timezone ID's Windows vs Linux

Hey all, First post here and I would like to talk about Timezone ID's and How Windows and Linux systems use different IDs. We currently run a .NET...

sheider | Apr 15, 2024