Posts

Showing posts with the label Personalization

Unit Test for Sitecore Custom Personalization Rule

Image
I assume that in your career path you all become chance to hands on implementation for Sitecore Custom Personalization Rule. If you did not, then I have already described in detail about Custom Personalization Rule implementation in my one of previous blog. See the Blog Post: Custom Personalization Rules in Sitecore Today I am going to share with you about implementation of Unit Test for Custom Personalization Rule. Custom Personalization Rule business logic: protected override bool Execute(T ruleContext) { if (_pageContext != null && !string.IsNullOrWhiteSpace(_pageContext.baseketValue)) { var deliveryType = _basketDetailsService.GetBasket(_pageContext.basketValue).deliveryType; if (deliveryType != null && deliveryType== DeliveryType.CashOnDelivery) { return true; } } return false; } In above sample piece of code, I have created two Serv...

Custom Personalization Rules in Sitecore 9

Image
Personalization allows you to deliver the target the component in which your visitor showing interest. For example, visitor visits or browse specific product feature, specification, details, etc. on website. So, you show personalized content to the visitor on the bases of his previous behavior on the website. You can create personalization rule on bases of The goal, Campaign, custom facet, etc. Your website will respond to the bases of above-defined rules and display or hide specific component or change its behavior. To start with custom personalization, you need to perform the below steps: Step 1:    Go to the path “ /sitecore/system/Settings/Rules/Definitions/Tags ” right-click on Tags and add new customize Tag (I have given a name CustomPersonalization): ...