close

Filter

loading table of contents...

Personalization Hub Manual / Version 2310

Table Of Contents

3.3.4 Working With Customer Segments

Customer segments represent groups of website visitors. Users belong to a segment if they satisfy the conditions associated with the respective segment, for example if a user is a premium user and at most 35 years old.

Segment conditions are stored in a property of a content type that represents segments in your application. In CoreMedia Blueprint, this content type is called CMSegment. These conditions are used by the SegmentSource to determine membership in a segment.

CoreMedia Adaptive Personalization offers a CoreMedia Studio field editor for segment conditions called ConditionsField.

Configuring the SegmentSource

SegmentSource is a ContextSource implementation that evaluates segment conditions to determine the current user's membership in a segment. The source evaluates the conditions in its preHandle method for each request. The conditions are applied to the contents of the ContextCollection at the time of invocation of preHandle, thus the SegmentSource must be placed behind all other sources that provide context information used in the segment conditions.

Membership in a segment is indicated by a property of the segment's simplified content ID (content:<id>) of the content item representing the segment. So a segment represented by content 42 will be mapped to the property 'content:42'. This property is set to the Boolean value 'true' if the user is a member of the segment; segments a user does not belong to are either not represented in the context or are assigned a value of 'false'.

The SegmentSource requires a reference to the Cache used for storing preprocessed segment conditions and to the ContentRepository to retrieve segment content items. Further, as with all sources, you've got to provide the name of the context to be used to store the segment properties.

Optionally, you may configure in which folder of the repository the source looks for segment content items, the content type used to represent segments, and the name of the property of the content type that contains the segment conditions.

Property Name Required Default Description
cache Yes   Reference to the CoreMedia Cache to be used to store preprocessed segment conditions.
contentRepository Yes   Reference to the content repository containing the segment content items.
contextName Yes   Name to be used for the context containing the segment properties.
pathToSegments No /System/personalization/segments Repository folder in which to look for segment content items.
segmentDocType No CMSegment Name of the content type used to represent customer segments.
conditionPropertyName No condition Property of the segment content type that contains the segment conditions.

Table 3.6. Properties of SegmentSource


Configuring the property editor used for segment conditions

ConditionsField is a property editor for conditions. This editor is configured similar to the SelectionRuleField by supplying the list of supported condition types and their mapping to user profile properties.

Configuring the SelectionRulesField to offer conditions on customer segments

To enable conditions on customer segments in the SelectionRulesField property editor, configure the SegmentCondition component. Make sure its propertyPrefix attribute matches the name of the context object used for storing segments in the CAE.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.