# Visual Lookup AI — Match a Photo to an SKU

_Enterprise_

Snap a photo of a product on your phone, get the top 3 matching inventory items with confidence scores. Useful when you're holding something off a vendor pallet and you don't know which SKU it is. Two-path implementation under the hood: catalogs ≤ 200 items go through a single-pass manifest match; catalogs > 200 use an extract-then-fuzzy-match pipeline so manifest size doesn't bound accuracy.

## Steps
1. Mobile: Inventory > Visual Lookup. Tap the camera button, take a photo, hit Use. The screen shows a spinner for ~2-5 seconds, then up to 3 candidate items with confidence percentages and a short reasoning line ("Visible 'ASD' branding matches manufacturer; orange shape matches item name").
2. Tap any match to open the item detail screen.
3. Web (Inventory > Items > Visual Lookup card): drag-drop or browse to upload a photo. Same flow.
4. If no good match comes back, the "detected text" line still shows what the AI read on the product — useful as a clue to search the items panel manually.

## Tips
- Match accuracy is best when the product has visible text (SKU, model number, brand logo). A photo of a plain box gets lower-confidence guesses.
- For catalogs over 200 items, the system runs an extra extraction step: it first asks the AI for identifiers from the image (no manifest), then runs a server-side fuzzy match on SKU / barcode / manufacturer name / item name / category. SKU hits anchor confidence at 0.9; weaker signals decay from there.
- Each Visual Lookup call writes an AiAction row (riskLevel low, auto-approved) for audit. The image bytes are not stored — only metadata (format, byte count, match count, top confidence, token usage).

## Example
A part-time inventory clerk gets a delivery with no paperwork — just a pile of valves with cryptic stamped numbers. He photographs each part once, gets the right SKU match in 3 seconds, scans into the bin. What would have been a 90-minute "what is this?" session ends in 12 minutes.

## Troubleshooting
- **All matches come back at <40% confidence** — Either the image is too dark / blurry / abstract, or the product genuinely isn't in your catalog yet. Fix: Retake the photo with better light and closer framing. If still no good match, the detectedText line tells you what the AI sees — use that to search items manually or create a new item.
- **Returns empty matches but detectedText is populated** — On the two-pass path (>200 items), none of the extracted identifiers fuzzy-matched any catalog row. Either the product isn't in your catalog or the spelling differs. Fix: Use the detected text as a search query in the Items panel. If the item exists with a different name, add a barcode or SKU alias so future lookups hit it.
- **"Suite not active" error** — Visual Lookup is gated to Enterprise. Fix: Activate Enterprise in Settings > Billing > Suite Add-ons.

## Plans
Enterprise suite required. Counts against your monthly AI quota (one Anthropic vision call per lookup, ~$0.003-0.01 depending on image size).
