Walkthrough: Adding an attribute as a facet

A facet is a dynamic search interface component that creates categories based on attribute values and makes it possible for visitors to filter search results using those categories. Facets can change based on a visitor's query.

This walkthrough describes how to:

  • Add an attribute and enable it as a facet

  • Configure the facet at the domain level

  • Enable the facet in the global widget

Add an attribute and enable it as a facet

To add an attribute and enable it as a facet:

Note

You can also edit an existing attribute and enable it as a facet. To do this, enable the attribute for facets in the Use For Features tab, as described in step 9, below.

  1. In the Customer Engagement Console (CEC), on the menu bar, click Administration > Domain Settings.

  2. Click Attributes > Add Attribute.

  3. In the attribute editing dialog, click Settings > Entity and then click the entity that this attribute applies to. Available entity options depend on your specific implementation.

  4. In the Display Name field, enter a display name for the attribute.

    For example, enter Author name.

  5. In the Attribute Name field, enter the attribute's key or property name. This value is used later in the source configuration.

    Tip

    The attribute name must be alphanumeric and lowercase with no spaces. Separate words with an underscore (_).

    For example, enter author_first_name.

  6. In the Placement drop-down menu, click Standard.

  7. In the Data Type drop-down menu, click the data type of the attribute.

    For example, click String.

  8. Optionally, enter values in the following following input fields:

    Default Value, Description, and Icon.

  9. On the Use For Features tab, select the Facets option. The Filters option is now selected automatically as this is required for facets to work as expected.

  10. Click Save.

  11. Click Publish. Confirm the action when prompted.

Configure the facet at the domain level

Marking an attribute for use with facets is usually enough to create a facet. However, you can apply additional settings , such as choosing the facet sorting order or boosting a particular facet value. For numeric-based facets where you want to show interval values, you'll need to specify the Interval and, optionally, the Bucket.

In this example, you'll further configure the facet to:

  • Show a maximum of 25 facet values. This is more than the default of 10.

  • Display facets values in descending alphabetical order.

To configure the facet in Feature Configuration:

  1. In the CEC, on the menu bar, click Administration > Domain Setting > Feature Configuration.

  2. Click Facets , and then next to the facet you just added, click Edit .

  3. In the MAX input field, enter the maximum number of facet values you want to show.

    For this example, enter 25.

  4. In the ORDER drop-down menu, click the order you want facet values to be sorted in.

    For this example, click Desc. Alphabetical.

  5. Click Save.

  6. Click Publish. Confirm the action when prompted.

Enable the facet in the global widget

After you configure a facet, you need to enable it in the global widget. Optionally, you can specify the order of facets.

Note

If there is a conflict between the settings you configure in the Global Widget Settings and Feature Configuration, the global settings are used at runtime.

To set up a facet in the global widget:

  1. In the CEC, on the menu bar, click Global Resources, then click Global Widget.

  2. On the Global Widget Settings tab, click the Facets card.

  3. To enable the facet, next to the facet you configured, click Enable .

    Note

    To disable a facet, click Disable . Do this when you do not want a facet to appear, but you want to keep the facet's configuration for use later on.

  4. Optionally, to reorder facets, drag facets or use the Push to Top and Push To Bottom arrows.

  5. Click Save.

  6. Click Publish. Confirm the action when prompted.

Do you have some feedback for us?

If you have suggestions for improving this article,