Expand my Community achievements bar.

SOLVED

Segment Rules are always resolved irrespective of values in client context

Avatar

Former Community Member

Hi,

As part of the personalization implementation in one of our projects, we have created few traits, similar to the trait available OOB at path: /libs/cq/personalization/components/traits/profileproperty/age. These traits are available in sidekick to be dragged while creating the segment rules for displaying different teasers on a page. The traits created are available in client context using the custom context store (following article: http://blogs.adobe.com/aemtutorials/2013/07/24/customize-the-client-context/). A boolean value is given to each trait instead of string as mentioned in the article. The JSON for custom store properties looks like this:

"trait1/key" : "trait1",

"trait1/label": "Label or trait1",

"trait1/value": true

This is repeated for all the traits. 

When we create a segment and load the client context, the segment rule turns to green if it gets resolved (i.e if the value given in trait's dialog and value in client context matches, it turns green else it stays grey). Here I am always getting the trait as green. It doesnt matter if equals operator checkes for true or false. It is green always. The JS and JSP's are the same as they are available OOB under node:  /libs/cq/personalization/components/traits/profileproperty/age.

How to make segment read the proper value as per the client context value and resolve the segment rule accordingly?

1 Accepted Solution

Avatar

Correct answer by
Level 10

Sounds like something was not configured properly. See this AEM article:

https://helpx.adobe.com/experience-manager/using/personal61.html

View solution in original post

2 Replies

Avatar

Level 3

You should ensure that the type of the property in the trait dialog and the type of tht property in the client context is the same for correct resolution.

Avatar

Correct answer by
Level 10

Sounds like something was not configured properly. See this AEM article:

https://helpx.adobe.com/experience-manager/using/personal61.html