We are in an era of horizontal learning and now we are going to vertical learning. Digital transformation on learning is not optional anymore as community and business are going faster than education. There is no time to wait for HR to send you to the course, and we need to own our learning ownership!
That is why in Sudo Roux we are pushing for the change, the transformation that needs not just push learning to the next leve but the experience to the next level. UTS was the first starting point, and we are aiming for much bigger. Watch the video and ask us how!
We are back with awesome gathering (obviously online) for our awesome developers. Our agenda:
Darren Stahlhut presents AI 1:1 Personalisation with Episerver Content Intelligence & Recommendations – Darren Stahlhut is Technical Director of Digital @ Empired, with more than 16 years experience across .NET CMS & DXPs. Darren is an Episerver MVP and certified developer of Episerver, Sitecore and Kentico.
Ronil Rangaiya presents “YAML with Deployment API” to setup CI/CD pipelines in Azure DevOps – Ronil Rangaiya is Digital Technical Architect @ Empired, with more than 10 years experience designing and implementing digital experience solutions, Ronil is certified in Episerver CMS and Commerce
it will happen online at Wed, August 5, 2020, 6:30 PM – 8:00 PM AEST. We love to see you all online so if you are interested please register here.
Episerver has quite nice mechanism on validating cart, line item, shipment , , promotion and inventory. I was looking into customizing the line item validtion, to inject some business logic. To do this:
First create new class and inherit from ILineItemValidator
public class CustomLineItemValidator : ILineItemValidator
private readonly ILineItemValidator defaultImplementation;
private readonly IOrderRepository orderRepository;
public CustomLineItemValidator(ILineItemValidator defaultImplementation,
this.defaultImplementation = defaultImplementation;
this.orderRepository = orderRepository;
public bool Validate(ILineItem lineItem, IMarket market, Action<ILineItem, ValidationIssue> onValidationError)
return defaultImplementation.Validate(lineItem, market, onValidationError);
public bool Validate(ILineItem lineItem, MarketId marketId, Action<ILineItem, ValidationIssue> onValidationError)
return defaultImplementation.Validate(lineItem, marketId, onValidationError);
private bool AlreadyPurchased(ILineItem lineItem)
var alreadyPurchased = false;
var customerId = lineItem?.ParentOrderGroup?.CustomerId;
if (customerId != null)
var orders = orderRepository.Load<IPurchaseOrder>(customerId.Value);
if (orders != null)
alreadyPurchased = orders.Any(a => a.GetAllLineItems()
.Any(l => string.Equals(l.Code,
In our example above, we are checking to make sure if the user already purchased the item before and if that is a case we return false as a result of validation. It may be weird but our customer has this requirement and it is meaningful in their context. As you can see we are re-using existing line item validator as well.
2. Next step is to inject our new validator to the DI:
public class DependencyResolverInitialization : IConfigurableModule
private static readonly ILogger logger = LogManager.GetLogger();
public void ConfigureContainer(ServiceConfigurationContext context)
var services = context.Services;
(locator, defaultImplementation) =>
As you can see on DependencyResolverInitialization class, I added a new section to intercept the ILineItemValidator. If you are not sure what I’m speaking of you can read more about it here.
If you are having ‘Commerce Manager’ make sure you do same thing in both CommerceManager and Shopfront projects!
As you can see we just make sure the campaign is being created and our key in this stage is ‘Campaign Name’ which may be not good enough for some scenarios but for us is enough. Second I’m loading ALL campaigns and iterate through them to find a specific campaign. Again in our scenario, it will not that much effect but if the commerce you are dealing with has MANY campaigns you can use LoaderOptione as below:
As you can see generating a discount is very straight forward. I used ‘BuyQuantityGetItemDiscount’ which fits for my purpose but you can use any out of the box or custom discount you want. Discount which I used ‘BuyQuantityGetItemDiscount’ require to define what catalog item can this discount can be applied. I’m including all current site catalog (I’m getting it from start page which is custom property) but you can use any other method (e.g. iterate through all catalogs and include all catalogs). There is a flag ‘MatchRecursive’ which is set to true, means all descendants of selected items will include in promotion.
So finally we need to call these method full code as bellow:
First Episerver Ascend in the APAC area was very exciting. First I realized how many friends I found through Episerver and it is not just the platform I loved it helped me to find heaps of good friends.
Starting the day Episerver Regional Director APAC Natalia Gamarra kicked off the event with the agenda:
Next Episerver CEO Alex Atzberger spoke about Personalization and Privacy and how it can change the user acquisition:
And focus of Episerver to “empowering growing companies to compete digitally”
Jacob Khan VP, Solution Architecture spoke about the road map and Episerver focus on the personalization:
Next presenter was Niteco spoke about best practices when dealing with digital transformation. Nicola Ayan started with best technical best practices for digital transformation:
And then Michelle Tran follows the conversation on best practice for design and strategy:
The concept of personalization is a wide range. I’m working on a project that needs personalization and started to learn. One cool thing I learn from “Foundation” project (Foundation is a very good sample of all Episerver offerings) is how to build a code to use Episerver Tracking Commerce. Again I’m learning and please advise me if I can improve any part of it 🙂
Please read through how to install tracking Nuget package from here
The next step is to create a separate project in your solution and add a commerce tracking package to the solution. Then add a class as below:
Recently Episerver announced for Episerver ASP.Net Core program. This is really exciting news, as .Net Community (aka Microsoft!) announced focus more on .Net Core (means no more new version of .Net Framework!). Details of how Episerver is going to do it will be available here. So what is good about it:
The presentation layer can be written on lovely ASP.Net Core platform
.Net Core is lightweight compare to .Net framework. The presentation conceptually would be lean and faster! (I not sure if it would be a case anyway!)
Developers would be happy that they are working on edge technology!
Now what I think would be interim challenges until upgrading the whole platform:
Running two applications (for CMS) and three applications (for Commerce).
For page rendering, another HTTP call required that to be a potential failure point – means when something goes wrong developer needs more time to find the issue and that means more APPLICATION LOGGING!
Page Templates (aka Razor Templates) should be running on both PRESENTATION and EDITOR view. This perhaps makes it quite complicated as now we need ANOTHER project to share MODELS! And the concept of ‘Feature Group‘ we are using for a while needs to be reconsidered – Having said that there could be some ways to avoid duplicated views!
I have a very positive feeling about this Episerver move and I know it would be complicated both for Episerver Devs and external Devs and we all love challenges!
It was a really good gathering and I personally learn a lot.
Damien Dias from Episerver went through Episerver CMS and eCommerce certification exams. He gave a very good brief about what is his journey to get the certifications and shared tips around the main area of the exams.
The second part we had Darren Stahlhut from Luminary that he spoke about the really cool framework called Blazor from Microsoft (it is still not released!) and he married up Blazor with Episerver which was really cool. You read about it more here.