Use caseWorkflow automationReporting and analytics
3PL invoices built from warehouse events instead of month-end spreadsheets
Rate cards as versioned data, billable events computed from your WMS, and invoice drafts that explain every line, so storage and services stop leaking.
A blueprint, not a client story. The business described is illustrative; the architecture, integrations and trade-offs are real, and this is how I would build it. By Ergini, .
The short version
A billing engine for third-party logistics providers that today bill storage, pick and pack, value-added services and special handling from spreadsheets. Each client's rate card becomes versioned data, extracted from the contract once and confirmed by a person. Plain code computes billable events from the WMS, drafts invoices in Xero or QuickBooks with an explanation per line, and flags anomalies against each client's history. Finance approves every invoice, and the model drafts answers to clients' line questions.
- Best for
- 3PLs with dozens of e-commerce clients on bespoke rate cards, where month-end billing means days of WMS exports and workbooks.
- Connects to
- The WMS (Extensiv, ShipHero, Logiwa or similar), Excel or Google Sheets, Xero, QuickBooks Online, Client-facing breakdown, Contracts and rate sheets
- The AI does
- Extracts rate cards from contracts once, spots billable work mentioned in warehouse notes, and drafts explanations when a client questions a line.
- People do
- Confirm every rate card, approve each invoice, decide whether noted extra work is chargeable, and own the client conversation.
- Built as
- AI Workflow Automation, usually $15K - $30K
Forty clients, forty rate cards, one person who understands the workbooks
A 3PL with 40 e-commerce clients makes a useful example. Each client signed a different rate card: storage per pallet per week for one, per bin per month for another, pick fees per order plus per additional unit, receiving per pallet or per hour for loose containers, packaging at cost plus a margin, kitting, relabeling and inserts as value-added services, returns processing, and a monthly minimum for the smaller accounts.
At month end someone exports receipts, storage counts, orders and returns from the WMS, pastes them into a workbook per client and applies the rate card by formula. It takes days, it depends on the one person who understands the workbooks, and it leaks. The relabeling job agreed by email never became a billable task. The rate increase from the 14th was applied to the whole month, or not at all. A client's storage jumped because the count was taken the day a container arrived.
Leaks cost margin; errors cost trust. When a client questions a line, answering means rebuilding the calculation, and a disputed invoice gets paid late, which is where billing meets collections follow-up.
The build moves billing from the spreadsheet to the events. The WMS already records nearly everything that should be billed, the rate cards become data, and plain code multiplies one by the other. The model's jobs are narrower than people expect, and the flow below marks each one.
From WMS events to an invoice a client can check
The arithmetic is plain code, because it must give the same answer every time it runs. The model reads contracts once, reads free-text notes for missed work, and drafts explanations.
01 Trigger · WMS API or scheduled export
The billing period closes
At period end, and at each storage count, the engine pulls events from the WMS: receipts, putaways, storage counts, orders picked and packed, returns and value-added service tasks.
02 AI model · Structured output
Turn the contract into a rate card, once
When a client is onboarded or a contract changes, the model extracts rates, units, minimums, effective dates and special terms into a structured rate card, held to a strict schema with structured outputs. A person confirms every line before it is used.
03 Plain code
Compute billable events
Each event gets a charge type and quantity by rule: pallets from the storage counts, orders and extra units from shipments, pallets or hours from receipts. Every event keeps its WMS ID, so any line can be traced back to what happened on the floor.
04 AI model
Look for work done but never logged
The model reads the period's task notes, tickets and client emails for work that sounds billable (relabeling, extra packing, a rush order) but has no billable task in the WMS, and lists each candidate with its source text.
05 Plain code
Price with the right rate card version
Each event is priced with the rate card version in force on its date, so a mid-month increase applies from its effective date. Minimums are applied last, as a visible top-up line.
06 Decision
Does this invoice look like this client?
Thresholds are statistics per client and charge type, computed in code from the client's own history.
- Every line within the client's normal range then the draft goes to finance for approval
- A line far from the pattern, such as storage doubling or picks falling while orders do not then flagged with the likely cause for finance to check first
- Candidate unbilled work from the notes then listed for the account manager to confirm or dismiss
07 Person
Finance approves, the account manager confirms extras
Finance reviews the flags and approves each draft. Nothing is billed from a note until a person confirms the work happened and was chargeable under the contract.
08 Result · Xero API, QuickBooks Online API
Invoice, breakdown and explanations
The invoice goes to Xero or QuickBooks as a draft with one line per charge type, and the client's breakdown lists every order, SKU and pallet behind each line. When a client questions a line, the model drafts the answer from the events and the account manager sends it.
A rate card as data, not as a PDF
An excerpt from one client's structured rate card, as the engine uses it. Every row has a version and an effective date, and nothing is priced from the PDF directly.
| Charge | Unit and basis | Rate | Valid from | Notes |
|---|---|---|---|---|
| Storage, standard pallet | Per pallet per week, from the Monday count | EUR 4.20 | 1 Jan 2026 | Count taken from the WMS at 06:00 |
| Storage, standard pallet | Same basis | EUR 4.60 | 14 Sep 2026 | Increase agreed by email on 28 Aug, confirmed by the account manager |
| Pick and pack, first unit | Per order shipped | EUR 1.35 | 1 Jan 2026 | A kit counts as one unit |
| Additional unit | Per unit after the first, per order | EUR 0.30 | 1 Jan 2026 | Inserts and flyers free |
| Receiving, loose container | Per hour of unloading | EUR 48.00 | 1 Jan 2026 | Palletized receipts are billed per pallet instead |
| Returns processing | Per return received and inspected | EUR 2.10 | 1 Jan 2026 | Restocking included, disposal billed separately |
| Monthly minimum | Fulfillment and storage combined | EUR 750.00 | 1 Jan 2026 | Top-up line when the month's total is lower |
A client asks why storage went up
The question that used to cost an afternoon of rebuilding a workbook. The answer comes from the events that produced the line.
Client portal, 6 October
Client · Portal
September storage is EUR 1,690.80 against EUR 1,470.00 in August. We didn't expect a change. What happened?
- explain_line(client: "C-031", invoice: "2026-09", charge: "storage_pallet")4 weekly counts / 7 Sep: 74 pallets at EUR 4.20 / 14 Sep: 78 at EUR 4.60 / 21 Sep: 113 at EUR 4.60 / 28 Sep: 109 at EUR 4.60
- get_events(client: "C-031", type: "receipt", period: "2026-09")container received 18 Sep / 35 pallets put away 18-19 Sep / ASN 88412
- get_rate_history(client: "C-031", charge: "storage_pallet")EUR 4.20 until 13 Sep / EUR 4.60 from 14 Sep / confirmed 28 Aug by the account manager, source: email of 28 Aug
- get_line_history(client: "C-031", charge: "storage_pallet", period: "2026-08")5 weekly counts / 350 pallet-weeks at EUR 4.20
Billing assistant, draft for the account manager · Portal
Two things changed in September. The new storage rate of EUR 4.60 per pallet per week applies from 14 September, as agreed on 28 August, so only the count of 7 September is at EUR 4.20. And the container received on 18 September added 35 pallets, so the counts on 21 and 28 September were 113 and 109 pallets, against 74 and 78 before it arrived. August had five weekly counts and September four, which is why the monthly totals are closer than the pallet numbers suggest. The attached breakdown lists every count with its pallet IDs.
- The account manager read the draft, attached the breakdown and sent it. The model calculated nothing; it arranged figures the engine had already produced.
Month-end in the workbook, and month-end on events
Billing from spreadsheets
- WMS exports pasted into a workbook per client, with last month's formulas copied forward
- Rate changes applied to the whole month, or forgotten
- Work agreed by email billed only if someone remembers it
- A questioned line means rebuilding the calculation by hand
- Billing takes days and depends on one person
Billing from events
- Charges computed from WMS events with their IDs, and re-runnable at any time
- Each event priced with the rate card version in force on its date
- Notes and emails scanned for billable work, confirmed by the account manager
- A questioned line answered from the events behind it, with a breakdown attached
- Finance reviews flags and approves; the engine does the arithmetic
What makes 3PL billing hard to get right
The formulas are simple. These are the parts that decide whether the numbers can be trusted.
Re-running must never double bill
A run for a period can be repeated at any time and must give the same result. Each event is billed once and recorded against the invoice line it produced, so a re-run after a correction yields an adjustment line or a credit note, never a second invoice. Drafts in Xero or QuickBooks carry a reference built from client, period and version, checked before anything is created.
Storage bases that differ by client
Per pallet per week from a Monday count, per pallet per day, per bin per month, per cubic meter. Each basis is a rule chosen in the rate card, so a count taken on a heavy receiving day is a known effect rather than a surprise on the invoice.
Rate changes mid-month
Handled with effective dates, never by editing the rate card. The old version stays for events before the change, which is also what makes last quarter's invoices reproducible when a client asks about them.
Minimums
Monthly minimums are applied after everything else, as a visible top-up line, and exactly once per period even when the run is repeated.
Returns without a disposition
A return can mean inspection, restocking, relabeling or disposal, each with its own rate, and the WMS often records only that the return arrived. The engine bills what the events show and lists returns without a disposition for the warehouse to complete.
Carrier costs passed through
Labels bought on the 3PL's carrier accounts and rebilled with a margin need reconciling against the carrier's own invoice, which adds surcharges and weight corrections weeks later. That reconciliation can run in the same engine as its own charge type.
Running it alongside the spreadsheet first
A billing engine earns trust by agreeing with the old process, or by showing exactly why it does not. The same move away from workbooks is described in spreadsheet to internal tool.
- Build rate cards for five clients with different contract shapes, and have the account managers confirm them.
- Run the engine over the last three closed months and compare every line with what was actually invoiced.
- Classify each difference: an engine error, a spreadsheet error, or work that was never billed.
- Fix the engine's errors, and take spreadsheet errors and unbilled work to finance, which decides what, if anything, to raise with clients.
- Bill the five clients from the engine for one live month, with the spreadsheet as a check.
- Move the remaining clients over in groups, and retire the workbooks.
The back-test is the most useful week of the project, because it shows what the spreadsheets missed before anything changes for clients. What to do about past months is a commercial decision, not a technical one.
Your WMS's billing module, or a custom engine?
Check your WMS first. Extensiv 3PL Warehouse Manager, ShipHero and Logiwa all include billing for storage, handling and value-added services, and dedicated 3PL billing add-ons exist for the major WMSs. If your rate cards fit their templates and you run one WMS, configure that and do not build anything; it is cheaper, and the vendor maintains it.
A custom engine earns its cost when the rate cards are bespoke enough that the module needs workarounds (tiered storage, blended minimums, client-specific receiving terms), when events come from more than one WMS or site, when billable work is recorded outside the WMS in tickets and emails, or when you want every line explained to clients rather than a total they have to trust.
The hybrid is often right: the WMS module keeps the standard charges, and the build adds what it cannot do, such as rate card versioning, the unbilled-work scan, anomaly flags and client explanations. If you are weighing n8n or Make for that layer against code, integration layer or automation platform sets out how I decide.
How you would know it is working
A blueprint has no results to report, so here is what I would measure from the first week instead, on your own data.
- Engine against invoiced, per line
- During the parallel run, every difference between the engine and the spreadsheet, classified by cause.
- Unbilled work found and confirmed
- Candidates from notes and emails that the account manager confirmed as chargeable, by client and month.
- Billing cycle time
- From period close to approved invoices, measured each month against the old spreadsheet process.
- Questioned lines and time to answer
- How many lines clients question, and how long an answer takes with the breakdown in hand.
- Re-run consistency
- A repeat run of a closed period must produce exactly the same invoice. Any difference is a defect.
What a build like this costs
This is built as AI Workflow Automation, which runs $3.5K - $60K overall. A build like this one usually lands in the multi-step workflow tier: $15K - $30K, 3-5 weeks. The first working version runs on your real data well before the end of that window.
What it costs to run
Nearly all of the work is ordinary computation on your own servers or cloud account. The model is used once per contract for rate card extraction, then for scanning notes and drafting explanations, which typically comes to a few dollars per client per month or less.
What moves the price
- How many WMSs or sites the events come from, and how complete their APIs or exports are
- How varied the rate cards are: a few templates, or forty bespoke contracts
- Whether billable work is also recorded outside the WMS, in tickets, emails or paper sheets
- Whether carrier label costs are rebilled and must be reconciled against carrier invoices
- The client-facing side: a PDF breakdown, or a portal where clients drill into their charges
Who this is for
- 3PLs with dozens of e-commerce clients on bespoke rate cards and a billing workbook only one person understands
- Fulfillment providers running more than one WMS, or several warehouses on different systems
- Warehouses where value-added work is agreed by email or ticket and billed only when someone remembers
- 3PLs whose clients question storage and handling lines every month
Questions people ask about this
How do I automate 3PL billing?
Treat billing as a calculation over warehouse events rather than a monthly spreadsheet. Put each client's rate card into structured, versioned data, pull receipts, storage counts, picks, packs, returns and service tasks from the WMS, and price each event with plain code. Then review the drafts and flagged anomalies, and send the invoices from Xero or QuickBooks with a breakdown per line.
Can AI read our client contracts and rate sheets?
Yes, once per contract. A model extracts rates, units, minimums, effective dates and special terms into a structured rate card, and an account manager confirms every line before it is used. After that the model plays no part in pricing, because a confirmed rate card and plain code are more reliable than rereading the contract every month.
Why do 3PLs lose revenue in billing?
Mostly through work that was done but never recorded as billable: relabeling agreed by email, extra packaging, rush handling, returns without a disposition. Rate changes applied late, storage counts taken on unusual days and forgotten minimums add to it. An event-based engine bills what the WMS shows, and a scan of notes and tickets lists the rest for a person to confirm.
Does it work with Extensiv, ShipHero or Logiwa?
Yes. The engine reads events through the WMS's API or its scheduled exports, so the WMS stays the source of truth. If your WMS's own billing module already fits your rate cards, use that instead; the custom engine is for the contracts and cases the module cannot handle.
How do you avoid double billing when a run is repeated?
Every billed event is recorded against the invoice line it produced, so re-running a period gives the same result instead of new charges. Corrections become an adjustment line or a credit note, and each draft invoice carries a reference built from client, period and version, which is checked before anything is created in the accounting system.
What does a custom 3PL billing engine cost?
See the range in the cost section; most of the effort goes into modelling your rate cards, not into AI. The drivers are the number of WMSs and sites, how bespoke the rate cards are, and whether carrier costs and a client portal are in scope. Running costs are small, because nearly all of the work is plain computation rather than model calls.