Sitecore Commerce Plugin to leverage Sitecore Personalization Rules Engine
Personalization is one of the key challenges for many Businesses as customers are nowadays looking for more than just an online store. They are looking for a personalized experience.
Sitecore offers a rule-based personalization engine that enables you to deliver targeted content to your visitors based on several criteria such as Dates, Geo-Localization, Browsing Behavior, Personas.
For more information on Sitecore Personalization : https://doc.sitecore.com/users/90/sitecore-experience-platform/en/personalizing-components.html
But what if you want your personalization to go beyond content and control product information itself, such as Pricing, Images, Inventory? This plugin was built to unlock this possibility.
The plugin i'm describing in this blog post, will help you achieve that.
The idea of this plugin consists in 3 simple steps:
- For targeted products, create a new variant and assign a personalization Id. ('Personalization Id' is an extension to the Variant Entity provided by this plugin).
- Create/Duplicate ProductList and/or ProductVariants DataSources and assign same Personalization Id as Step 1. (Templates were extended with 'Personalization Id' and package is provided with this plugin).
- Personalize PLP and/or PDP components by adding new Personalization Rules that will show specific DataSources created previously.
In this post i'll walk you through a usage example where i will enable a Discount Price on a product, only when used in the context of a Sitecore Campaign.
Expected Result:
While opening the Product detail page in a regular context, the page would display like below. As you can see the regular price is displayed.
When coming from a campaign context, the same Product detail page would look like below. As you can see, a discount is being applied.
Configuration Steps:
Step 1: Create a campaign using Sitecore Campaign Creator : https://doc.sitecore.com/users/91/sitecore-experience-platform/en/the-campaign-creator.html
Step 2: Select product(s) targeted by your campaign and create new variants for personalization:
1-Create a new Entity Version at the SellableItem level.
2-Create a new Variant and copy values from existing Variant or from Parent Sellable Item.
3-Add a Personalization ID with a Live Date and Expiry Date.
4- If your intention is to attach a discount to the campaign, add a Price Card to the newly created variant to reflect that.
Step 3: Add personalization Id to Data Source:
Packages installed with this plugin provide a new Data Source template '/sitecore/templates/Feature/Commerce Experience Accelerator/Catalog/Datasource/Personalization' to be used with 'Product Price' Rendering.
For this example, you need to create a new Data Source from 'Personalization' template and use same Personalization Id used in BizFx.
Step 4: Create Personalization Rule:
Select Personalization rule and associate with Data Source created earlier as shown below.
Reporting:
This plugin includes a new report that allows you to measure your personalization efficiency as shown below:
Conclusion:
- This plugin extends Sitecore Commerce Engine with Variant Personalization Component.
- It also Extends Sitecore Commerce SXA Pipelines with the logic for filtering the Variants based on Personalization.
- It adds a Personalization Report to Experience Analytics, to provide insights on Personalization usage and efficiency.
- It can easily be integrated with your project and customized if needed to meet your specific requirements.
- Check Github repo for Installation Steps and more information: https://github.com/XCentium/Leveraging-Sitecore-Personalization-Rules-in-Sitecore-Commerce