Commerce

Storefront search

Replace your store's search bar with AI search that understands synonyms, translations and product specs.

Storefront search replaces the search on your own store with Octocom's product search. Shoppers get query suggestions as they type, and results that understand synonyms, translations and product specs instead of only exact keyword matches. Filters, voice search and photo search are built in, and everything is styled with your own HTML, so it looks like part of your store.

It's for stores whose search box should do better than "type a word and hope it matches a product title". Think of catalogs with many variants, several languages, or shoppers who don't type your exact product names. It searches the same product catalog as your AI agent. When it is enabled, the AI agent in chat searches through it too, so chat and search bar recommend products in the same order.

You set it up per business under Settings -> Storefront -> Storefront Search, which has four tabs: Overview, Design, Synonyms and API access. Search reaches your pages through the Octocom script you already use for the chat widget: no separate widget to learn, no iframe.

Rendering results in your own code instead? The same script publishes a JavaScript client you can call directly. See the Storefront search SDK.

How it works

What happens depends on what the shopper is doing:

  • While typing, an instant panel shows query suggestions, a handful of top-matching products and category and brand chips, all from one lightweight lookup. No AI call runs at this stage, so it stays fast and cheap on every keystroke.
  • On submit (Enter, the search button or picking a suggestion), the full search runs. It matches keywords, understands what was searched for (synonyms, translations, specs such as color or brand), ranks by both text and meaning, and combines the two into one ranked list.

A few behaviors worth knowing:

  • Smart matching, not just exact keywords. Search understands synonyms, cross-language names (for example Greeklish and Greek) and normalized specs once your catalog has been through enrichment (see below). A catalog that hasn't been enriched still searches well on its existing text: enrichment widens what search finds, it doesn't gate it.
  • Rarely zero results. If a query is too narrow (a typo or an overly specific phrase) and finds too few matches, search relaxes it and returns the closest matches instead of an empty page. The SDK flags these as relaxed, so a template can label them "Similar products" instead of presenting them as exact hits: add a data-octocom-results-state-label element to your Results or Overlay template (see Results below).
  • Filters re-run the last search. In-stock and price filters apply to whatever was last searched, not to your full catalog.
  • No results beats wrong results, by default. When search can't confirm that any product really matches a query, it returns an empty page, so your store shows its own "no results" message instead of loosely related products. Turn Show nothing when no product clearly matches off on the Overview tab (or set hideLowConfidenceResults: false with the set_search_ui_config MCP tool or PATCH /rest/v1/search/ui-config) to always show the closest products.
  • Only show relevant results (off by default) trims the other end of the list: it stops once products no longer match the search, instead of paging on through loosely related ones.

Installing on your store

Choose how your store gets search:

  • Octocom injects it. If the chat widget is on your store, enabling storefront search is all it takes: the script places search into your pages, with no theme or code changes.
  • Your developers build it. Call search from your own code and render the results yourself. Nothing is injected into your pages. See the Storefront search SDK and the REST API.

To try the injected search on your store before shoppers see it, use Preview on your store on the Overview tab. See Preview on your live store.

You can also ask Copilot or your own AI agent through Octocom MCP to set it up. It prepares the catalog, finds the right places on your theme, configures the templates and checks result quality before you switch search on for shoppers.

Ask Copilot or your AI agent

Set up storefront search on our store so it matches the look of our current search bar. Check the result quality on a few typical searches before we switch it on for shoppers.

Configuration reference

Before enabling search on a live storefront, use the live preview on the Design tab. It's wired to the real search pipeline for your business, so typing and submitting a search queries your actual catalog. Sample product cards fill the results grid until you run your first search, so you can check the visual design without needing a working query yet.

If a template is missing a required marker, the preview shows a warning underneath it (e.g. "Search bar template is missing data-octocom-search-input") so you can catch mistakes before saving.

Selectors can be checked against the real thing rather than guessed at: see Find on store and Check saved under Enabling search above. Both open your storefront in a browser and read the rendered page, which is the only reliable way to see a client-rendered store's DOM.

Voice can be tried the same way: the mic in the preview records and transcribes exactly as it will for shoppers, and works even while the Voice search switch is off, so you can hear how it handles your product names before turning it on. A note under the preview tells you when shoppers wouldn't get a mic and why (switch off, no data-octocom-search-mic in your template, or a browser that can't record).

Preview on your live store

The Design tab's preview renders your templates in Octocom's layout. To see them in your own header, on your own theme, before shoppers do, create a preview link under Preview on your store on the Overview tab (Create preview link): your storefront URL plus a token that switches the search UI on for whoever opens it, and for nobody else.

The link needs the Octocom widget script already installed for the same business, and it works whether or not Show search on your store is on. A preview cannot switch the installed widget to another business's search templates or catalog. Same-business previews also work on staging and alternate domains without changing your live search origin allowlist.

It lasts 24 hours and stays active for that business as you click around the store in the same browser tab, so you can check the search bar on a product page and a collection page in one sitting. The browser remembers a token only after the server accepts it for the installed business. An expired or mismatched token stops the preview and clears the remembered token; create a fresh link for the correct business if this happens.

Treat it as a password rather than a share link: opening it runs real searches billed to your account. Create a fresh one instead of passing an old one on. Links expire, and nothing has to be switched back off afterwards.

Best practices

  • Start from the examples. Every template starts pre-filled with a working example. Tweak colors and spacing rather than starting from a blank editor, so you don't accidentally drop a required marker.
  • Templates are cloned, not rendered directly. Don't rely on the original template element being visible on the page. It stays hidden and detached; only its clones are shown.
  • Rebuild the lexicon after catalog changes. Facet suggestions and query understanding go stale otherwise.
  • Enrich before judging search quality. An un-enriched catalog looks weaker on synonym and translation queries, so run enrichment before concluding search "doesn't find" something.
  • Use replace for the search bar and results grid unless you specifically want to keep your store's native element alongside ours. Most setups replace the native search box/grid entirely.
  • Prefer the overlay when you're asked for a "results page". It needs nothing built on your store, is shareable and back-button-able, and avoids the most common failure of page mode: a results page whose target selector doesn't match anything.
  • Re-run Check saved after a theme update. Themes rename classes, and a selector that stops matching fails silently: nothing errors, the element simply never appears.
  • Test filters together with a search, not in isolation. Filters re-run whatever was last searched, so an empty query with a filter applied returns nothing.

On this page