Configure the engine

Autocomplete and suggestions

The dropdown is the fastest route to an order.

For a buyer who knows the article number, the dropdown under the search box is the entire shop. They type four characters, click a row, and are on the product page. Everything else — the results list, the facets — is what happens when autocomplete failed.

Before you begin. Identifier fields must be configured for prefix and mid-string matching, as described in Configure the index. Autocomplete is a different query against the same index, not a different index.

What the dropdown should contain

Four sections, in this order. Most B2B shops need the first two and benefit from all four.

SectionRowsWhy it earns its space
Products4–6The buyer wants an article, not a search
Article number match1, pinnedExact hit on sku or manufacturer part number
Categories2–3A vague word lands on a listing, not a result set
Recent and popular3–5, before typingThe re-order case, which is most of B2B

All of these are fetched in a single request, not four. That matters: the dropdown has to redraw on every keystroke, so the budget is well under 100 milliseconds end to end.

Article-number prefix matching

This is the part that decides whether buyers use your shop.

A buyer typing 4711 must see 4711-A and 4711-B by the fourth character. A buyer pasting KAT-4711-A-2024 out of their own system must see 4711-A. A buyer typing 6205 must see the SKF bearing even though your own number for it is something else entirely.

What that requires:

  • Prefix matching enabled on identifier fields, so a partial code matches from the front.
  • Mid-string matching enabled on the same fields, so a code embedded in a longer string is found.
  • Typo tolerance off on those fields. In a dropdown, one allowed typo means 4711 also suggests 4712 — and the buyer clicks without reading.
  • An exact whole-string match pinned to row one, visually distinct from the fuzzy suggestions below it.
Do not let a text match outrank an exact code match in the dropdown. The dropdown is where buyers click fastest and read least. This is the single most expensive place to return a plausible wrong article.

An empty search box is an opportunity. Two lists cost nothing and are used constantly:

  • Recent searches for this buyer, from their own session and account.
  • Popular searches for this channel — the queries other buyers in this storefront make most.

Popular searches are computed from your own query log. Filter out zero-result queries before you show them; suggesting a search that returns nothing is worse than suggesting nothing.

Per-customer suggestions from order history

The highest-value autocomplete in B2B is not clever text matching. It is "you ordered this before".

For a signed-in buyer, promote articles from their own organization's order history above general matches, and label them. A purchaser re-ordering the same twelve articles every month wants row one to be the thing they ordered in March, not the newest equivalent.

Three variants worth building, in order of effort:

VariantWhat it needsEffect
Previously orderedOrder history per organizationHighest click-through in the dropdown
On a saved listOrder listsConfirms it is a standard article for them
By their material numberCustomer material numbers on the relationshipThey stop maintaining a translation list

All three respect the customer's assortment automatically, because the suggestion query carries the same channel and organization filter as the main search. A buyer never sees a suggestion for an article they cannot order.

Steps

  1. Confirm identifier fields are prefix- and mid-string-matchable in App Studio › Services › Search.
  2. Configure the dropdown sections and their row counts. Start with products, the pinned exact match, and categories.
  3. Set the query fields for suggestions to identifiers and name only. Including description fills the dropdown with articles whose relevance the buyer cannot see.
  4. Enable recent searches, and popular searches with zero-result queries excluded.
  5. Enable previously-ordered promotion for signed-in buyers.
  6. Test on a phone. Innendienst and fitters use the shop on phones far more than your analytics suggest, and a dropdown that covers the whole screen with ten rows is unusable there.

What to check

Take ten real article numbers off recent orders and, for each one:

  1. Type the first four characters. The article must appear.
  2. Type the whole number. It must be row one, exact-matched.
  3. Type the number with a wrong last character. It must not silently offer the neighbouring article as if it were a match.

Then sign in as a real customer and confirm that an article they have never been entitled to buy does not appear in any suggestion.

When it does not work

SymptomUsual cause
Nothing appears until 6–7 charactersPrefix matching not enabled on identifiers
Pasted long codes find nothingMid-string matching off, or normalisation asymmetric
Wrong neighbouring article suggestedTypo tolerance still on for identifier fields
Dropdown is slowToo many fields queried, or description included
Suggestions the buyer cannot orderChannel or assortment filter missing on the suggest query

Next