profile
Door
More view more view
Recording the apparel supply chain
through shop-floor numbers and data

Why We Build the Data Structure Before the Screens

Diagram: one order grows to 3 Buyer POs, 12 PO-color rows and 72 size-quantity rows; 5 fabrics grow to 20 fabric-color rows and 360 consumption rows
One order becomes 72 rows of size quantities and 360 rows of fabric consumption (example data)

Key points

  1. Inside a system, one order becomes hundreds of rows, and those rows carry on into purchasing, shipment and settlement.
  2. If those links are broken, someone has to reconnect them by hand at every month-end.
  3. That is why an ERP has to build the structure that connects row to row before polishing the screens.

Month-end at a vendor’s office

There is a scene I used to see at every vendor’s office at month-end.

Two or three people spread out the supplier settlement books and check the PO files and receiving logs against them, line by line. When one quantity doesn’t match, they have to trace backwards to find the step where it went wrong. It was common for that to take more than a day.

This reconciliation gets longer the more buyers a vendor has, and the more sewing contractors it spreads production across. In this post I want to lay out why, when you build an ERP for that kind of vendor, the data structure has to come before the screens.

How many rows is one order?

Let’s start with numbers. Here is an example order, made up for illustration.

StepCalculationRows
PO × Color3 Buyer POs × 4 colors12
Qty by size12 × 6 sizes72
Fabric × Color5 fabrics × 4 colors (each used in every color)20
Fabric consumption20 × 3 Buyer POs × 6 sizes360

That is 360 rows of fabric consumption for one order. Trims and outsourced processing multiply the same way.

What matters is not the number of rows but the fact that the rows are connected. Change the M-size quantity for one PO and one color, and the 5 consumption rows for the fabrics used in that size have to change with it. After that come the PO quantity, the shipped and received quantity, and the paid quantity.

Diagram: editing one cell in the size-quantity grid changes five cells in the fabric consumption grid and the PO, shipment and payment items
Edit one size-quantity cell (PO1 · Color A · M), and 5 consumption rows plus the PO, shipment and payment items have to change with it (example data)

In Excel, the rows are disconnected

With Excel and paper, the same quantity gets written down again at every step: once on the PO, once in the receiving log, and once more in the supplier settlement book.

You can link sheets with references in Excel. But insert one row and the references shift. Copy the file to start a new season and last season’s references get mixed in. When the person in charge changes, the only one who knew how the links worked is gone. In the end, the links between files stay broken.

Month-end reconciliation looks like matching numbers, but what people are really doing is reconnecting broken links by hand.

Comparison: three Excel files keep the old value, while three connected screens inherit the previous step's value
With Excel and paper, the old value stays in the next file. With connected data, each step inherits the previous value and only edited cells are flagged (screen names and layout are illustrative)

More buyers means you need a standard

Every vendor knows that each buyer manages orders its own way. One buyer looks at an order by season, then style and color, then PO. Another looks at it by delivery, then PO, then style, then color.

With only a few buyers, staff can get by with a template for each one. Once the number of buyers grows, that stops working. You can’t build a separate system for every buyer, so all those different ways of ordering data have to come in through one common data standard. That standard has to hold three things at once.

  • Connected: order, BOM, purchasing, shipment and settlement must point to the same rows.
  • Reusable: fabric and trim information must be usable again in other buyers’ orders.
  • Accurate: a wrong value in one place must not spread into costs and settlement amounts.

A vendor that has no factory of its own and spreads production across several sewing contractors has one more requirement. Because production is split by PO and color, the same data has to be cut up again and sent out per factory.

In that situation, the natural common key is ‘Buyer PO × Color’, in other words “which color of which purchase order.” Sales looks at orders by PO, production by style and color, accounting by supplier and month. With this pair as the key, you can pull totals by PO, by style and color, and by supplier and month from the same data.

Diagram: orders from many buyers pass through a Buyer PO by Color standard and are split per sewing contractor
Even when buyers order their data differently, taking every order on ‘Buyer PO × Color’ lets the vendor split it again for each sewing contractor (chip counts are illustrative)

So we build the data structure before the screens

By data structure I mean the data tables and the links between them. A data table is the unit where records of the same kind are stored together (a PO table, a fabric table, and so on). It looks a lot like an Excel sheet. The difference is that which row points to which row, across tables, is defined inside the system.

Holding this structure takes hundreds of data tables and the links between them.

Whole data structure map: hundreds of data tables in nine business areas with links between them, seven tables on one fabric's path highlighted in purple
A vendor ERP’s data tables are linked across business areas. Purple 1 to 7 are the tables one fabric’s quantity passes through (based on a real project’s structure, with table names removed and parts of the layout changed)

Even following a single fabric, the chain is long.

Fabric sample → Fabric library → Order BOM → Consumption → Purchasing → Shipment → Receiving check · Settlement

The fabric information set at the sample stage carries all the way down to settlement. If a value changes anywhere in the middle, every step below it has to be brought back in line.

Data structure map across order, fabric, purchasing, shipment, settlement and costing-approval lanes with the fabric quantity path in purple
One fabric’s quantity has to stay connected from the fabric library all the way to payment items (purple line)

These links produce six outputs.

OutputValues inherited from earlier steps
Material purchase ordersItems and quantities picked from the order BOM consumption
Material shipmentsPO quantities not yet shipped, shipped quantity and receiving check
Purchase settlement · closingPaid quantity per payment round compared with shipped quantity, net amount at closing
Pre-cost / post-costOrder baseline values, pre-cost at the time of approval
Production statusStyle, color, PO, purchasing and delivery records
ApprovalCost sheet and purchase closing values at the time of submission

I want to be clear about one thing. Not every value fills itself in. Prices, dates and terms are entered by the person in charge at each step. What gets inherited is quantity.

Quantities start from the order quantity, yield and loss. Every quantity after that loads the previous step’s value and is edited only when needed. If edited cells are flagged, then instead of reconciling books at month-end you can find the step where the difference started right on the screen.

Flow: order quantity and yield-loss are entered, later quantities are inherited up to the paid quantity
Each step has a fixed rule for whether its quantity is entered directly or inherited from the previous step (example data)

Rules to settle first

Links alone don’t stop wrong values. There are rules that have to be settled before the screens.

RuleProblem it prevents
The same number can’t be created twicePO numbers colliding and settlements attaching to the wrong PO
A buyer, supplier, factory or fabric with the same name can’t be registered twiceOne company’s transaction history scattered across several codes
Total quantity and amount are recalculated from color and size quantitiesTotals that don’t match the detailed quantities
The amount at the time of approval is stored separatelyThe basis for an approval disappearing when a price changes later
Every change to a price or shipping date is loggedNobody knowing who changed what, and when

These rules barely show on the screen. But without them, no matter how convenient the screens are, month-end reconciliation doesn’t go away.

So when do the screens get better?

Building in this order, the first screens you see can look rough. While the structure is being laid down, the screens carry the functions first.

We split the order into three stages.

  1. Check the data flow: run a few real orders from sample to approval and confirm the data flows all the way through.
  2. Refine the screens: once the flow is stable, refine screens and personal settings around how each department works.
  3. Expand AI: after that, widen the range of documents AI reads and enters.

AI comes last for the same reason. Even if AI reads values from a PO document or a tech pack, those values land in the wrong cells unless their place is already defined by PO, color and fabric.

Wrapping up

I don’t think what the people opening those books every month-end needed was a prettier screen. What they needed was a connection that shows how far a change has spread when one quantity changes.

Screens can be changed as much as you like later. But if the links are laid down wrong, the screens and AI built on top of them are wrong too. That is why we build the data structure first.

back icon Back