Repository navigation
Closed
Labels
e-commerceShopping, product catalog, store and marketplace connectorsenhancementNew feature or request
Description
Summary
Every product card we capture links to a merchant. classifyMerchant (#1186, shipped in #1242) already tells whether that link goes to the brand's own store, a marketplace (Amazon, eBay, Walmart, Etsy, AliExpress, Temu, Trendyol, Hepsiburada) or another reseller. Nothing stores or shows the result yet.
This issue stores the destination on each card. It then shows a split of the brand's own products by destination, and flags a reseller selling the brand's product for less.
Scope
- Store the destination on each card.
- Add
merchant_kind(own/marketplace/reseller),marketplaceandlisting_idtoprompt_result_shopping_cards. - Set them where cards are inserted (
cloro-result-handler.js), withclassifyMerchant(card.merchant_url, { brandDomains })and the brand'sbrand_domains. - A card with no merchant URL stays unclassified (null).
- Classify existing rows from their stored
merchant_url, either inbackfill-shopping-cards.jsor in a one-off pass.
- Add
- "Where AI sends shoppers" split.
- Covers the brand's own products: cards with
matched_brand_role = 'own'. - Segments: your store, Amazon, Walmart, eBay, other marketplaces, other resellers.
- Same window and filters as the Overview tab: add it to
shopping_overviewor a sibling read. - Unclassified cards are counted and shown apart, not spread over the segments.
- Covers the brand's own products: cards with
- Shopping page.
- A card with a split bar on the Overview tab of the Shopping page, read through
shopping.ts. - When the Shelf view and the Products table exist, the same split goes on Shelf and under the revenue column in Products.
- A card with a split bar on the Overview tab of the Shopping page, read through
- "Reseller cheaper than you" alert.
- For one of the brand's products in the window, compare the lowest price seen on the brand's own store with the price on a reseller or marketplace card.
- Match the two cards by listing id, or by normalized title plus brand until catalog matching exists.
- Flag when the reseller is lower by at least 5% in the same currency.
- Show the flagged products as a list on the Shopping page, with both prices and both links. It becomes a Readiness row once Readiness exists.
Acceptance criteria
- New cards get
merchant_kind,marketplaceandlisting_idon insert. Existing cards are classified by the backfill. - For any window, the split's segments add up to 100% of the classified own cards, and each segment equals the count of those cards.
- Unclassified cards show as a separate count.
- A fixture with an own-store card at 120 USD and an Amazon card for the same product at 99 USD raises the alert. Equal prices or different currencies don't.
- Server tests cover the classification on insert and the alert rule.
Metadata
Metadata
Assignees
Labels
e-commerceShopping, product catalog, store and marketplace connectorsenhancementNew feature or request
Activity
feat(shopping): show where AI sends shoppers, and flag resellers chea…