Placement GuideSearch & Recovery

Search & Recovery

Placements 01 and 02 — put an Ask AI entry point in the storefront search bar, and recover zero-result searches with a guided Sophi panel instead of a dead end.

Meet shoppers at the highest-intent moment of the journey — the search bar — and catch them again when search fails.

Search Integration

01 · Search

From keyword search to conversational discovery. An Ask AI entry point embedded inside or next to the search bar lets shoppers express complex needs in their own words, turning search into a guided shopping entry point instead of a keyword lottery.

It earns its place on the queries keyword search handles worst — "a waterproof jacket for hiking in spring" is three constraints and a use case, which a keyword index reduces to "jacket".

Interactive demo

Press Ask AI in the search bar — the assistant opens over the page

SOPHI
Search products…
New InBest SellersThe Edit

Hand the text already in the input straight to the assistant rather than running a keyword search with it:

search-handoff.js
// Open Sophi with the shopper's query instead of running a keyword search
askAiButton.addEventListener('click', () => {
  if (!widget.isReady()) return;
  widget.show();
  widget.sendTextMessage(searchInput.value);
});

sendTextMessage posts a message to the iframe and returns void — it is not a promise, so there is nothing to await.

SDK reference

Keep keyword search the default

Surface Ask AI as the escalation path, not as a replacement for the search button. Shoppers who know the product name are faster with keywords, and taking that away to promote the assistant makes the common case worse.

Post-Search Recovery

02 · Post-search

Turn zero results into guided discovery. When a search returns nothing — or few enough to be useless, say one to three hits — Sophi activates in the results area with alternative paths and popular items, so the session continues at the exact point it would otherwise end.

Demo

Sophi activates inline after a failed search — the results page is not replaced

SOPHI
red velvit maxi dres

0 results for “red velvit maxi dres

Check the spelling or try a more general term.

Looking for a red maxi dress? Let me help.

I couldn’t find that exact item, but we have 24 red dresses in stock — including velvet-look and maxi styles. Tell me the occasion and I’ll narrow it down.

Show red maxi dressesVelvet stylesSomething for a winter wedding
Describe what you’re looking for…

Render the recovery panel in your own results area, and let each suggestion hand its prompt to the assistant when the shopper picks one:

zero-results.js
// Render the recovery panel when search comes back empty
if (results.total === 0) {
  recoveryPanel.hidden = false;
}

// Each suggestion opens Sophi with the shopper's intent
recoveryPanel.addEventListener('click', (event) => {
  const chip = event.target.closest('[data-sophi-prompt]');
  if (!chip || !widget.isReady()) return;

  widget.show();
  widget.sendTextMessage(chip.dataset.sophiPrompt);
});
Do not auto-send on render

Send the query from a shopper action, not from the zero-result render itself. isReady() turns true as soon as init() resolves and the iframe element exists — which is before the app inside the iframe has booted and can receive messages. A message posted into that window is dropped silently, with no warning. Waiting for a click is what makes the send reliably late enough.

SDK reference

  • widget.sendTextMessage(query) — seeds the recovery conversation with the shopper's chosen prompt.
  • widget.isReady()true once init() has resolved and the iframe element exists. It does not mean the iframe app can accept messages yet.
Best for

Render the recovery panel below weak results rather than replacing them, so the shopper keeps whatever the search did find.

Next: On-Page Triggers — the floating trigger and homepage widget for always-on guidance.

On this page