Skip to main content

Using attributes and operators

Abstract

Using attributes and operators to define conditions or queries in Sitecore Discover.

You use attributes and operators extensively when you create widget variation rules to govern when and how results are displayed. You can define conditions in rule context and merchandising strategies.

This topic gives an overview of where these attributes come from, and some typical operators.

During initial setup, a Sitecore representative configures your Customer Engagement Console (CEC) for the attributes and categories in your data feed. Every time data is input to your system, the values for these attributes are updated to reflect your catalog. The list of attributes includes facets and fitments.

In the CEC, in the Domain Settings section, in the Attributes tab, you can see the complete list of attributes in your system.

Note

Only users assigned the TechAdmin role can access the Domain Settings. TechAdmins configure your implementation in this section.

When you build conditions or queries in a rule, you use operators to relate a value to an attribute. For example, you can select the is operator to set the attribute brand to a brand name.

The following sections briefly describe two types of operators.

Comparative operators: greater than and lower than

Use comparative operators like greater than or lower than when working with attributes with numerical values. With these operators, you can trigger the following rules:

  • When the stock quantity drops to a particular threshold, display a Low quantity banner.

  • Include or boost products when stock quantity exceeds a particular value.

Equality operators: is strictly and is strictly not

In a search results widget, in the Context section of a rule, you use the Is strictly operator to set shoes > dress shoes as a category value.

The rule is triggered when:

  • The context for a product listing page is shoes/dress shoes.

  • The product of a product details page belongs to the subcategory dress shoes.

  • You filter results on a search page by the facets shoe category and dress shoes.

The rule is not triggered when:

  • The context for a product listing page is /shoes (the parent of shoes > dress shoes).

  • The context for a product listing page is /shoes/dress shoes/loafer dress shoes (or the categories under shoes > dress shoes).

  • The product of a product details page belongs to the subcategory shoes (the parent of shoes > dress shoes).

  • The product of a product details page belongs to the sub-subcategory loafer dress shoes (or the categories under shoes > dress shoes),

  • You filter results on a search page by facet product type shoes (the parent of shoes > dress shoes).

  • You filter results on a search page by facet product type dress shoe type or loafer dress shoes (or the categories under shoes > dress shoes).

Note

The operator is strictly not is the reverse of the operator is strictly.