Ranking rules and audiences tools

list_site_search_ranking_rules

Lists site-search ranking rules as paginated summaries. Ranking rules control how products are ordered in search results for specific queries. For example, a rule can boost certain products to the top when a shopper searches for green shoes. Each rule ties to one or more search queries and can be scheduled, A/B tested, and targeted to an audience.

The summary leaves out the rule's merchandising actions. Use get_ranking_rule for a rule's full configuration. For global ranking rules that apply across both site search and category pages, use list_ranking_rules_global.

Request parameters

NameTypeRequired?Description
pageintNoThe page number, 0-based. Defaults to 0.
limitintNoResults per page. Defaults to 10, maximum 100.
sort_bystrNoField to sort by: lastModifiedAt, identifier, or duration. Defaults to lastModifiedAt.
sort_orderstrNoSort direction: ASC or DESC. Defaults to DESC.
qstr | nullNoText search to filter by query or username.
durationstr | nullNoComma-separated duration filter: unscheduled, scheduled, active, expiringSoon, or expired.
audience_idsstr | nullNoComma-separated audience IDs to filter by.
enabledstr | nullNoEnabled filter: true or false.

Response parameters

The tool returns a CustomizationsResponse object with the following parameters:

ParameterTypeDescription
successboolWhether the request succeeded.
datalist[CustomizationSummary]The ranking 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, for example ranking.
isEnabledbool | nullWhether the rule is currently enabled.
syncStatusstr | nullSync status: SUCCESS, QUEUED, FAILED, EXPIRED, or FUTURE.
durationTagstr | nullDuration tag: unscheduled, scheduled, active, expiringSoon, or expired.
startedAtint | nullUnix timestamp in milliseconds of when the rule became active.
endedAtint | nullUnix timestamp in milliseconds of when the rule expires.
createdAtint | nullUnix timestamp in milliseconds of when the rule was created.
lastModifiedAtint | nullUnix timestamp in milliseconds of when the rule was last modified.
lastModifiedBystr | nullEmail or name of the user who last modified the rule.
querieslist[CustomizationQuery]The queries this rule applies to.
isAbTestLiveboolWhether an A/B test is currently active for this rule.
audienceNamestr | nullName of the audience segment this rule targets.

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_ranking_rules_global

Lists global ranking rules as paginated summaries. Global ranking rules apply across both site-search and category queries, unlike query-specific rules that affect individual search terms. They suit broad merchandising strategies, such as always boosting in-stock products or demoting clearance items across the whole site.

Each summary includes the name, enabled status, associated queries, A/B test state, and scheduling details. Use get_ranking_rule for a rule's full configuration. For query-specific site-search rules, use list_site_search_ranking_rules.

Request parameters

NameTypeRequired?Description
pageintNoThe page number, 0-based. Defaults to 0.
limitintNoResults per page. Defaults to 10, maximum 100.
sort_bystrNoField to sort by: lastModifiedAt, identifier, or duration. Defaults to lastModifiedAt.
sort_orderstrNoSort direction: ASC or DESC. Defaults to DESC.
qstr | nullNoText search to filter by identifier or username.
durationstr | nullNoComma-separated duration filter: unscheduled, scheduled, active, expiringSoon, or expired.
audience_idsstr | nullNoComma-separated audience IDs to filter by.
enabledstr | nullNoEnabled filter: true or false.

Response parameters

The tool returns a CustomizationsResponse object with the following parameters:

ParameterTypeDescription
successboolWhether the request succeeded.
datalist[CustomizationSummary]The global ranking 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, for example ranking.
isEnabledbool | nullWhether the rule is currently enabled.
syncStatusstr | nullSync status: SUCCESS, QUEUED, FAILED, EXPIRED, or FUTURE.
durationTagstr | nullDuration tag: unscheduled, scheduled, active, expiringSoon, or expired.
startedAtint | nullUnix timestamp in milliseconds of when the rule became active.
endedAtint | nullUnix timestamp in milliseconds of when the rule expires.
createdAtint | nullUnix timestamp in milliseconds of when the rule was created.
lastModifiedAtint | nullUnix timestamp in milliseconds of when the rule was last modified.
lastModifiedBystr | nullEmail or name of the user who last modified the rule.
querieslist[CustomizationQuery]The queries this rule applies to.
isAbTestLiveboolWhether an A/B test is currently active for this rule.
audienceNamestr | nullName of the audience segment this rule targets.

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_ranking_rules

Lists query-specific category ranking rules as paginated summaries. Category ranking rules control how products are ordered on category pages. For example, a rule can boost best-sellers or seasonal items when a shopper browses a specific category. Each rule ties to one or more category queries and can be scheduled, A/B tested, and targeted to an audience.

Use get_ranking_rule for a rule's full configuration. For global rules that apply across all categories and site search, use list_ranking_rules_global.

Request parameters

NameTypeRequired?Description
pageintNoThe page number, 0-based. Defaults to 0.
limitintNoResults per page. Defaults to 10, maximum 100.
sort_bystrNoField to sort by: lastModifiedAt, identifier, or duration. Defaults to lastModifiedAt.
sort_orderstrNoSort direction: ASC or DESC. Defaults to DESC.
qstr | nullNoText search to filter by category, note, or username.
durationstr | nullNoComma-separated duration filter: unscheduled, scheduled, active, expiringSoon, or expired.
audience_idsstr | nullNoComma-separated audience IDs to filter by.
enabledstr | nullNoEnabled filter: true or false.

Response parameters

The tool returns a CustomizationsResponse object with the following parameters:

ParameterTypeDescription
successboolWhether the request succeeded.
datalist[CustomizationSummary]The category ranking 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, for example ranking.
isEnabledbool | nullWhether the rule is currently enabled.
syncStatusstr | nullSync status: SUCCESS, QUEUED, FAILED, EXPIRED, or FUTURE.
durationTagstr | nullDuration tag: unscheduled, scheduled, active, expiringSoon, or expired.
startedAtint | nullUnix timestamp in milliseconds of when the rule became active.
endedAtint | nullUnix timestamp in milliseconds of when the rule expires.
createdAtint | nullUnix timestamp in milliseconds of when the rule was created.
lastModifiedAtint | nullUnix timestamp in milliseconds of when the rule was last modified.
lastModifiedBystr | nullEmail or name of the user who last modified the rule.
querieslist[CustomizationQuery]The queries this rule applies to.
isAbTestLiveboolWhether an A/B test is currently active for this rule.
audienceNamestr | nullName of the audience segment this rule targets.

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.

get_ranking_rule

Fetches the full configuration of a single ranking rule by ID. It works for site-search, category, and global ranking rules. The response returns every merchandising action on the rule: boosted and buried products, locked product slot positions, attribute-level boost and bury adjustments, sliced variant attributes, any ranking algorithm override, and scheduling metadata.

Discover rule IDs with list_site_search_ranking_rules, list_category_ranking_rules, or list_ranking_rules_global, then call this tool to inspect a specific rule's full effect.

Request parameters

NameTypeRequired?Description
rule_idintYesThe ID of the ranking rule to fetch. Discover IDs with list_site_search_ranking_rules, list_category_ranking_rules, or list_ranking_rules_global.
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 ranking rule detail as freeform JSON. Includes id, ruleType, enabled, queries, customizationItems (boosted and buried products, locked slots, attribute boosts), startedAt, endedAt, and scheduling metadata.
errorstr | nullError message if the request failed.

list_discovery_audiences

Lists the audience segments defined in an account. Audiences target ranking rules, redirects, and facets to specific groups of shoppers based on device, location, URL, or referral URL conditions. Use the numeric id from each result as the audience ID when you target a rule to a segment.

Each audience reports how many rules it currently affects and the targeting conditions that define it. Audiences can also draw on Bloomreach segmentations, which enable behavior-based targeting beyond device and location. Audiences are account-level, so this tool takes no site group parameter.

Request parameters

NameTypeRequired?Description
account_namestr | nullNoThe account name. Auto-selected when you have exactly one account. Use list_discovery_accounts to see available accounts.

Response parameters

The tool returns an AudiencesResponse object with the following parameters:

ParameterTypeDescription
successboolWhether the request succeeded.
datalist[Audience]The audience segments.
sizeint | nullThe total number of audiences returned.
errorstr | nullError message if the request failed.

The Audience object has the following fields:

FieldTypeDescription
idintThe numeric audience ID, used to target a rule to this segment.
audienceNamestrThe human-readable audience name, for example Mobile Device.
userstr | nullEmail of the user who last modified this audience.
createdAtint | nullUnix timestamp in milliseconds of when the audience was created.
modifiedAtint | nullUnix timestamp in milliseconds of when the audience was last modified.
rulesAffectedint | nullThe number of ranking rules currently using this audience.
editablebool | nullWhether you can edit this audience.
dimensionListlist[AudienceDimension]The targeting conditions that define this audience.
sitegroupany | nullThe site group this audience is scoped to, or null for account level.

The AudienceDimension object has the following fields:

FieldTypeDescription
idint | nullThe dimension ID.
internalNamestr | nullThe internal dimension name, for example device, geo, url, or ref_url.
externalNamestr | nullThe human-readable dimension name, for example Device, Location, URL, or Referral URL.
typestr | nullThe dimension type, for example discovery.
dimensionValueListlist[any]The condition values for this dimension, each with an internal value, an external value, and a match type such as IS, IS NOT, or CONTAINS.

© Bloomreach, Inc. All rights reserved.