← All examples

Product Recommendations

Two calls over your catalog: strategy-based recommendations from input products, and free-text style search. Both return ranked products with a match score where higher is always better.

Mock mode is on. Requests are answered by an in-browser mock — no API key needed. Drop ?mock=1 from the URL to use the live service.

1Connect

There is no separate authenticate step — createDesignWithMe() signs in on its first real call below. Your catalog scope comes from the API key; there's no client id to pass.

Settings persist across every example page for this browser tab. Change them, then reload the page to build a new client.

2Recommendations from input products

dwm.recommendations.forProducts() — ranked matches for your cart or scene. A higher threshold returns fewer, more confident matches.

3Free-text style search

dwm.recommendations.search() — describe the style in plain language. Scores here are the same 0–1 match scale as recommendations: higher is better.

Activity feed

One subscription, dwm.on('activity', ...), sees every event this client emits — the same feed powers dwm.activity.log.