Autosuggest Best Practices
To maximize conversion and user satisfaction, effective autosuggest implementation requires a dynamic approach that adjusts based on user input and combines query suggestions with other recommendation types. Request both suggestion types (query and product) in every call and adjust maxResults by input stage
Dynamic display logic
The primary goal is to provide the most helpful information at every stage of the user's search process.
| User input stage | query.text field | Best practice (action) | Recommendation |
|---|---|---|---|
| Initial focus (no input) | Empty | Display trending suggestions and products for the locale | Use maxResults to show 6-10 popular terms and 4-6 popular products. This provides immediate inspiration and discovery |
| Completion stage | 3+ characters For example: "dre" | Switch to displaying query autocomplete suggestions alongside matching products | Use maxResults to show 6-8 term completions and 4-6 products. Ensure these terms are direct continuations of the input |
| High confidence | 5+ characters | Continue with query autocomplete, but reduce the number of suggestions to make room for product/content recommendations (see the next section) | 4-6 term completions and 6-8 products, so the user can go directly to a product page |
Combine query suggestions with product suggestions
A modern search box can show search terms and products together in a single dropdown. A single Autosuggest request returns both suggestion types, so you don't need to call a separate recommendation API while the user types.
| Suggestion type | Purpose | How to display |
|---|---|---|
| Query suggestions | Help the user express their intent and reach a full results page | Display as a list of terms. Selecting a term sends a Search API request |
| Product suggestions | Let the user skip the results page and go directly to a product | Display the product image, name, and price. Selecting a product opens the product page |
Implementation tips:
- Use a 2-column layout: One column for query suggestions and one for product suggestions.
- Send one request per keystroke, and discard responses that arrive out of order.
- When
productSuggestionsis empty, continue showing query suggestions rather than collapsing the product column. - Report a click on a product suggestion as engagement, just as you would report a click on a search result.
Updated 16 days ago
Did this page help you?
