Generic facet rules for Sitecore XP Segment Lists

People profiles being filtered

The standard Sitecore installation provides a few account facet segmentation rules, in particular, if there are custom facets, you will need to implement a new segmentation rule that may involve code change and releases. To save time, I created a library with a set of generic rules for basic comparisons that can work with standard and custom facets.

Segmentation Rules -Search Query

To download and install it click on the link and follow the readme steps: Sitecore Generic Facet Filters

Once it is installed, you will be able to create segmentation rules like below:

Segmentation Rules -Search Query - Examples

To add custom facet conditions, open the Content Editor and go to the item on path /sitecore/system/Settings/Rules/Definitions/Elements/Generic Facet Filter Segmentation – Search Query, then look for the correspondent condition type (String, DateTime, or Integer) and insert the custom facet and property(ies) under Facets folder:

Segmentation Rules -Search Query - Add Custom Facet Property

Important! Set the Facet item name and Property item name as the same as on the custom facet.

For the facet item, it requires setting the facet type as the print screen below, it is necessary due to the limitations of running queries on Sitecore Segmentation Seach Query context, see references for more details about its limitations.

Segmentation Rules -Search Query - Add Custom Facet

References

Leave a Reply

Your email address will not be published. Required fields are marked *