Performance table tools
- get_discovery_performance_table: Get one Performance dashboard table, for queries, categories, products, brands, or pages, with previous-period values.
- list_discovery_saved_filters: List the saved custom scopes and table filters for an account, with the IDs you pass to the performance 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 itscat_idand 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.
| Entity | Preset | Returns | Default sort |
|---|---|---|---|
brand | top_brands | Brands with revenue above zero. | revenue |
category | lowest_converting | Categories with more than 100 sessions and a near-zero conversion rate. | visits |
category | top_categories | The categories with the most browse sessions. | browse_sessions |
category | top_opportunities | Categories 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 |
product | top_products | Products with revenue above zero. | revenue |
query | new_queries | Queries with no visits in the previous period. | visits |
query | no_product_clicks | Queries with no product page views. | visits |
query | no_revenue | Queries with sessions but no revenue. | visits |
query | no_search_results | Queries 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 |
query | top_opportunities | Queries with a bounce rate above the average. | browse_sessions |
query | top_searched | The queries with the most browse sessions. | browse_sessions |
query | trending | The 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
| Name | Type | Required? | Description |
|---|---|---|---|
environment | str | No | The 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. |
entity | str | Yes | The table to return: query, category, product, brand, or page. |
account_name | str | null | No | The account name. Auto-selected when you have exactly one account. Use list_discovery_accounts to see available accounts. |
site_group_id | str | int | null | No | A 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. |
days | int | No | The 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_key | str | null | No | The 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_id | str | null | No | The 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_date | str | null | No | The 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_date | str | null | No | The end of a custom current period. Pass it with start_date. An end date before the start date is rejected. |
compare_start_date | str | null | No | The 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_date | str | null | No | The end of a custom comparison period. Pass it with compare_start_date. An end date before the start date is rejected. |
sort | str | null | No | The 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_direction | str | null | No | The sort direction, asc or desc. Defaults to desc. |
search | str | null | No | A case-insensitive substring that filters the item column: query text, category, product title, brand, or page URL. |
filter_preset | str | null | No | A 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_id | str | null | No | The 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_conditions | list[dict] | null | No | An 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_id | str | null | No | The UUID of a saved custom scope from list_discovery_saved_filters with kind set to scope. Can't be combined with scope_conditions. |
device_type | str | null | No | Restrict 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. |
page | int | No | The page number, 1-based. Defaults to 1. |
page_size | int | No | Rows 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:
| Parameter | Type | Description |
|---|---|---|
success | bool | Whether the request succeeded. |
data | dict | null | The requested page of table rows. |
error | str | null | Error message if the request failed, including the reason the request was rejected. |
environment_used | str | null | The 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:
| Field | Type | Description |
|---|---|---|
entity | str | The table that was returned. |
rows | list[dict] | One record per query, category, product, brand, or page, holding every metric plus its prev_* previous-period value. |
total_rows | int | null | The total number of rows matching the filters, across all pages. |
page | int | The page number returned. |
page_size | int | The number of rows per page. |
note | str | Returned when total_rows isn't narrowed by the filter, as with the category top_opportunities preset. |
window | dict | The exact date ranges queried, as ISO dates: start_date, end_date, compare_start_date, and compare_end_date. |
site_scope | dict | The site scope applied: site_group_id, domain_keys, view_ids, and account_level, which is true when no site filter was applied. |
meta | dict | Report 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:
kindofscopelists custom scopes for thesearch,category, orproductstab. Pass an ID assaved_scope_idtoget_discovery_performance,get_discovery_trend, orget_discovery_performance_table.kindoffilterlists table filters for thequery,category,product,brand, orpagetable, including the Bloomreach filters. Pass an ID assaved_filter_idtoget_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
| Name | Type | Required? | Description |
|---|---|---|---|
environment | str | No | The 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. |
kind | str | Yes | What to list: scope for custom scopes, or filter for table filters. |
entity | str | Yes | The surface the entries apply to. For scopes: search, category, or products. For filters: query, category, product, brand, or page. |
search | str | null | No | A case-insensitive substring that filters the entry name. |
account_name | str | null | No | The account name. Auto-selected when you have exactly one account. Use list_discovery_accounts to see available accounts. |
site_group_id | str | int | null | No | A 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:
| Parameter | Type | Description |
|---|---|---|
success | bool | Whether the request succeeded. |
data | dict | null | The saved scopes or filters. |
error | str | null | Error message if the request failed, including the reason the request was rejected. |
environment_used | str | null | The 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:
| Field | Type | Description |
|---|---|---|
kind | str | The kind of entry listed: scope or filter. |
entity | str | The surface the entries apply to. |
total | int | The number of entries returned. |
items | list[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. |
Updated 18 days ago

