Performance table tools

get_discovery_performance_table

Returns one performance table from the Performance dashboard. Choose the table with entity:

  • query: The search queries table, one row per query, with visits, browse sessions, bounced sessions, bounce rate, product page views, add-to-cart, ATC rate, conversions, revenue, RPV, conversion rate, and AOV.
  • category: The categories table, one row per category, with its cat_id and the same metric set as the queries table.
  • product: The products table, one row per product. Alongside visits, product page views, add-to-cart, ATC rate, conversions, revenue, RPV, conversion rate, and AOV, each row carries the product ID, title, image URL, product URL, and brand, so the results are ready to show to a merchandiser without a second lookup.
  • brand: The brands table, one row per brand, with the same metrics as the products table.
  • page: The pages table, one row per page URL, with visits, entrances, exits, bounces, bounce rate, and exit rate.

Every metric has a prev_* counterpart from the comparison period. That pairing is what turns the table into a diagnosis: a query whose sessions held steady while prev_revenue fell tells a different story than one that simply lost traffic.

Sort, filter, and page through the table the way you would in the dashboard. Set sort and sort_direction to rank rows yourself, search to match a substring in the item column, and device_type to restrict the rows and total_rows to one device. Without a sort, rows follow the table's default order: visits for queries, categories, and pages, and revenue for products and brands. Each call returns up to 100 rows, so use page to fetch more.

To apply one of the dashboard's preset filters, set filter_preset. Presets use the dashboard's own definitions, so their results and default order match the dashboard. Each preset applies its own sort unless you pass sort, and an explicit sort always wins.

EntityPresetReturnsDefault sort
brandtop_brandsBrands with revenue above zero.revenue
categorylowest_convertingCategories with more than 100 sessions and a near-zero conversion rate.visits
categorytop_categoriesThe categories with the most browse sessions.browse_sessions
categorytop_opportunitiesCategories with a bounce rate above the overall rate. The response includes a note, because total_rows counts all categories rather than only the matching ones. Page until rows comes back empty.browse_sessions
producttop_productsProducts with revenue above zero.revenue
querynew_queriesQueries with no visits in the previous period.visits
queryno_product_clicksQueries with no product page views.visits
queryno_revenueQueries with sessions but no revenue.visits
queryno_search_resultsQueries that returned no results. The rows carry zero_result_sessions, zero_result_bounces, and zero_result_days in place of the usual metrics.zero_result_sessions
querytop_opportunitiesQueries with a bounce rate above the average.browse_sessions
querytop_searchedThe queries with the most browse sessions.browse_sessions
querytrendingThe queries with the biggest growth in browse sessions against the previous period.change_browse_sessions

The pages table has no presets. To apply a filter saved in the dashboard, or one of the Bloomreach filters by ID, pass saved_filter_id instead. To restrict the query, category, product, or brand rows to a custom scope, pass scope_conditions or saved_scope_id. Get saved filter and scope IDs from list_discovery_saved_filters. The tool checks that each saved ID is a UUID before it sends the request.

To drill into one row, pass its query, cat_id, prod_id, or brand value to get_discovery_entity_performance, get_discovery_entity_products, get_discovery_entity_sources, or get_discovery_path_analysis. Take a product ID from a row into create_ranking_rule to boost it. If a brand's revenue is climbing while its visits are flat, boosting it with attribute_boost_bury on a ranking rule is a reasonable next step.

To scope results to one storefront, pass site_group_id. Results then cover only that group's member sites, and site_scope in the response shows which sites were applied.

Request parameters

NameTypeRequired?Description
environmentstrNoThe target environment: production (default) or staging. The value is case-insensitive, and surrounding whitespace is trimmed. Staging-only accounts always resolve to staging, regardless of this value.
entitystrYesThe table to return: query, category, product, brand, or page.
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 group name. This is the recommended way to scope results to a storefront: results are filtered to the group's member sites. Defaults to -1 (account level). Use list_discovery_sites to discover site groups.
daysintNoThe rolling window in days, from 1 to 730, ending on the last available date. Defaults to 30. Ignored when you pass start_date and end_date.
domain_keystr | nullNoThe domain key for one site, for example 'your_domain_com'. Overrides the site group's scope. Valid by itself for a site with no view ID. Use the exact domainKey from list_discovery_sites.
view_idstr | nullNoThe view ID for one site, for example '472'. Pass it with domain_key, and only when list_discovery_sites shows a viewId for that site. A wrong view ID returns the wrong data or none.
start_datestr | nullNoThe start of a custom current period, as YYYYMMDD or YYYY-MM-DD. Pass it with end_date to override days. The period can span up to 730 days.
end_datestr | nullNoThe end of a custom current period. Pass it with start_date. An end date before the start date is rejected.
compare_start_datestr | nullNoThe start of a custom comparison period. Pass it with compare_end_date to override the automatic comparison window. The period can span up to 730 days.
compare_end_datestr | nullNoThe end of a custom comparison period. Pass it with compare_start_date. An end date before the start date is rejected.
sortstr | nullNoThe column to sort by, for example revenue, visits, browse_sessions, or conversion_rate. Defaults to the preset's own sort when you set filter_preset, or to the table's default sort.
sort_directionstr | nullNoThe sort direction, asc or desc. Defaults to desc.
searchstr | nullNoA case-insensitive substring that filters the item column: query text, category, product title, brand, or page URL.
filter_presetstr | nullNoA Bloomreach preset filter. For queries: top_searched, no_revenue, no_search_results, no_product_clicks, new_queries, top_opportunities, or trending. For categories: top_categories, top_opportunities, or lowest_converting. For products: top_products. For brands: top_brands. Can't be combined with saved_filter_id.
saved_filter_idstr | nullNoThe UUID of a saved or Bloomreach filter from list_discovery_saved_filters with kind set to filter. Can't be combined with filter_preset.
scope_conditionslist[dict] | nullNoAn inline custom scope: a list of {property, operator, values} conditions joined with OR. Properties: query for queries, category (a cat_id) for categories, and prod_id or brand for products and brands. Operators: is, is_any_of, is_not, contains, and does_not_contain. Not available for pages. Can't be combined with saved_scope_id.
saved_scope_idstr | nullNoThe UUID of a saved custom scope from list_discovery_saved_filters with kind set to scope. Can't be combined with scope_conditions.
device_typestr | nullNoRestrict the table to one device: desktop, mobile, tablet, or other (other and unknown devices). Applies to the rows and to total_rows. Omit for all devices combined.
pageintNoThe page number, 1-based. Defaults to 1.
page_sizeintNoRows per page, from 1 to 100. Defaults to 20. Use page to fetch more rows.

Response parameters

The tool returns a CompassResponse object with the following parameters:

ParameterTypeDescription
successboolWhether the request succeeded.
datadict | nullThe requested page of table rows.
errorstr | nullError message if the request failed, including the reason the request was rejected.
environment_usedstr | nullThe environment actually queried: production or staging. This can differ from the environment you requested, because staging-only accounts always resolve to staging.

The data object has the following fields:

FieldTypeDescription
entitystrThe table that was returned.
rowslist[dict]One record per query, category, product, brand, or page, holding every metric plus its prev_* previous-period value.
total_rowsint | nullThe total number of rows matching the filters, across all pages.
pageintThe page number returned.
page_sizeintThe number of rows per page.
notestrReturned when total_rows isn't narrowed by the filter, as with the category top_opportunities preset.
windowdictThe exact date ranges queried, as ISO dates: start_date, end_date, compare_start_date, and compare_end_date.
site_scopedictThe site scope applied: site_group_id, domain_keys, view_ids, and account_level, which is true when no site filter was applied.
metadictReport metadata, including the report ID and the date ranges the backend used.

list_discovery_saved_filters

Lists the custom scopes and table filters saved in the Performance dashboard, so you can reuse one by ID instead of rebuilding its conditions. Choose what to list with kind and entity:

  • kind of scope lists custom scopes for the search, category, or products tab. Pass an ID as saved_scope_id to get_discovery_performance, get_discovery_trend, or get_discovery_performance_table.
  • kind of filter lists table filters for the query, category, product, brand, or page table, including the Bloomreach filters. Pass an ID as saved_filter_id to get_discovery_performance_table.

Scopes take tab names and filters take table names, but the tool accepts either form for both. Each item returns its ID, name, type, conditions, and default sort, with the Bloomreach entries listed first. Set search to narrow the list by name. Condition values for rate metrics, such as conversion_rate, are in percent, so 1.5 means 1.5%.

Some Bloomreach presets aren't listed here, but still work by name through filter_preset on get_discovery_performance_table. lowest_converting is one of them.

Request parameters

NameTypeRequired?Description
environmentstrNoThe target environment: production (default) or staging. The value is case-insensitive, and surrounding whitespace is trimmed. Staging-only accounts always resolve to staging, regardless of this value.
kindstrYesWhat to list: scope for custom scopes, or filter for table filters.
entitystrYesThe surface the entries apply to. For scopes: search, category, or products. For filters: query, category, product, brand, or page.
searchstr | nullNoA case-insensitive substring that filters the entry name.
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. Defaults to -1 (account level). Use list_discovery_sites to discover sites.

Response parameters

The tool returns a CompassResponse object with the following parameters:

ParameterTypeDescription
successboolWhether the request succeeded.
datadict | nullThe saved scopes or filters.
errorstr | nullError message if the request failed, including the reason the request was rejected.
environment_usedstr | nullThe environment actually queried: production or staging. This can differ from the environment you requested, because staging-only accounts always resolve to staging.

The data object has the following fields:

FieldTypeDescription
kindstrThe kind of entry listed: scope or filter.
entitystrThe surface the entries apply to.
totalintThe number of entries returned.
itemslist[dict]One record per entry, with id, name, type, conditions, sort, sort_direction, created_by, and updated_at. type is SCOPE, FILTER, or PRE_DEFINED_FILTER for a Bloomreach filter. Each condition is {logic_operator, property, operator, values}, where the first condition's logic_operator is null and later ones carry AND or OR.


Did this page help you?

© Bloomreach, Inc. All rights reserved.