Workflow automation · eSIM.net

The invoice
that checks itself

Carriers bill us per line, per month. We hold the truth about when every line was live and on what tariff. Comparing the two is where the money is.

carrier invoice our own record line by line
The problem

Carriers bill thousands of lines. Some of them wrongly.

A line ceased on the 4th but billed for the whole month. A tariff changed but the old rate charged. A number already returned to stock still on rental. Each error is small; together they are not.

Nobody can check by hand

Thousands of lines across four billing accounts, every month, in spreadsheets.

So it gets paid

An unchecked invoice is an invoice agreed. The money leaves and the claim window closes.

The fix: compare everything

We already know the exact life of every line. Compare it to the bill, line by line, automatically.

Automated invoice reconciliation2 / 8
Step 1 · The foundation

Two versions of the truth, in one place

Reconciliation is only possible because both sides are loaded into the same warehouse and expressed the same way.

Their side

Monthly billing reports and rental files, arriving by email per account — O2, Three, Vodafone domestic, Vodafone travel.

Our side

Every line's on-hire and off-hire dates, the tariff it ran on, and how many days of the period it was actually active.

The comparison

One row per line per invoice date, holding both views side by side so a difference is a value, not an opinion.

The commercial terms

Rate cards, commercial packs and the annual rate increase are loaded too, so the expected price is known, not assumed.

A detail that pays for itself: when a line is ceased, the tariff it was on is captured onto the cease record at that moment. Without it, a line that has already gone has no rate to check the final invoice against.

Automated invoice reconciliation3 / 8
Step 2 · The automated process

From a billing email to money back

1
Report arrivesCarrier emails the billing file
›
2
Read & loadedSpreadsheet into the warehouse
›
3
Our line historyDays live, tariff, on/off hire
›
4
ComparedLine by line, invoice by invoice
›
5
Difference foundRecorded with the reason
›
6
Dispute raisedAmount, invoice and note
›
7
Credit receivedMatched, then closed

Get the data in

Steps 1–2: the attachment is fetched and read without anyone opening a spreadsheet.

Do the comparison

Steps 3–4: our record of each line is rebuilt for the billing period and set against the charge.

Chase the money

Steps 5–7: a dispute is a tracked object, open until the credit note is actually in.

Automated invoice reconciliation4 / 8
Step 3 · The dispute record

A claim is not closed until the credit arrives

What each dispute carries

RaisedThen
Amount claimedCredit document number
Invoice it relates toCredit reference
Account, month and yearDate credited
Who raised itAmount before our discount
Why — the full noteAmount actually credited

Status is only two values. Open means claimed but not yet paid. Closed means the credit has been received and confirmed — never just “they said they would”.

107 closed

£27,106

recovered against £42,912 claimed — about 63 pence in the pound, argued and settled.

8 open

£17,235

still being argued. Nothing drops off a list because it got old.

The recovery rate is the honest number. Not every claim is agreed, and tracking what was refused is how the next month's claims get better.

Automated invoice reconciliation5 / 8
Step 4 · The other direction

The same check, pointed at our own invoices

Reconciliation is not only about what we are charged. The same approach confirms that what we charged the customer matches the product, the tariff and the cost behind it.

Invoice vs product

What the customer was billed, set against the product and tariff actually on the order.

Cost after discount

The supplier cost for that line, after the commercial discount we actually receive.

Margin check

The difference, per invoice — so a plan quietly selling below cost is visible as a number.

Currency handled

Values converted to a common currency so months and markets can be compared at all.

Why this belongs in the same system: a mis-billed supplier line and an under-priced product look identical on a profit report. Only a line-level comparison tells you which one you are looking at.

Automated invoice reconciliation6 / 8
Step 5 · Where AI does the work

It reads the spreadsheet so nobody has to

Fetch and read

getemailattachments and getexcelfromemailattachement pull the billing file straight out of the mailbox and read it.

›

Ask the hard question

runsql answers “which lines were billed for days they were not live?” against both sides at once — the query a person would take a day to write.

›

Report it

postmessageonteams puts the month's exceptions in front of the people who will argue them, with the numbers attached.

The human part stays human. The system finds and quantifies the discrepancy. Raising the dispute, negotiating it and confirming the credit is a person's job — and the record shows exactly whose.

Automated invoice reconciliation7 / 8
Tools & safeguards

The AI tools used, and the guards around them

OpenAI

Reads billing attachments, drafts the exception summary.

MCP tool server

Mailbox, spreadsheet and database access, all audited.

Data warehouse

Carrier billing, rentals, rate cards and our line history together.

Scheduled jobs

Reconciliation downloads and alignment runs on a cycle.

What stops mistakes

● Read-only analysis — the comparison never edits either side's data

● Every claim is evidenced — amount, invoice, period and written reason

● Closed means paid — a promise is not a credit

● Named owner — each dispute records the person who raised it

● Nothing expires quietly — open claims stay open and visible

Automated invoice reconciliation8 / 8