Challenge
Parts sales relied on multiple Excel catalogues, customer-specific agreements, currency calculations and manually prepared documents. Employees had to reconcile article variants, keep purchase costs hidden, apply each customer’s pricing rules and exclude ambiguous items before producing an invoice.
Solution
I developed a Telegram bot with ADMIN, MANAGER and CLIENT roles, tax-ID-based client authorisation and a unified SQLite catalogue. Search works by article, cross-reference and free text; for complex requests, YandexGPT identifies likely positions and asks for clarification when a match is ambiguous. The pricing engine combines purchase cost, product coefficient, currency, markup, customer category and fixed individual prices. Exchange rates can be loaded from the Bank of Russia API or set manually by an administrator.
Outcome
The bot covers the complete journey from request to finished document. A user can upload an Excel order with varying column structures, receive matched positions, personalised prices, totals, statuses and reasons for unmatched rows, then assemble a request and generate a PDF invoice or quotation. Mandatory quantity and ambiguity confirmation reduces costly mistakes, while internal pricing remains visible only to employees.