What it is
A backend that compares inventory between the ERP system and the warehouse system every night, raises a ticket for every discrepancy, and keeps those tickets up to date until the stock agrees again.
An AI diagnosis step then explains each discrepancy in business terms, so support staff know what to check before they open a single screen.
What it does
- Extracts stock from the ERP and the warehouse database, normalises both, and compares them on a configurable key.
- Creates, updates and closes discrepancy tickets in the case system automatically, with a full case history and audit log.
- Produces a full report and an action report as spreadsheets, and emails them to the right people per customer.
- Diagnoses root causes with a family of detectors (timing, lot swaps, status mismatches and more) and writes a note on the ticket.
- Serves several customers from one install, each with its own configuration.
How it works
- A scheduled task runs the comparison after the day's movements have settled.
- Discrepancies are matched against open tickets: new ones are created, resolved ones closed, recurring ones never reopened but raised afresh.
- For each ticket under investigation, the model picks checks from a fixed menu; Python runs the checks and computes the numbers.
- The model never calculates: if it fails, a deterministic playbook runs the same checks in a fixed order.
- A support user can request a fresh diagnosis from the app; a queue picks it up within the hour.
Design choices
- The code does the maths, the model does the reasoning: every figure in a diagnosis note is computed, not generated.
- A command-line tool with one subcommand per job, so operations can run, check and re-run any step by hand.
- Unit tests for the comparison rules and the ticket scenarios, plus a doctor command that checks every connection before go-live.
- Built against a written specification with a phase-by-phase checklist, and a cybersecurity go-live checklist with evidence.