This recipe implements collection:items:search, the most common feature across Scenaro e-commerce experiences (Lupi, Le Petit Ballon, Urbansider, etc.).

Feature overview

Handler pattern

Registry entry

Rendering results in your own UI instead of a feature panel? Skip the registry and pass the handler via the tools option of useScenaroSession — it receives (args, context) where context.settings and context.collections come from the scenario config.

Search component essentials

Your SearchFeature component should:
  1. Read toolState.items from useFeatures()
  2. Render product rows using a template (e.g. ProductTemplate)
  3. Handle empty results with a friendly message
  4. Support scroll boundary prevention on mobile

Authenticated API calls

Search API calls need the user JWT. Use the shared client:

Agent prompt hints

Reference implementation

See experiences/lupi/src/lib/scenaro-sdk/features/collection-items-search/ in the monorepo for a full production implementation.