Case study · Operations software

When the parcel runs the order: an ERP for a workwear manufacturer

Website orders, Nova Poshta waybills, stock by size, and refused parcels that find their own way back to the shelf. Live in production on day five.

The orders journal on a laptop and a phone, with the waybill status in every row.
The orders journal on a phone, with new website orders highlighted and a waybill status in every row.
The orders journal on a phone, with the waybill status in every row.
Client
A Ukrainian manufacturer of workwear and safety footwear
Users
The owner, sales managers, the warehouse and the embroidery workshop
Timeline
November 2026. Live in production on day five; everything below was built within 17 days
Stack
Next.js, PostgreSQL, Vercel, Supabase
Integrations
WooCommerce online store, Nova Poshta API
Day 5live in production
17 dayseverything in this case study
2 clicksall a manager does to move an order
21Nova Poshta tracking codes mapped to order statuses
15 minhow often tracking runs while the ERP is open

The business

The company sews and sells workwear: insulated jackets, work suits, hi-vis vests, safety boots and gloves, with logo embroidery on request. Companies buy wholesale on invoices. Individuals buy through the company's WooCommerce store and mostly pay cash on delivery through Nova Poshta, Ukraine's largest parcel carrier.

What was broken

The online store had become the system of record, and it was never built for that.

348orders stuck in "Processing" on the website
1 in 10parcels refused and sent back (71 of 670 in three months)
1,383 of 1,386sizes with no stock of their own

Orders were never closed

348 orders sat in "Processing" on the website. Nobody could tell which were delivered, refused or still waiting at a branch.

Every waybill was typed twice

Managers copied addresses from the website into the Nova Poshta cabinet and checked tracking numbers one by one.

Refused parcels vanished

About one parcel in ten came back: 71 of 670 shipments between September and November. The goods never went back into the website's stock, and of 25 refused orders we traced, 8 even said "Completed".

Stock had no sizes

1,383 of 1,386 size variations took their stock from the parent product, so the website kept selling every size as long as the model had anything left.

Leads lived in email

Website forms sent an email and stored nothing, and nobody knew which ad brought which order.

Before
After
Website: orders stuck in Processing
Nova Poshta cabinet: waybills typed by hand
Email inbox: leads
One stock number per model
One ERP
WooCommerce
Nova Poshta API
Nobody could tell which orders were delivered, refused or still waiting.
Before
Website: orders stuck in Processing
Nova Poshta cabinet: waybills typed by hand
Email inbox: leads
One stock number per model
Nobody could tell which orders were delivered, refused or still waiting.
One ERP
WooCommerce
Nova Poshta API

Statuses that follow the parcel

The owner's first decision shaped the whole system. The design mockup had the usual chain of internal stages: confirmed, picking, embroidery, shipped, received. Every step needs someone to change it by hand, and the website already showed where that leads. So we replaced the chain with the parcel's own journey and removed the status dropdown altogether.

A manager touches an order twice:

  1. Edit. A new website order arrives highlighted in yellow and read-only, with a red dot on the Orders menu item. The manager who clicks Edit takes the order, and it moves to Awaiting waybill.
  2. Create waybill. The order moves to Awaiting dispatch.

From there, Nova Poshta moves it:

  • Handed over or on its way: In transit.
  • At a branch or parcel locker: Awaiting pickup, with a day counter. After three days the parcel is flagged, so a manager calls the customer before it goes back.
  • Collected: Completed. Cash on delivery counts as paid, and the order enters the sales report on the day it was delivered.
  • Refused: Refused. Nova Poshta then creates a return waybill on its own. The ERP tracks in two passes, first the original waybills and then their return waybills. While the return travels, the order is Returning to sender. When it reaches the sender's branch, the order is Returned, and the goods go back into stock in the ERP and on the website.
Website
Manager · 2 clicks
Nova Poshta tracking · no clicks
If the parcel is refused · still no clicks

New
Highlighted yellow, red dot in the menu. Stock is held for the order.

Awaiting waybill
Clicks Edit and becomes the order's manager.

Awaiting dispatch
Clicks Create waybill. Waybill, label and register printed.

In transit
Register accepted at the branch in one scan.

Awaiting pickup
Day counter; after three days a manager calls the customer.

Completed
Cash on delivery counted as paid. Order becomes a sale.

Refused
Reason from Nova Poshta shown in the order.

Returning to sender
Return waybill found on the second tracking pass.

Returned
Goods back in stock, in the ERP and on the website.
How the order status follows the parcel, including the way back.
Website
Manager · 2 clicks
Nova Poshta tracking · no clicks
collected
refused
New
Highlighted yellow, red dot in the menu. Stock is held for the order.
Awaiting waybill
Clicks Edit and becomes the order's manager.
Awaiting dispatch
Clicks Create waybill. Waybill, label and register printed.
In transit
Register accepted at the branch in one scan.
Awaiting pickup
Day counter; after three days a manager calls the customer.
Completed
Cash on delivery counted as paid. Order becomes a sale.
Refused
Reason from Nova Poshta shown in the order.
Returning to sender
Return waybill found on the second tracking pass.
Returned
Goods back in stock, in the ERP and on the website.
How the order status follows the parcel, including the way back.

Nova Poshta reports a parcel's state as a numeric code. The ERP maps 21 of these codes to order statuses, and the mapping was checked against the store's last 100 real waybills, including refusals with the return on its way and already received.

Every change lands in the order's history with its source, so the question "who moved this order?" always has an answer: a manager by name, the website, or Nova Poshta.

The order card: the stage bar, the waybill with its live status, and a history where Nova Poshta moves the order.
The order history, where Nova Poshta changes the status.
The order card: the stage bar, the waybill with its live status, and a history where Nova Poshta moves the order. Tap the image to open it full size.

Tracking runs every 15 minutes while anyone has the ERP open, and once more every night. A lock in the database makes ten open browser tabs start one run, not ten.

Not every order goes through Nova Poshta. When a customer collects from the warehouse or a company sends its own truck, a manager clicks Completed. The button works only until Nova Poshta accepts the parcel; after that, only tracking can close the order. Cancelling asks for a reason, and Couldn't reach the customer is a status of its own, because a wrong phone number at checkout is a different problem from a change of mind. An unused waybill is deleted in Nova Poshta automatically.

Waybills without retyping

Website orders arrive with Nova Poshta's own IDs for the city and the branch, taken from the checkout, so most are ready for a waybill on arrival. The orders journal shows a Create waybill button right in the row, or a hint such as "pick a branch". A manager can tick several orders and create all their waybills at once.

The defaults come from the store's last 100 waybills: recipient pays, one parcel of about 4 kg, cash on delivery for the full amount. A register for the day prints with one click, and the branch accepts the whole batch with one scan.

Nova Poshta shipments: every waybill with its live status, parcels waiting too long, and the day's register.
A notice that statuses were updated.
Nova Poshta shipments: every waybill with its live status, parcels waiting too long, and the day's register. Tap the image to open it full size.

Stock the website can trust

The ERP now owns stock, and the website takes it from the ERP. Every change is a recorded movement: a receipt, a count, an order, a cancellation or a return. The website receives the difference rather than the total, so a website order placed between two syncs is never overwritten.

Website shows 7
A website order sells 1 → 6
A return comes back: the ERP sends +1 → 7
Sending the total (7) would erase the sale nobody has imported yet.
Website shows 7
A website order sells 1 → 6
A return comes back: the ERP sends +1 → 7
Sending the total (7) would erase the sale nobody has imported yet.

An order holds its goods from creation until it is cancelled or returned. Change a size, swap a product or cancel, and the ERP recalculates what the order holds.

A refused parcel goes back on the shelf and back on the website, with no clicks.
A refused parcel goes back on the shelf and back on the website, with no clicks. Tap an image to open it full size.

An inventory count by size switches a model to per-size stock in the ERP and on the website at once. In the first count, a hi-vis vest that showed 50 in stock had none at all in two sizes, and the website had been selling both.

Stock by size: colour shows what is running out; on the phone, a product opens as a card.
A product card on a phone.
Stock by size: colour shows what is running out; on the phone, a product opens as a card. Tap the first image to open it full size.

Leads and their sources

A small WordPress plugin now saves every form submission with the visitor's traffic source and hands it to the ERP. A manager turns a lead into an order in one click, with the customer, the phone, and even the product and size from the page already filled in. Orders and leads both show where the customer came from: Google Ads, Facebook or Instagram ads down to the placement, search or a direct visit.

  • Google Ads
  • Facebook ads
  • Instagram ads
  • Search
  • Direct visit

A sales report for planning production

For a manufacturer, a sales report answers one question: what to sew next.

The report counts only what customers actually received, and breaks it down from category to product to size and height, or by city, against the previous period or last year.

The sales report: category, product, size, compared with the previous month.
The sales report: category, product, size, compared with the previous month. Tap the image to open it full size.

How it was built

The system was built by one product lead working with Claude Code, an AI coding agent. Every integration was tested against the live service: test waybills went through the real Nova Poshta API and were deleted straight away, and the leads plugin ran on a Docker copy of the store first. Every nightly database backup is test-restored before it is kept.

Some lessons only came from the live API:

Nova Poshta rejects a parcel-locker waybill without seat dimensions, so the ERP always sends them and checks the locker size limit before it asks.

Blog posts claim that a waybill with a printed label can't be added to a register. On the live API it can, but a printed register is closed for good.

The API refuses calls that come faster than about one every half second, so every call goes through one queue with retries.

The result

Orders no longer get stuck, because nobody has to remember to move them.

A manager's work on an order ends once the waybill is printed. Nova Poshta takes it from there, and a refused parcel finds its own way back to the shelf and to the website. Stock on the website matches the warehouse, size by size. And the owner can see, by size and by city, what customers actually kept.

The company and its products are not named. All screens shown are mockups with fictional data.

Need a system like this for your business?

Let's talk
Book a free call