Overview
Search widget scope, browser delivery, and host responsibilities.
The Search SDK embeds a search field and panel in your host application. It provides recent searches, recommended products, typeahead, catalog results, and an optional handoff to chat.
Prerequisites
| Requirement | Host responsibility |
|---|---|
| Browser page | Load a classic script after the mount container exists |
| Member session | Supply a current member bearer accepted by the selected API |
| API access | Enable the host origin for authenticated search requests |
| Open state | Handle onOpenChange and call update({ open }) |
| Product selection | Provide onResultSelect to navigate or handle a selected product |
Delivery and installation
The supported runtime is a browser IIFE, loaded through a script tag.
It registers augeo-search and exposes window.AugeoSearchSdk.
The bundle includes its React runtime, design-system styles, tokens, and CSS reset inside Shadow DOM.
A host does not need React or a separate design-system stylesheet to embed it.
| Public surface | Value |
|---|---|
| CDN bundle pattern | https://sdks.augeoai.net/search-sdk/loyalty/<version>/index.js |
| Global | window.AugeoSearchSdk |
| Factory | createAugeoSearch(options) |
| Mount target | An existing HTMLElement |
| Instance methods | update(options), destroy(), and searchCatalog(request, options) on a current bundle |
| Diagnostics | window.AugeoSearchSdk.version and .apiBaseUrl |
Use a published release URL supplied for your environment.
Pin an immutable version for production traffic.
The latest alias can change without a host deployment.
The examples show that alias for initial setup, not a release availability guarantee.
The SDK source provides standalone TypeScript declarations for type-only imports. It does not provide an importable JavaScript module. Importing declarations does not load the widget runtime.
SDK and host duties
| SDK behavior | Host behavior |
|---|---|
| Fetch suggestions, recents, and recommendations | Supply member authentication and the correct API origin |
| Render catalog results by default | Optionally provide onSearchSubmit for a host results page |
| Provide product selection callbacks | Navigate, enforce product selection, and perform member mutations |
| Report Ask AI intent and seed text | Open a chat assistant through onAskAi |
| Request panel visibility changes | Apply those changes through update({ open }) |
| Cancel stale requests | Call destroy() when the route or session ends |
The widget does not implement a host results route, checkout, cart mutations, or wishlist mutations.
It does not create a chat conversation by itself.
Recently viewed data has an API endpoint, but this widget has no recently viewed section.
Catalog completion metadata exposes hasMore; the panel has no pagination controls.
searchCatalog is a separate host read for one ranked page.
It is not a panel next-page control.
Feature-detect it.
An older bundle still mounts without that method.
Choose a results mode
| Mode | Configuration | Submission behavior |
|---|---|---|
| Panel results | Omit onSearchSubmit | Fetch catalog results and keep the panel open |
| Host results | Provide onSearchSubmit(query) | Call the host and request panel closure |
Recommendations and product selection remain available in both modes.
onCatalogComplete runs only for successful catalog requests rendered by the panel.
Related links
- Mount the widget: Quick start
- Review options and types: Configuration
- Understand each interaction: Functionality
- Connect routing and chat: Host integration
- Validate before rollout: Validation