Anonymous visitors break personalization rules in Sitecore Experience Commerce

  • An error occurs when an anonymous visitor tries to visit a page with Sitecore Experience Commerce (SXC) related personalization rules applied. The error leads to an issue that the personalization rule is considered as true even if the conditions are not met. The following exception can be found in the log files:

    ERROR Evaluation of condition failed. 
    Rule item ID: Unknown, condition item ID: {9D3B7B5B-48BA-4B54-A522-166FFDEAC33D}
    Exception: System.InvalidOperationException
    Message: userId
    Source: Sitecore.Commerce.Engine.Connect
       at Sitecore.Commerce.Engine.Connect.Pipelines.Carts.GetCarts.Process(ServicePipelineArgs args)
       at (Object , Object )
       at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
       at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists)
       at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
       at Sitecore.Commerce.Pipelines.PipelineService.RunPipeline[TArgs](String pipelineName, TArgs args)
       at Sitecore.Commerce.Services.ServiceProvider.RunPipeline[TRequest,TResult](String pipelineName, TRequest request)
       at Sitecore.Commerce.Rules.Conditions.BaseCartMetricsCondition`1.Execute(T ruleContext)
       at Sitecore.Rules.Conditions.WhenCondition`1.Evaluate(T ruleContext, RuleStack stack)
       at Sitecore.Rules.RuleList`1.Run(T ruleContext, Boolean stopOnFirstMatching, Int32& executedRulesCount)
  • For SXC 9.1 Initial Release, download and install the following hotfix: SC Hotfix-333939-1. See the readme file inside the archive for installation instructions.

    Do not install it in combination with other hotfixes. If you have other SXC hotfixes installed or need a fix for different SXC version, contact Sitecore Support.

Applies to:

Sitecore Experience Commerce 9.1 Initial Release

July 08, 2019
July 08, 2019

Reference number: