Labels for Facets (January '21 Release)

You can now add labels to facets! By default, facet names are taken from the Knowledge Graph field name, but now you have the flexibility to override the name of the facet in your Answers Frontend. This is particularly useful when using built-in profile fields which have fixed Knowledge Graph field names. For example, you may want the Knowledge Graph field titled “Insurance Accepted” to read “Our accepted insurances” when users are searching for Locations.

To override the name, you can set label in the fields in your Facets configuration (under componentSettings in your config.json). This controls the label for the facet itself (such as “Insurance Accepted”), not the facet options (such as “cigna”, “blue cross blue shield”, etc).

Your syntax could look as follows:

"componentSettings": {
  "Facets": {
    "fields": {
        "insuranceAccepted": {
            "label": "Our accepted insurances", 
            "searchable": true,
            "searchLabelText": "Search for insurance accepted",
            "placeholderText": "Search"       
        }
     }
  }
}

To learn more about this feature, visit the Answers Implementing Facets training unit.

Have any feedback or questions? Leave us a note below!

2 Likes