
Sales managers and salon admins collect orders from photos every day: handwritten lists, receipts, price-list fragments. Manually transferring line items into the catalog takes time and causes errors. The WEB24 team built TelegramSearchBot — a bot where you send up to three images. OpenAI Vision reads the text, the bot builds an editable product list, searches via the Sellwin Search API, and adds matched items to the cart in one tap. OCR prompts and search synonyms are configured in the admin panel without redeploying the bot.
Collecting B2B orders from photos is a familiar workflow, but still digital-manual: an employee gets a snapshot, decipheres line items by hand, looks up SKUs in the catalog, and adds them to the cart. Speed and accuracy suffer along the way. The client needed a solution that:
They needed more than OCR — an end-to-end flow: photo → list → search → cart.
Long polling on aiogram: Tax ID (UNP) auth, up to 3 images, list building, line-item editing, and cart submit via inline buttons and /start, /unp, /list, /add commands.
The recognition service loads system/user prompts from the admin API (ocr-ai-settings). If the API is unavailable, fallback prompts from config are used. The result is a structured line-item list for manager review.
Batch search over the name list, auth by Tax ID (token/refreshToken), and order line creation via Basket API. Search synonyms are managed in the admin panel and improve matching without bot code changes.
Photos are uploaded to object storage before cart creation. Keys like user_{id}/{timestamp}_{uuid}.{ext} support audit and reprocessing.
Docker Compose for deploy, a dedicated FastAPI GET /health endpoint for monitoring. Modular layout: handlers, services (ocr, sellwin, store, minio_storage), and a factory to register handlers.

The bot cut the path from order photo to a ready cart from several minutes of manual work to a single Telegram scenario:
The solution fit the familiar channel — Telegram — and removed the routine of moving handwritten orders into a digital cart.
Data flows through: Telegram → OCR → edit → search → cart.

Telegram UI: photo upload, list building, and cart submit

OpenAI Vision + configurable prompts and search synonyms for accurate product matching
Bot quality comes from three layers: photo readability, OCR prompt accuracy, and search relevance with synonyms. That is why we moved prompts and synonyms into the admin panel, and kept fallbacks plus a clear list-edit step before cart submit in code. In-memory state suits an MVP on a single instance; scaling will need external session storage.
At WEB24 we build Telegram bots with AI recognition and integration into your catalogs, CRMs, and carts. Get in touch to discuss order-intake automation!
Общество с ограниченной ответственностью «НИКПА-СТРОЙ»
УНП 193184561