Facet Management

With facet management, you can easily configure and customize your storefront facets.

Features

  • Define allowed facets
  • Configure displayName
  • Configure displayType
  • Configure selectionType
  • Configure limitCount
  • Configure minCount
  • Configure position

Configuring SPARQUE for Facet Management

SPARQUE Desk

SPARQUE Hub requests SPARQUE Desk for all possible facets, typically mapped as attributes. In SPARQUE Desk, you need to create a strategy that outputs all available properties, which can later be configured as facet configuration. Assign this strategy to the facets endpoint within the hub API.

SPARQUE Hub

SPARQUE Hub consumes the endpoint api/hub/e/facets to identify the properties you wish to configure as facets. Within SPARQUE Hub, you can add a new “Facet Group Rule Set”. Typically, each rule set corresponds to a specific channel. If you manage multiple channels, Intershop recommends to create a separate facet group rule set for each channel.

After creating the channel configuration (if there are no additional channels, you can simply name it "default"), you can proceed to create rules. You have the option to select specific facets you want to configure or just select them all. By default, each selected facet is initially disabled. At this stage, you can configure your facets according to your preferences. The following settings are available:

Allowed facets:

  • Let users configure allowed facets per dataset.
    • Once configured, all facets are disabled by default
    • You can enable facets individually

displayName:

  • Users can enter a (commercial) name:
    • text field (name)
    • text field (localization)

displayType:

  • Users can choose between:
    • checkbox (default)
    • dropdown
    • text

selectionType:

  • Users can choose between:
    • multiple (default)
    • single

limitCount:

  • Users can define a number

minCount:

  • Users can define a number

position:

  • Set positions for a facet (visible within category pages and the search results page)
  • Users can define a number:
    • A number can be chosen once
    • You can rank the overview of facets based on this number

After saving, SPARQUE Hub creates a dataset hub with a pipeline and loads the dataset. At this stage, there is a connection between the attributes and the facet configuration.

Wrapper

The wrapper includes the facet configurations in the response. See the example below:

{
      "id": "3D compatibility",
      "title": "3D compatibility",
      "rank": 2,
      "options": [
        {
          "score": 2,
          "value": "N"
        },
        {
          "score": 1,
          "value": "Y"
        }
      ],
      "attributes": [
        {
          "name": "has-facet-config",
          "value": [
            {
              "displayName": {
                "default": "3D compatibility"
              },
              "displayType": "checkbox",
              "enabled": "true",
              "identifier": "0fc0a5b8-eda3-413c-89b8-84af278e5fe3",
              "propertyNameId": "https://www.sparque.ai/propertyname/3D+compatibility",
              "selectionType": "multiple/and",
              "facet-config-for-channel": [
                {
                  "channelId": "default"
                }
              ]
            }
          ]
        }
      ]
    }

Required Desk Setup

  1. Create an API: hub
  2. Create a strategy which outputs all possible attributes (later called “facets”) and assign to the facets endpoint within the hub API
  3. Update strategy facets to only allow enabled facets.
  4. Update the API result-description:
    • Add an inclusion from your attribute to your facet configuration,
    • Add an inclusion from facet to your channel.

Example:

{
            "class": "https://www.sparque.ai/propertyname",
            "level": 1,
            "mode": "full",
            "attributes": [
                {
                    "name": "identifier",
                    "type": "STRING",
                    "aggr": "most_frequent",
                    "splitLanguages": true
                },
                {
                    "name": "name",
                    "type": "STRING",
                    "aggr": "most_frequent"
                }
            ],
            "constants": [],
            "includes": [
                {
                    "class": [
                        "https://www.sparque.ai/facet"
                    ],
                    "cardinality": "*",
                    "level": 100,
                    "prefix": "has-facet-config",
                    "dense": false,
                    "predicate": "has-facet-config",
                    "reverse": true
                }
            ]
        }