Overview
Saved shops connect purchase history, spending totals, visit tracking, Gmail receipt discovery, and the Shopping Agent. In the app and code these records are called dispensaries; user-facing screens may call them Shops.Order Activation is the source of truth for
how shops interact with Gmail, text order review, and durable order saving.
Add a shop
Open Shops & Dispensaries and choose Add. The current full form supports:
Name is the only required field. Gmail can open this setup inline so a user can
save where they shopped and confirm a receipt sender domain without abandoning
the import flow.
Email fields and Gmail readiness
The backend stores two different concepts:email: a contact address or domain-like value.emailDomains: one or more normalized sender domains used by Quick Sync.
How orders link to shops
When a text or Gmail order is committed with a dispensary name, the server:- uses a requested owned dispensary ID when one is supplied;
- otherwise searches the user’s shops by exact name;
- creates a name-only shop if no exact match exists;
- stores the shop ID and display name on the order; and
- reserves a durable visit effect that increments visit count and last visit.
dispensaryId instead of attributing the
purchase to the wrong managed shop.
Gmail-created shops
Gmail order confirmation can create a shop from the reviewed dispensary name, record a visit, and attach the validated sender domain. The shop is then ready for targeted future Quick Sync.Edit, favorite, view history, and delete
From the shop list or detail screen, users can:- edit the fields supported by the full form;
- favorite or unfavorite a shop;
- open its website, location, or menu links when present;
- view orders linked by
dispensaryIdand spending totals; and - delete the saved shop after confirmation.
Onboarding status
The onboarding question Where do you usually shop? currently searches a small mock list and saves only the onboarding answer. It does not create a Convex dispensary and does not provide Gmail with a usable domain. Gmail’s activation path already uses a real saved-shop flow and asks for a confirmed receipt sender domain before its default targeted scan. The standalone onboarding picker remains preview-only.Current limitations
- Domains are user-confirmed but do not yet carry a separate ownership or confidence score.
- Exact-name backend upsert can produce variants instead of a merged record.
- No merge-duplicate-shops action.
- Deleting a shop does not offer to reassign historical orders first.
Order Activation
See the complete shop, Gmail, text, strain, and save contract.
Gmail Sync
Connect Gmail and review candidate receipts.
Dispensary Flow Map
A concise lifecycle diagram that points back to the canonical flow.
Shopping Agent
Use saved menu URLs for shopping workflows.
