Skip to content

Part 1 of 7 · Packaging data reporter series ~6 min read

A packaging data reporter on AWS for a few dollars a month

A wholesaler with 3,140 lines filed its packaging data the way most businesses do: one person, one spreadsheet, six weeks, and a set of assumptions nobody wrote down. The following year somebody asked why bulk catering packs were being reported as household packaging. Nobody could answer, because the previous year’s working no longer existed.

a grocery store filled with lots of different types of food
Photo by CHUTTERSNAP on Unsplash

Key takeaways

  • The obligation attaches to an activity, not to whoever printed the box.
  • Weights come from suppliers, scales or samples, and the method is part of the answer.
  • Fees attach to the household portion, so the split is worth more than the total.
  • Seven years of working has to survive, not just the numbers filed.
  • Designed on AWS for about $3 a month.

The whole system on one page

Before any code, here is the shape of what we are designing.

System: product lines, volumes and the rules joined into a packaging submissionThree boxes across the top sit outside the AWS account. On the left, Product lines: what you sell and how it is packed. In the middle, Sales volumes: units shipped and to whom. On the right, The rules: thresholds, materials and fee bands. Each connects by an arrow to the AWS account container below, labelled as the range changes, monthly, and when they change. Inside the AWS account are three components in a row. Obligation: which items are yours to report. Weight and material: per unit, with the method attached. And Split and submit: household or not, and the evidence. A note says the middle column is the whole job, because the sales data already exists and the rules are published, and what is missing is a per-item weight nobody has ever recorded.AWS ACCOUNTProduct lineswhat you sell, andhow it is packedSales volumesunits shipped, andto whomThe rulesthresholds, materials,fee bandsObligationwhich items areyours to reportWeight and materialper unit, with themethod attachedSplit and submithousehold or not,and the evidenceas the rangechangesmonthlywhen they changeThe middle column is the whole job. The sales data already exists and the rules are published; what is missing is a per-item weight nobody has ever recorded.
Fig 1. Three things outside the account, three pieces inside it. The second box is where six weeks of somebody’s year currently goes.
  • Machine learning
  • Security & identity
  • Analytics

Why this is hard for a business that is otherwise well run

Because the data it needs has never been anybody’s job. A wholesaler knows precisely how many units of each line it shipped, to whom, at what price, in what month. It has no idea what the outer case weighs empty, because there has never been a reason to know and the supplier who makes the case has never been asked.

So the first submission is done by a person with a set of kitchen scales and a spreadsheet, working through the biggest lines and estimating the rest, and it takes six weeks. The second one is done the same way by somebody else, because the first person left and the working was in a tab called final v4 that nobody can now interpret.

What runs (the inside)

  • Obligation. Which packaging is legally yours to report, decided per item against a defined set of activities. Part 2.
  • Weights. A per-unit weight for every component of every line, and the method that produced it. Part 3.
  • The split. Household or non-household, decided on who actually bought it rather than on what it looks like. Part 4.
  • The submission. The file that goes off, and the seven years of working that has to survive behind it. Part 5.

One wholesaler, one reporting year

One wholesaler's reporting year from product lines to tonnes misclassifiedA horizontal row of five boxes joined by arrows. Three thousand one hundred and forty product lines, each with its own packaging. One thousand eight hundred and eighty tonnes placed on the market in one year. One thousand two hundred and forty tonnes classified as household, the only tonnes that carry a fee. Six hundred and forty tonnes non-household, reported and charged nothing. And three hundred and ten tonnes on the wrong side of the line, worth about eighty-six thousand eight hundred pounds overpaid. A note says the last box is not a penalty and not an underpayment, but a fee paid on packaging that never went anywhere near a household bin.ONE WHOLESALER, ONE REPORTING YEAR3,140 lineseach with its ownpackaging1,880 tonnesplaced on the marketin one year1,240 householdthe only tonnes thatcarry a fee640 non-householdreported, andcharged nothing310 on the wrong sideabout GBP 86,800overpaidThe last box is not a penalty and not an underpayment. It is a fee paid on packaging that never went anywhere near a household bin.
Fig 2. The same year as one line. The first two boxes are what everybody measures; the third and fourth are where the money is decided.

In plain words

Product lines arrive from wherever the range is managed, and each one is broken into packaging components: the primary pack the product sits in, the outer case, the pallet wrap, the label, the tray. Each component has a material and a weight, and getting those two fields for a few thousand lines is the bulk of the work in this whole domain.

Before any of that matters, the system asks whether the item is yours to report at all. That is a question about activities rather than about ownership of the physical cardboard, and part two is entirely about it, because both wrong answers are expensive: reporting somebody else’s packaging costs fees you do not owe, and not reporting your own is a compliance failure.

Sales volumes come in monthly and multiply up. Units shipped times per-unit weight, summed by material, gives tonnage placed on the market, which is the headline number and the easy part. It is the easy part precisely because all the difficulty was moved upstream into establishing the per-unit weight once.

Then each tonne is assigned to household or non-household, which decides whether it carries a disposal fee. This is decided on evidence about who bought it, held per line, because the same case of the same product is household packaging when a supermarket sells it and non-household when a catering wholesaler does.

Design rules that shaped every decision

  • Every weight carries the method that produced it, and its date.
  • An estimate is a first-class value, not a missing value with a guess in it.
  • The obligation is decided per item and records which activity triggered it.
  • The household split is evidence, not a property of the product.
  • A submitted figure is frozen. Later corrections are new versions, never edits.
  • Everything is retained for seven years, including the working, not just the totals.

What it does not do

It does not file the return. The submission route has its own portal and its own format and both change; this system produces the dataset that goes into it and the record of how every line was derived. That division has held up well in the other compliance systems in this series and it holds up here.

It does not tell you whether you are obligated in the first place either. That is a question about your turnover, your group structure and your tonnage, and the answer changes the whole shape of what you have to do. The system computes both test figures and shows you where you sit; a person decides what that means.

And it does not chase your suppliers, though it produces the list of who to chase and what each missing specification is worth in tonnage. That list turns out to be the most useful thing it makes in the first year, because the difference between a supplier-provided weight and a sampled one is the difference between a line an auditor skips and a line an auditor asks about.

The next four posts walk through each piece: whose packaging it is, how to weigh what you cannot weigh, how the household split is decided, and what the submission and the audit behind it have to contain. One diagram per post, a cost breakdown, and an engineering reference at the end.

All posts