Platform · AI
Where AI helps, and how.
Five AI features, all powered by Claude, all designed so the model assists humans rather than replaces them. No AI write to your transactional tables — every state-changing action needs human confirmation.
The safety rules (read this first)
- AI never writes to your data. Inventory, sales, customers, prescriptions — every write is a server action triggered by an explicit human click.
- AI suggestions require approval. “Should I message Mrs. Sharma?” → you click Yes → action executes. No auto-execute.
- Customer PII is masked before going to the model. Names and phones become placeholders; the real values are re-hydrated after the model responds. Phones never appear in the API request body.
- Every AI call is logged.
ai_audit_logcaptures the prompt, response, model used, tokens spent, latency, and the calling user. If a customer ever asks “why did Opticops do this?” you have the full trail. - Frame metadata isn't PII. Box-label photos and SKU info are sent to the API as-is — no redaction needed.
1 · Box-label scanner
On /catalog/skus/new, the 📸 panel at the top. Snap a photo of the printed label inside a frame box → Claude extracts brand, model name, model code, colour name, colour code, lens/bridge/temple measurements, MRP, barcode, and category. Form pre-fills any field you haven't already typed in.
Returns a confidence level (high / medium / low). Below high you get an amber banner asking you to verify every field. The model also writes free-text notes when something on the label was ambiguous or partly obscured.
2 · Brand / model dedup
Same form. Type a new brand (“Ray Ban”) and tab out — Claude compares against your existing brands and catches near-duplicates that simple string matching misses (hyphen vs space, regional spellings, swapped word order). Surfaces an amber pill: “Looks like ‘Ray-Ban’ already exists. Use existing?”
Same flow for model names. One click flips your form from new-mode → existing-mode and clears the dup fields.
3 · Colour-code normaliser
Type a colour name (“Matte Black”) and tab out. Claude looks at your org's existing colour-name → colour-code mappings and proposes a code that mirrors the convention. Fills the colour-code field if it's empty — never overrides a code you've typed yourself.
Why: without this, the same colour ends up encoded as BLK / BK / BLA / BLACK across SKUs and your reorder lists fragment.
4 · Customer-recall message drafts
On /customers/insights, pick a cohort (due-for-recall, lapsed, Rx-expiring, high-value, new), open a customer, click Draft message. Claude reads the cohort context + customer's purchase history and writes a 2-3 line WhatsApp-ready message in the right tone for that cohort.
Review, edit, approve. Approval copies to clipboard for manual paste (Phase 1 will queue a Meta Cloud API send). Every draft is logged to ai_audit_log with the customer ID and your approval decision.
5 · Ask
/ask. A natural-language Q&A interface over your operations data. Type a question, Claude answers with cited rows from your database.
Examples that work today:
- “How much did Tri Nagar make last week?”
- “Who's my top customer this quarter?”
- “Which sunglasses haven't sold in 90 days?”
- “Show me all orders with a balance due.”
Streams answers token-by-token. Click any cited row to drill into the source. Read-only — Ask cannot create, modify, or delete anything. If you ask it to (“cancel order X”) it refuses and explains why.
6 · Daily / weekly insights
/reports/ai-insights. A cron-driven summary of what changed in the last 24h (daily) and 7d (weekly). Examples in the Reports doc.
What this costs you
| Feature | Per call | Per day for a typical shop |
|---|---|---|
| Box-label scan | ~₹0.10 | ₹3-5 (30 SKUs) |
| Brand / model dedup | <₹0.01 | <₹1 |
| Colour-code normaliser | <₹0.01 | <₹1 |
| Message drafts | ~₹0.05 | ₹5-15 (100-300 drafts/day) |
| Ask query | ~₹0.10 | ₹3-5 |
| Daily insight | ~₹0.50 | ₹0.50 (runs once) |
| Weekly insight | ~₹1.50 | ₹0.21/day amortised |
ai_audit_log so you can audit your own bill.What's coming
- Hindi + regional-language voice → SQL via the Ask interface (Sarvam vs Whisper still being evaluated)
- Auto-categorisation of inbound supplier emails into purchase orders + receipts
- Frame-trend forecasting from local Instagram tags (catching the next Ray-Ban moment 2 weeks early)
- Per-org fine-tuning on your message tone — so the AI sounds like you, not generic