◀ Title screen◀ All entries
  • 80% less processing time
  • formula + exceptions
  • manual override
  • React dashboard

The problem

Restocking was done by hand. People decided what to order and how much using experience, guesswork and some basic calculations. It worked, but it was slow, it depended on who was doing it, and nobody could easily explain why a number was what it was.

Understand the process before automating it

I didn't start with code. I started with the people who did the job. Working with the domain experts, we went through how restocking actually happened: what they looked at, which rules they followed without writing down, and where they used judgement.

That turned into a formula. Most products followed it. The cases that didn't got exception rules, each with its own formula. And wherever the formula couldn't know something a person did, there was a manual override.

text
sales history ──▶ formula ──▶ suggested order ──▶ dashboard
                    │              ▲
           exception rules     manual override
                               (domain experts)

What the formula looked at

Demand came from two views of the data:

  • Daily demand over the last month, for what is selling right now.
  • Monthly trends, for what tends to happen at this time of year. Festivals and other periodic peaks were covered by the trend instead of by someone remembering them.

When something new or unusual came up that the data couldn't see coming, the domain experts handled it. They could change the inputs or override the result, so the system never had to be smarter than the people who knew the business.

The dashboard

The backend was Django, and the team worked in a React dashboard. It showed the suggested orders and the data behind them, and let them export everything as CSV for the tools they already used.

Together, the formula and the dashboard replaced the manual workflow and cut inventory processing time by 80%.

What I'd do differently

  • Start with a pilot. Run the formula alongside the manual process on a small set of products, and compare its suggestions with what actually happened to inventory before switching over.
  • Look for more trends. Last month and monthly patterns covered a lot, but there was more signal in the data to explore.
  • Group similar products. Products with similar demand patterns could share rules, instead of each one being handled alone.

Takeaway

The hard part of automating a manual process is understanding it, not writing the code. Sit with the people who do the work, turn what they know into rules, and leave them a way to override it. The 80% came from that, not from a clever algorithm.

Building something like this? Send a message ▶