Skip to content

Part 2 of 7 · Utility bill watcher series ~6 min read

How a utility bill gets read

A utility bill is one of the least standardised documents in ordinary business life. Two suppliers of the same commodity will put the usage in different units, the rate on a different page, and the standing charge inside a table that is only a table visually. This post is about pulling four reliable values out of that, and about being honest when it cannot.

Key takeaways

  • Two lanes: a supplier email with a PDF attached, and a folder for portal downloads.
  • Textract does the layout; the model does the interpretation; neither picks the meter.
  • The meter number is matched against your list, never trusted from the page alone.
  • A number the reader is not confident about stays null and produces a question.
  • Units are normalised on the way in, because kWh, therms and cubic metres all show up.

Two lanes in

Three bill lanes converging on one bill recordThree boxes stacked on the left. Supplier email, with a PDF attached. Portal download, dropped into a folder. And Photo of a paper bill, for the last few suppliers who still post. Their arrows are labelled attach, file and image, converging on One bill record holding the meter, the period, the usage, the unit rate and the standing charge. Below it, connected by a downward arrow, is the Comparer, which checks against history and the contract. A note says every lane ends in the same five fields, or in a question about the one that is missing.Supplier emailPDF attachedattachPortal downloaddropped in a folderfilePhoto of a paper billthe last few suppliersimageOne bill recordmeter, period, usage,rate, standingComparerhistory and contractEvery lane ends in the same five fields, or in a question about the one that is missing.
Fig 1. Three ways a bill turns up and one record shape. The photo lane exists because a small number of suppliers still post paper, and excluding them would leave a permanent hole in the history.
  • Storage
  • Database
  • App integration
  • Analytics
  • Front-end & mobile

What comes out of the page

meter          1200034557        matched to your list, not trusted from the page
period_start   2026-06-11
period_end     2026-07-10
usage          4180.0            normalised to the meter’s own unit
unit           kWh               from the meter list, not the bill
unit_rate      0.241             per unit, excluding tax
standing       0.48              per day, excluding tax
estimated      false             read off the bill’s own wording
total          1128.44           used as a checksum, never as an input

The total is a checksum, not an input

Every bill states its own total, and that total should equal usage times rate plus standing charge times days, plus tax. Recomputing it from the extracted numbers and comparing is the cheapest possible check on the whole extraction. If they agree to within a penny or two, all four numbers are almost certainly right. If they do not, something was misread, and the system knows that before it produces a comparison.

This is the same trick as the count sheet’s written total in the cash reconciler, and it works for the same reason: the document contains a redundant derived value that a human already relies on. Using it costs nothing and removes almost every category of silent extraction error.

The read, step by step

How a utility bill PDF becomes five clean fieldsA vertical chain of six steps inside the AWS account, entered by a box labelled Bill lands, from any of three lanes. Step one stores the original in S3 for the record. Step two asks whether this bill has been seen, fingerprinting supplier, meter and period and writing conditionally to a DynamoDB bills table; a duplicate exits to Same bill, which files the copy and stops. Step three pulls the layout with Amazon Textract forms and tables. Step four reads the five fields with a single Bedrock call, grounded by the meter list so meters and units come from a known set. Step five checks whether the bill's own stated total reconciles with usage times rate plus standing charge, exiting to Ask a human with the page attached if it does not. Step six hands five clean fields to the comparer. A note says the duplicate test runs before Textract because suppliers resend bills constantly.AWS ACCOUNTBill landsany of three lanesStore the originalS3, kept for the recordSeen this bill?supplier + meter + periodDynamoDB billsconditional writeSame billfile the copy, stopduplicatePull the layoutTextract forms + tablesRead the five fieldsone Bedrock callMeter listmeters and unitsTotal reconciles?usage x rate + standingAsk a humanattach the pagemismatchHand to the comparerfive clean fieldsThe duplicate test is before Textract, because suppliers resend bills constantly.
Fig 2. One bill, end to end. The duplicate test runs before any paid extraction, and the bill’s own stated total is used to check the read before anything is compared.
  • Storage
  • Database
  • App integration
  • Machine learning
  • Security & identity
  • Analytics
  • People

Why suppliers resending matters

Utility suppliers resend bills a lot: a reminder with the original attached, a corrected version, a copy to a second address, a statement that includes last month’s bill as a page. Without a duplicate test in front of the expensive part, a business with a chatty supplier pays to extract the same bill five times and, worse, may write the same usage into history five times.

The fingerprint is supplier, meter and billing period — not the file, because the same bill regenerated as a PDF is byte-different. A second copy of a bill already on record is filed alongside the original and goes no further.

Units, and the small disaster they cause

  • Gas arrives in at least three units. Cubic metres on the meter, kWh on the bill, and therms on some older accounts. A year-on-year comparison that silently mixes them produces a ten-fold change out of nothing.
  • The unit comes from your meter list, not the bill. The bill is read for a number; the meter list says what that number is measured in. If a bill states a unit that disagrees with the list, that is a question, and it is usually a supplier changing how they present the same meter.
  • Water is billed on estimated consumption more often than anything else. The estimated flag matters most here, and missing it makes a whole year of water history meaningless.
  • Rates are stored excluding tax. Bills present rates inclusive and exclusive inconsistently, and comparing an inclusive rate against an exclusive contract produces a false alarm every single month.

Next: how a bill gets matched to the right meter, and what happens when it cannot.

All posts