Case Study

Turning bulk invoicing into a traceable workflow

Problem

The warehouse team invoiced the day’s orders in bulk and generated shipping labels. The old screen did all of this inside a single page request, calling the e-invoice and shipping services order by order.

  • The process took a long time and could time out.
  • Users couldn’t see progress; when a job was cut off halfway, it was unclear which orders had been invoiced.
  • Restarting the job carried the risk of duplicate invoices; corrections were made by hand.

Approach

Without touching the old screen, we built a new flow next to it:

  1. Preview: Shows which orders will be invoiced, and which are excluded and why, without changing anything.
  2. Background processing: An approved job is processed in the background in order; it keeps going even if the user closes the page.
  3. No duplicate invoices: Every step of every order is recorded. Even if the job is restarted, a completed step doesn’t run again.
  4. Live progress: Anyone who opens the page sees per-order progress in real time; failed orders can be retried with one click.
  5. Dry-run mode: The whole flow can be tested without issuing real invoices.

In the second phase, online and marketplace orders were brought together on a single screen; users can prioritize order types with drag and drop.

Lessons learned

  • Keeping idempotency at the order and step level rather than the job level let interrupted jobs resume safely.

My contribution

I clarified the requirements with the team and designed the flow; I built the background job, the live progress screen and the tests.

Technology

  • Hangfire
  • SignalR
  • EF Core
  • e-Archive
  • Shipping APIs