Skip to main content

FAQ

Does this work only for logged-in users?

No. It works for both anonymous and logged-in users.

  • For anonymous users, recommendations are inferred in real time from on-site behavior and request context.
  • For logged-in users, user_id adds a longer-term view of taste and preference.

What should we use as the visitor identifier in recommendation requests?

Use user.device_id as the required visitor identifier.

  • Set it to Snowplow domain_userid (long-lived browser identifier).

Can recommendations stay consistent across devices?

Yes. Send the same business user_id across devices to keep recommendations consistent across sessions and surfaces.

Browse and Search use cursor-based pagination.

  • First page: omit pagination.
  • Next pages: send both pagination.page and pagination.cursor.
  • Set pagination.cursor to the previous response recommendation_id.
  • Keep the same limit for the full pagination chain. Changing limit during pagination is not supported.
  • If the cursor is invalid or expired, the API returns 404. Start again from page 1 without pagination.

Pagination behavior depends on mode:

  • Personalized mode: page numbers are UI labels. Jumps like 1 -> 5 -> 10 are allowed, but the cursor still returns the next unseen result set in the same stream.
  • Ordered mode: deterministic sorts (for example price/name/date) support true non-sequential page jumps.

In personalized mode, a higher page number does not mean better-ranked results.

Where can I find filter syntax and examples?

Use the Filters section as the source of truth for:

  • filters vs facet_filters
  • supported operators (including $elemMatch)
  • operator behavior (including AND logic for multiple operators in one field object)

Do we need infinite scroll, or can we use traditional pagination?

Both are supported.

  • Use infinite scroll if you want smaller loads and faster interaction feedback.
  • Use traditional pagination if it fits your UX better.

Recommendation quality and sequence are preserved in both approaches.

Is request limit the same as the number of returned items?

Use these fields as page-based terms:

  • limit (request): page size. One request returns one page.
  • count (response): number of items returned on this page.
  • total (response): total number of results that match the full query/filters.

In most cases, count equals request limit.

On the last page, count can be smaller than limit.

Can a recommendation_id expire? Can we store it in browser session?

Yes. Recommendation context is short-lived.

  • Each response includes expires_in (seconds).
  • expires_in is dynamic and commonly around 300 seconds.
  • You can store recommendation_id in browser session for active pagination.
  • When it expires, pagination returns 404 and you should start a fresh first-page request.

What sort and facet fields can clients use?

Sorting and faceting are configured in the dashboard.

  • You can use any field that is configured in the Dashboard.
  • featured is supported for personalized ranking (including merchandising and experiment logic when enabled).
  • Configured numeric or string fields can be used in ascending/descending order.

Do User Tracking API events update recommendations?

Yes. Tracking events (for example page views, list views, clicks, and add-to-cart) inform recommendation updates.

Events are tied to device_id and, when available, user_id. Sending user_id enables cross-device continuity.