Sitecore XM Cloud Embedded Personalization's variants limitation and resolution Part 1
Part 1 of this article covers the Sitecore Pages personalization and its limitations. Part 2 of this article will provide the workaround for the limitations with a real-world scenario and code sample.
In Sitecore XM Cloud, we are personalizing the item using Sitecore Pages with the help of the audience rule.
The personalization feature is working with the help of lightweight Sitecore Personalize, which we don't have access to, so we cannot see the audience rule(Variant) that we have created in the Sitecore XM Cloud Pages for an item in the lightweight Sitecore Personalize application.
Suppose still we want to get the details like the Client key for configuration purposes or to verify the personalization rule using the CallFlows API manually using Postman, etc. In that case, we need to connect with the Sitecore representative to get the information about credentials details like the Client key, etc.
If we have a separate Sitecore Personalize license, we can link it to the Sitecore XM Cloud with the help of a Sitecore representative. Thus, we can now use the linked Sitecore Personalize instead of the lightweight Personalize provided by Sitecore out of the box.
This gives us complete control, allowing us to view the Audience rule in the Sitecore Personalize portal. We can easily access all necessary information, such as the friendly ID, which is essential for conducting API testing in Postman with the help of Callflows API.
Configuration of Personalization:
- In XM Cloud Pages click on any item which we want to do personalization
- Click on the Personalize tab, so that we can create audience rules for the item that needs to be personalized.
- An item can only have 8 variants of the audience rule, so personalizing it with more than 8 audience rules is not possible.
- Personalization can be done only on the page level, not at the component level. If we want to personalize a component, we need to create an audience rule variant and update only the component that we want to personalize instead of touching all other components on the page.
- We can use the out-of-the-box audience condition to define the rule for personalization, but if we have linked with the Sitecore Personalize product, then the XM Cloud will provide a new option called custom condition. From there, we can access the condition created in Sitecore Personalize instead of using the out-of-the-box audience condition rules. We can also mix and match both out-of-the-box and custom condition rules.
- The below screenshot shows the item's audience rule in the linked Sitecore Personalize application.
- Now once we configured the audience rule in the Sitecore XM Cloud pages and after publishing to Edge then the nextjs application's personalize addon middleware is responsible for doing the personalization of the page.
- The Personalization middleware gets the layout service and identifies if there are any variants available for the requested page, if any variant is available then the middleware triggers the CallFlows API to Sitecore Personalize (either out-of-box lightweight or Sitecore Personalize if linked with XM cloud) to find the audience rule matched or not,
- Once the response is provided with the matched variant the middleware will do the necessary steps to get the personalized content for components personalized in the page.
Comments
Post a Comment