Conversations server tools

The Conversations server exposes a small set of tools that your AI assistant can call during a shopping conversation. The AI assistant decides which tool to use based on the shopper's question — you don't configure this manually.

All tools run against the Pacific Apparel sample catalog. The catalog is fixed and read-only.

search_products

Searches the catalog by attribute and returns ranked results.

Your AI assistant calls this tool when a shopper has specified what they want — a product type, color, size, price range, brand, or any combination.

Behavior

  • Returns products that match the specified attributes, ranked by relevance.
  • Automatically relaxes the least important filter when strict criteria return too few results, and reports the change so your AI assistant can communicate it to the shopper.
  • Generates refinement suggestions based on the result set — real price brackets, available colors, and other attributes — not hardcoded text.

Request parameters

NameTypeRequiredDescription
querystringYesProduct-attribute search terms only
filtersobjectNoStructured filters with must/must_not logic on catalog attributes
limitintegerNoMaximum number of results (default: 10, max: 25)

Available filter attributes

The Pacific Apparel catalog supports filtering on:

  • data.gendermale, female
  • data.color — common color values
  • data.material — material types
  • data.style — style descriptors
  • data.season — seasonal tags
  • data.special_offerblackfriday, back2school, mothersday, christmas, valentine, easter
  • data.price — numeric range (use gte, lte)
  • data.brand — exact brand name

Response parameters

The tool returns an object with the following fields:

FieldTypeDescription
productsarrayMatched product items, ranked by relevance
relaxedobjectResults returned when strict filters returned too few products. Includes a dropped_filters array showing which filters were progressively dropped
FAQsarrayCategory-based question and answer pairs related to the search
refinement_schemaobjectAttribute distributions in the result set. Use these to present refinement choices to the shopper
refinement_suggestionsarrayNatural-language hints for constructing smart filters, such as budget, premium, or highly-rated

search_productCollections

Runs multiple independent product searches in a single call. Useful when a shopper expresses several distinct intents at once — for example, "a casual shirt for him and a midi skirt for her."

Your AI assistant calls this tool when a shopper's message includes orthogonal intents that wouldn't combine into a single search.

Behavior

  • Runs each sub-search independently with its own query, filters, and limit.
  • Supports up to 5 sub-searches in a single call.
  • Returns sub-results in the same order they were requested.

When intents are correlated rather than independent — for example, "a top that goes with these jeans" — your AI assistant should call search_products sequentially instead. Correlated intents need reasoning between searches.

Request parameters

NameTypeRequiredDescription
searchesarrayYesUp to 5 sub-search objects. Each sub-search runs independently

Each sub-search object has the following fields:

FieldTypeRequiredDescription
querystringNoProduct-attribute search terms only. Omit or leave empty for filter-only searches
filtersobjectNoStructured filters with must/must_not logic
limitintegerNoMaximum number of results (default: 10, max: 25)

Response parameters

Returns an array of search results, one per sub-search, in the same order as the request. Each sub-result has the same shape as a search_products response.

get_product

Fetches the full details of a specific product by identifier.

Your AI assistant calls this tool when a shopper references a specific product, or when it needs to follow up on a result from an earlier search.

Behavior

  • Accepts either a variant-level identifier (itemId) or a parent-level identifier (product_id).
  • Returns the parent product plus all its variants.
  • Returns an explicit "not found" response when the identifier doesn't match anything.

Request parameters

NameTypeRequiredDescription
productIdentifierstringYesThe product ID or item ID to look up

Response parameters

When the product is found:

FieldTypeDescription
foundbooleantrue when the product is found
product_idstringThe parent product ID
matched_fieldstringThe field that matched the lookup, such as itemId or data.gtin
matched_item_idstringThe specific item ID that matched
variantsarrayAll variants of the parent product

Each variant has the following fields:

FieldTypeDescription
itemIdstringVariant identifier
dataobjectVariant attributes such as title, size, and color

Example response when found:

{
  "found": true,
  "product_id": "ABC-123",
  "matched_field": "data.gtin",
  "matched_item_id": "ABC-123-S",
  "variants": [
    {"itemId": "ABC-123-S", "data": {"title": "...", "size": "S"}},
    {"itemId": "ABC-123-M", "data": {"title": "...", "size": "M"}}
  ]
}

When the product is not found:

FieldTypeDescription
foundbooleanfalse when no product matches
codestringThe identifier that was looked up
messagestringExplanation of why no product was found

Example response when not found:

{
  "found": false,
  "code": "ABC-999",
  "message": "No product found for code 'ABC-999'"
}

seeker_products

Guides a shopper through follow-up questions when they don't know exactly what they want, then transitions into a search once it has enough context.

Your AI assistant calls this tool when a shopper is browsing, looking for a gift, or has expressed only a vague intent.

Behavior

  • Generates follow-up questions based on an overview of the catalog — categories, price ranges, and product types.
  • Uses the shopper's responses to build context for a search.
  • Transitions to search_products or search_productCollections automatically once enough context is gathered.

Request parameters

This tool takes no arguments. It returns catalog context that your AI assistant uses to guide the conversation.

Response parameters

The tool returns an object with the following fields:

FieldTypeDescription
knowledge_basestringCatalog overview covering inventory, budget tiers, gift selection guidance, and seasonal options
follow_up_guidancestringSuggested clarifying questions for your AI assistant to ask, in priority order
transition_guidancestringRouting rules describing when to transition to search_products or search_productCollections
refinement_schemaobjectAttribute distributions across the catalog, used to construct precise filters once enough context is gathered

Related pages



© Bloomreach, Inc. All rights reserved.