Cobra · Dev
An app that reads supplier price lists for me
Context
Every supplier price update (a PDF, or a "new product" email) meant a long manual task: read the document, find the right product in Odoo, check the EAN/SKU codes, key in the buy price and the sell price one by one. With the volume of suppliers and references we handle, it was repetitive, time-consuming and error-prone.
What was built
An internal app ("Product Update & Creation") that automates the whole pipeline:
- Upload a supplier price-list PDF, or automatic detection by watching a dedicated read-only mailbox.
- Structured extraction of the content (EAN, SKU, buy / sell price) via a Claude model.
- Automatic matching against the Odoo base (EAN then supplier code, with tolerance for slight code variations).
- If the product doesn't exist yet: a creation proposal, preceded by a duplicate-detection pass before anything is created.
- Systematic human validation before any write, with automatic traceability in each product's history.
- The option to schedule an update for a future date rather than running it right away.
- A deliberate guardrail: a newly created product is never published online automatically — going live stays a human action, so an incomplete product never shows up on the site before it's ready.
What was hard
- Detecting the real candidates in a busy mailbox without surfacing noise (newsletters, auto-replies, internal threads) — solved with a light AI triage pass before adding anything to the processing queue.
- Avoiding duplicates when a product had already been created elsewhere, sometimes with incomplete data — added a name-similarity check before any creation.
- Making the app talk to the Odoo pricing system without risking corrupting the prices of other variants of the same product (see the linked entry).
Stack
Python automation + generative AI for document extraction, API connection to the ERP, read-only connection to a professional mailbox, a dedicated web interface with protected access.
What this illustrates
A fairly generic pattern — document extraction → matching against the central system → human validation → write — found in many supplier / e-commerce processes. The key point isn't to automate everything, but to keep the human at the steps that matter (validating the content, going live) while eliminating the repetitive data entry.