Best Practices for Efficient Facets in SuiteCommerce

Implement efficient facets in SuiteCommerce to enhance search performance, avoid clutter, and improve user experience.

·2 min read·View Oracle Docs

Efficient use of facets in SuiteCommerce can significantly enhance search performance and improve the shopping experience. By adhering to best practices, developers can avoid unnecessary complexity that could hinder performance and user satisfaction.

Facets

When integrating facets, remember that excessive or irrelevant facets can lead to performance issues. As you consider adding facets, ask yourself:

  • Is the filter useful? Will shoppers utilize it to refine their searches?
  • How many values will the facet return?
  • How many items will each of the facet values return?

Overly specific facets, such as those applicable only to a single product, may not aid shoppers effectively. Additionally, too many facets can overwhelm customers, leading to frustration during their shopping experience.

Best Practices

When configuring facets within your storefront, follow these guidelines to maintain efficiency:

  • Field Limits: Do not exceed 1200 total fields across Field Sets, Facet Fields, and Sort Fields. Otherwise, the search index rebuild may fail.
  • Facet Count: Limit facets to 40 or fewer. Though not a strict limitation, exceeding this number can lead to performance degradation.
  • Values per Facet: Each facet should not have more than 1,000 values.
  • Naming Convention: Ensure each facet value name is kept under 200 characters.
  • Necessity of Facets: Only include facets when they serve a clear purpose.

Optimizing Searches

When executing a request to the Item Search API, to optimize performance, omit include=facets from the URL unless necessary. Typically, facets are essential only on Product List pages. If some facets can be omitted for a specific query, utilize facet.exclude in your request URL to exclude unnecessary facets from the results.

Preventing Facets from Rendering in Search Results

To exclude specific facets from being selectable in filter options, modify the facets_facet_browse.tpl template. In this template, the Facets.FacetedNavigation child view includes a data-exclude-facets attribute where you can list the facets to prevent their display. For example:

html
<div data-view="Facets.FacetedNavigation" data-exclude-facets="commercecategoryname,category,myfacet,myotherfacet"><div>

Note: For implementations using SuiteCommerce or SuiteCommerce Advanced 2021.2 or later, the defineSearchMasterOptions() method available in the Environment component can be utilized to set site-wide defaults for the Item Search API, including options to stop facets from rendering across the platform.

Frequently Asked Questions (4)

What is the maximum number of facets recommended for optimal SuiteCommerce performance?
It is recommended to limit facets to 40 or fewer to avoid performance degradation in SuiteCommerce.
How can I prevent specific facets from appearing in search results?
To prevent specific facets from rendering, modify the `facets_facet_browse.tpl` template and use the `data-exclude-facets` attribute within the `Facets.FacetedNavigation` child view.
Is there a field limit I should be aware of when configuring facets?
Yes, do not exceed 1200 total fields across Field Sets, Facet Fields, and Sort Fields to prevent the search index rebuild from failing.
How can you optimize API requests involving facets for better performance?
To optimize API requests, avoid including `include=facets` in the URL unless necessary, and utilize `facet.exclude` to omit unnecessary facets when executing requests to the Item Search API.
Source: Best Practices Oracle NetSuite Help Center. This article was generated from official Oracle documentation and enriched with additional context and best practices.

Was this article helpful?

More in Commerce

View all Commerce articles →