Skip to main content

Overview

The Shopping Agent bridges the gap between a user’s cannabis preferences and what is available at their local dispensary right now. This flow documents the complete journey from selecting a dispensary to receiving personalized product recommendations.

End-to-End Flow

Pre-Scan Requirements

Scan Progress Flow

Progress stages with percentages:
StageProgressTimeWhat Happens
Cache Check5%<1sCheck Supabase for recent scan
Scraping10-40%5-60sMulti-tool extraction with cascading fallback: Extract (multi-page wildcard) → Scrape+JSON → Scrape+AI (Claude fallback) → Sitemap Discovery
Matching40-60%2-5sProducts matched to 16,000+ strain DB
Personalizing60-85%3-8sClaude generates personalized rankings
Saving85-95%1sCache results for 4 hours
Complete100%InstantResults displayed

Results Screen Navigation

Personalization Tag Logic

New Strain Discovery Flow

Edge Cases

ScenarioBehavior
Dispensary has no online menuError: “No menu URL found” with setup instructions
Menu behind login wallError: “Unable to access menu” with explanation
Menu has 200+ productsAll extracted, categorized, may take 60-90s
Zero products matchedAll appear in New Discoveries tab
User has no data (new user)Tags limited to price-based, no personalization
Menu URL changedOld cache invalidated, fresh scan triggered
Extraction failsCascading fallback: multi-page Extract → Scrape+JSON → Scrape+AI (Claude) → Sitemap Discovery. Error shown only if all stages fail.
Same product listed multiple timesDeduplicated by name
Strain name with special charactersNormalized for matching
User closes app during scanScan continues, results on return
Cache expired mid-browsingResults still visible, refresh available
Dispensary menu empty (holiday/closed)“No products found” with retry option

Dispensary Management

Setting up dispensaries with menu URLs.

Strain Discovery

Exploring matched strains further.

Stash Management

Adding purchased strains to stash.

Collection & Rankings

Wishlisted strains flagged in results.