Facet rules tools

list_site_search_facets

Lists the site-search facet rules for an account. Facets are the filter options shown alongside search results, such as Brand, Color, Price range, or Size. A facet rule controls which facets appear, their order, and how they behave, for example multi-select versus single-select. This tool returns every site-search facet rule in one response, without pagination.

Use get_facet_rule for a rule's full configuration. For global facets that apply across both site search and category pages, use list_facets_global. For category-specific facets, use list_category_facets.

Request parameters

NameTypeRequired?Description
merchant_keystrYesThe merchant key identifying the account, for example your-account.

Response parameters

The tool returns a CustomizationsResponse object with the following parameters:

ParameterTypeDescription
successboolWhether the request succeeded.
datalist[CustomizationSummary]The facet rule summaries.
errorstr | nullError message if the request failed.

The CustomizationSummary object has the following fields:

FieldTypeDescription
idintThe unique customization ID.
namestr | nullThe rule's display name.
ruleTypestrThe rule type, facet.
isEnabledbool | nullWhether the rule is currently enabled.
syncStatusstr | nullSync status: SUCCESS, QUEUED, FAILED, EXPIRED, or FUTURE.
querieslist[CustomizationQuery]The queries this facet rule applies to.
groupBystr | nullThe group-by attribute, for example color.

The CustomizationQuery object has the following fields:

FieldTypeDescription
idint | nullThe query identifier.
querystr | nullThe query text, for example green shoes.
typestr | nullThe query type, for example sitesearch or category.

list_facets_global

Lists the global facet rules for an account. Global facet rules apply across both site-search and category pages, so shoppers see a consistent set of filter options however they navigate the catalog. This tool returns every global facet rule in one response, without pagination.

Use get_facet_rule for a rule's full configuration. For site-search facets, use list_site_search_facets. For category facets, use list_category_facets.

Request parameters

NameTypeRequired?Description
merchant_keystrYesThe merchant key identifying the account, for example your-account.

Response parameters

The tool returns a CustomizationsResponse object with the following parameters:

ParameterTypeDescription
successboolWhether the request succeeded.
datalist[CustomizationSummary]The global facet rule summaries.
errorstr | nullError message if the request failed.

The CustomizationSummary object has the following fields:

FieldTypeDescription
idintThe unique customization ID.
namestr | nullThe rule's display name.
ruleTypestrThe rule type, facet.
isEnabledbool | nullWhether the rule is currently enabled.
syncStatusstr | nullSync status: SUCCESS, QUEUED, FAILED, EXPIRED, or FUTURE.
querieslist[CustomizationQuery]The queries this facet rule applies to.
groupBystr | nullThe group-by attribute, for example color.

The CustomizationQuery object has the following fields:

FieldTypeDescription
idint | nullThe query identifier.
querystr | nullThe query text, for example green shoes.
typestr | nullThe query type, for example sitesearch or category.

list_category_facets

Lists the category facet rules for an account. Category facet rules control which facets appear on category pages and how they behave. Unlike global facets that apply everywhere, category facets are specific to browsing. For example, a Size facet can appear only on clothing categories, or a Resolution facet only on electronics. This tool returns every category facet rule in one response, without pagination.

Use get_facet_rule for a rule's full configuration. For site-search facets, use list_site_search_facets. For global facets, use list_facets_global.

Request parameters

NameTypeRequired?Description
merchant_keystrYesThe merchant key identifying the account, for example your-account.

Response parameters

The tool returns a CustomizationsResponse object with the following parameters:

ParameterTypeDescription
successboolWhether the request succeeded.
datalist[CustomizationSummary]The category facet rule summaries.
errorstr | nullError message if the request failed.

The CustomizationSummary object has the following fields:

FieldTypeDescription
idintThe unique customization ID.
namestr | nullThe rule's display name.
ruleTypestrThe rule type, facet.
isEnabledbool | nullWhether the rule is currently enabled.
syncStatusstr | nullSync status: SUCCESS, QUEUED, FAILED, EXPIRED, or FUTURE.
querieslist[CustomizationQuery]The queries this facet rule applies to.
groupBystr | nullThe group-by attribute, for example color.

The CustomizationQuery object has the following fields:

FieldTypeDescription
idint | nullThe query identifier.
querystr | nullThe query text, for example green shoes.
typestr | nullThe query type, for example sitesearch or category.

list_facet_attributes

Lists the product attributes available for facet configuration. Each result gives an attribute field name, such as brand, color, or Rating, that you can use when you define which facets a rule boosts, buries, excludes, or always includes. Take the name field from each result as the attribute identifier.

By default the response returns only facetable attributes. Set only_facetable to false to see every attribute. The results are paginated, so use page and limit for large catalogs, and query to search by attribute name.

Request parameters

NameTypeRequired?Description
account_namestr | nullNoThe account name. Auto-selected when you have exactly one account.
site_group_idstr | int | nullNoA site group ID (numeric) or site name. Omit for account level.
querystr | nullNoText search to filter attributes by name, for example brand or color.
only_facetableboolNoWhen true (default), returns only attributes usable as facet filters. Set to false to see all attributes.
pageintNoThe page number, 0-based. Defaults to 0.
limitintNoResults per page. Defaults to 50, maximum 200.
sort_bystrNoSort field: NAME (default), ID, TYPE, or FACETABLE.
sort_orderstrNoSort direction: ASC (default) or DESC.

Response parameters

The tool returns a FacetAttributesResponse object with the following parameters:

ParameterTypeDescription
successboolWhether the request succeeded.
datalist[FacetAttribute]The facet attributes.
errorstr | nullError message if the request failed.
totalint | nullThe total number of matching attributes across all pages.
pageint | nullThe current page number, 0-based.
total_pagesint | nullThe total number of pages.

The FacetAttribute object has the following fields:

FieldTypeDescription
idint | nullThe internal attribute ID.
namestrThe attribute field name. Use this value when you configure facets in a rule.
typestr | nullThe attribute type: STR (text), NUM (numeric), or HIERARCHY.
facetablebool | nullWhether this attribute can be used as a facet filter.
storedbool | nullWhether the attribute value is stored in the index.
levelstr | nullPARENT (product level) or CHILD (variant level).
multiValuedbool | nullWhether a product can have multiple values for this attribute.
siteIdint | nullThe site ID if the attribute is site-specific, or null for account-level attributes.

get_facet_rule

Fetches the full configuration of a single facet rule by ID. It works for site-search, category, and global facet rules. The response returns every facet action on the rule: boosted and buried facets, always-included facets, excluded facets, associated queries, audience targeting, and scheduling metadata. The customizationItems map holds the facet actions keyed by type: boosted_facets, buried_facets, excluded_facets, and always_included_facets.

Discover rule IDs with list_site_search_facets, list_facets_global, or list_category_facets, then call this tool to inspect a specific rule's full configuration.

Request parameters

NameTypeRequired?Description
rule_idintYesThe ID of the facet rule to fetch. Discover IDs with list_site_search_facets, list_facets_global, or list_category_facets.
account_namestr | nullNoThe account name. Auto-selected when you have exactly one account. Use list_discovery_accounts to see available accounts.
site_group_idstr | int | nullNoA site group ID (numeric) or site name (string). Defaults to -1 (account level) when omitted. Use list_discovery_sites to discover sites.

Response parameters

The tool returns a CustomizationDetailResponse object with the following parameters:

ParameterTypeDescription
successboolWhether the request succeeded.
dataany | nullThe full facet rule detail as freeform JSON. Includes id, ruleType (facet), enabled, queries, customizationItems (keyed by boosted_facets, buried_facets, excluded_facets, and always_included_facets), audience targeting, startedAt, endedAt, and scheduling metadata.
errorstr | nullError message if the request failed.

© Bloomreach, Inc. All rights reserved.