Repository navigation
Closed
Labels
enhancementNew feature or request
Description
Context
A subtle but high-value question: of the prompts I'm tracking, which ones actually trigger shopping cards in AI answers? Card-eligible prompts have high commercial intent — they're where content optimization budget should go, where competitor-product appearances actually convert, where pricing matters. Card-ineligible prompts may still drive visibility but won't move purchase intent.
This issue adds the Prompts tab on the Shopping page, surfacing exactly that.
Depends on: #103 (normalized table), #104 (page shell).
Acceptance criteria
- Server action
getCardEligiblePrompts(brandId, filters)— joins normalized shopping cards back topromptsviaprompt_results.prompt_id, returns per prompt: prompt text, topic, # platforms that returned cards, total cards count, # cards featuring own brand vs competitors vs other, last triggered date. - Table columns: prompt · topic · platforms-with-cards (badges) · total cards · own/competitor/other split bar · last seen. Sort default: total cards desc.
- Row click → drawer with each appearance of cards on that prompt: timestamp, platform, region, full card list inline (image + title + price + merchant link).
- "Trigger rate" KPI at top of the tab — what % of this brand's tracked prompts ever returned a card in the date range. Useful sanity check (some brands operate in zero-shopping spaces).
- Each prompt row links to the existing prompt detail page (
/dashboard/prompts/[id]) for full prompt context. - CSV export.
Plan gating
Part of the shopping_analytics gate from #104 (Growth+ on cloud, unlocked on self-host).
Out of scope
- Adding new prompts based on "competitors-only" prompts where own brand never appears — that's prompt suggestions territory (already covered by
prompt-suggestions.ts), separate enhancement. - Suggesting content briefs targeted at card-eligible prompts — content opportunities territory, possibly a small enhancement to the
opportunity-generatorlater.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Activity
feat(shopping): normalize prompt_result_shopping_cards + parser worker (