Product grid insights tools

get_discovery_product_performance

Returns performance metrics for a single product over the last 30 days: visits, add-to-cart rate, conversion rate, revenue per visit, and total revenue. These metrics come from the tracking pixel on your site, and they feed the ranking algorithm that decides where a product appears in search results.

Use this tool to understand how one product is performing before you adjust its ranking or promotion.

Request parameters

NameTypeRequired?Description
product_idstrYesThe product to get metrics for.
account_namestr | nullNoThe account name. If you have exactly one account, it's selected for you. Use list_discovery_accounts to see options.
site_group_idstr | int | nullNoThe site group ID or site name. Defaults to -1 (account level). Use list_discovery_sites to find sites.
domain_keystr | nullNoThe domain key for multi-domain accounts, for example 'prod_en'.
view_idstr | nullNoThe view ID for multi-site filtering.
is_single_domain_accountboolNoWhether this is a single-domain account. Defaults to false.

Response parameters

The tool returns a ProductPerformanceResponse object with the following parameters:

ParameterTypeDescription
successboolWhether the request succeeded.
dataProductPerformanceData | nullThe product's performance metrics.
errorstr | nullError message if the request failed.

The ProductPerformanceData object has the following fields:

FieldTypeDescription
productIdstr | nullThe product ID.
currencystr | nullThe currency code, for example 'USD'.
visitsint | nullTotal product page visits in the last 30 days.
atcRatefloat | nullAdd-to-cart rate as a fraction, so 0.12 means 12%.
cvrfloat | nullConversion rate as a fraction, so 0.05 means 5%.
rpvfloat | nullRevenue per visit.
revenuefloat | nullTotal revenue generated by this product.

search_discovery_product_grid_insights

Searches the product grid and returns results as they'd appear on your live site, including product data, ranking scores, facet counts, applied ranking rules, synonyms, and debug info. Use it to preview how products rank for a given query and to verify that your merchandising rules behave as you expect.

The search_by parameter sets the search mode:

search_byExample queryBehavior
query (default)'dress'Keyword search.
product_id'123'Finds a specific product by its ID.
category'cl10003'Browses a category by its ID.

To compare rankings with and without merchandising, call the tool once without disabled_customization_ids to get the baseline grid. Read the active rule IDs from data.debug.experiments[name='customizations_priority'].value.ranking, then call again with some or all of those IDs in disabled_customization_ids. Pass a single ID to isolate one rule, or every ID to see pure algorithmic ranking with no merchandising. Rule IDs are site-specific, so always read them from a prior response.

To compare relevance with and without Loomi Search+, call once with search_mode='hybrid' (semantic and keyword blended) and once with search_mode='standard' (keyword only).

Request parameters

NameTypeRequired?Description
querystrYesThe search term, product ID, or category ID, depending on search_by.
domain_keystrYesThe domain key identifying the catalog, for example 'your_domain_com'. Get it from list_discovery_sites.
account_namestr | nullNoThe account name. If you have exactly one account, it's selected for you. Use list_discovery_accounts to see options.
site_group_idstr | int | nullNoThe site group ID or site name. Defaults to -1 (account level). Use list_discovery_sites to find sites.
search_bystrNoThe search mode: 'query' (default), 'product_id', or 'category'.
account_idint | nullNoA numeric account ID. Defaults to the account resolved from your credentials.
site_idint | nullNoA site ID used to resolve the view for multi-site accounts.
audience_idint | nullNoAn audience ID for personalized results. Use list_discovery_audiences to find audience IDs.
user_idstr | nullNoThe visitor tracking ID (_br_uid_2) for personalized ranking.
segmentstr | nullNoA segment for relevance-by-segment ranking, in the format '<name>:<value>', for example 'customer_country:us'.
startintNoThe pagination offset. Defaults to 0.
rowsintNoThe number of results per page. Defaults to 25.
groupbystr | nullNoA field to group results by.
fqstr | nullNoA filter query, for example 'brand:"Acme"'.
flstr | nullNoA comma-separated list of fields to return.
search_modestrNo'hybrid' (default) blends semantic and keyword signals with Loomi Search+. 'standard' applies keyword search only.
vector_search_temperaturestrNoHow strongly semantic signals influence ranking: 'standard' (default) or 'high'.
disabled_customization_idslist[str] | nullNoRanking rule IDs to disable for this query. Read the IDs from a prior response, then pass a subset or all of them.
simple_debugboolNoInclude ranking debug info in the response. Defaults to true. Set to false for a leaner response.
extra_paramsdict | nullNoAdditional search parameters sent as custom modifiers. Values here override all other defaults.

Response parameters

The tool returns a ProductGridSearchResponse object with the following parameters:

ParameterTypeDescription
successboolWhether the request succeeded.
dataany | nullThe product grid search results as freeform JSON, with response.docs, facet_counts, and more.
errorstr | nullError message if the request failed.

When simple_debug is true, the data payload includes these key fields:

FieldDescription
response.numFoundTotal number of matching products.
response.docsProduct records with the ranking score, title, pid, and performance signals.
facet_countsFacet field counts for filter options.
debug.rankingAlgorithmNameThe ranking algorithm in use.
debug.synonym.explain.directSynonymsV3Synonym expansion chains applied to the query.
debug.customizations.explainActive merchandising rule details.
debug.experiments[name='customizations_priority'].value.rankingOrdered list of active rule IDs. Use these as disabled_customization_ids.
debug.disabled_customizations.idsRule IDs that were disabled for this call.

© Bloomreach, Inc. All rights reserved.