Someone in a logistics community described a problem that never shows up in software demos. They ship with a mix of carriers, and drivers and 3PL partners send proof of delivery in every form imaginable: photos, scanned paper notes, email confirmations, sometimes just a chat message. Meanwhile they need to match those against purchase orders and bill the customer. Month-end reconciliation is brutal. They keep finding short shipments they forgot to bill, and customers dispute invoices because PODs are missing or inconsistent. And they asked whether anyone does this well without a six-figure transport management system.
You don't need a big platform to fix this. You need to stop treating a POD as a file and start treating it as an event that has to be matched to a delivery. Here's a design I'd use for a small team.
1. Model the delivery, not the document
The core table is the thing you expect to be proven, the delivery line, not the POD:
CREATE TABLE delivery ( id BIGSERIAL PRIMARY KEY, order_ref TEXT NOT NULL, -- PO or sales order shipment_ref TEXT NOT NULL, -- your load / shipment ID carrier TEXT, planned_date DATE, expected_qty NUMERIC NOT NULL, expected_uom TEXT NOT NULL, pod_status TEXT NOT NULL DEFAULT 'awaiting' -- awaiting | received | matched | exception | billed ); PODs are evidence attached to a delivery, and one delivery can collect several pieces of evidence:
CREATE TABLE pod_evidence ( id BIGSERIAL PRIMARY KEY, delivery_id BIGINT REFERENCES delivery(id), -- NULL until matched channel TEXT NOT NULL, -- email | upload | chat | carrier_api received_at TIMESTAMPTZ NOT NULL, file_uri TEXT, sha256 TEXT, -- catch the same photo sent twice extracted_ref TEXT, -- reference found on the document delivered_qty NUMERIC, delivered_at TIMESTAMPTZ, signed_by TEXT, remarks TEXT, -- "2 cartons damaged", "short 1" match_method TEXT, -- exact_ref | fuzzy | manual reviewed_by TEXT ); Keeping delivery_id nullable is deliberate. Evidence lands first, matching happens second, and unmatched evidence becomes a visible queue instead of a forgotten attachment.
2. Funnel every channel into one inbox
You can't make every driver use your app, so meet them where they are and normalize:
- Email: one dedicated address. A worker saves attachments and the message body as evidence rows.
- Upload link: a simple page per shipment, with the shipment reference already filled in. This produces the cleanest matches, so make it the easiest option.
- Chat: if partners insist on sending photos by message, have a person forward them to the upload link or the email inbox the same day. Don't try to reconcile from chat history.
- Carrier tracking: where a carrier offers delivery events or signature data through an API or webhooks, store those as evidence too.
Every row gets a hash of the file, so the same photo forwarded three times doesn't look like three deliveries.
3. Match in passes, from strict to fuzzy
Run the matcher whenever evidence arrives, and again on a schedule:
- Exact reference: the shipment or order reference on the upload link, or found in the document text, equals a delivery's reference.
- Constrained fuzzy: same carrier, delivery date within a day of plan, consignee name similar. Only suggest a match. Don't apply it automatically.
- Manual: everything else goes to a review queue with the most likely candidates.
Store match_method on every match. When a customer disputes an invoice, "matched by exact reference" and "matched manually by Sam" are different conversations.
4. Turn quantities and remarks into exceptions
Matching a POD isn't the end. Compare delivered_qty against expected_qty in the same unit, and treat any remark as a flag until a person reviews it:
def assess(delivery, evidence): if evidence.delivered_qty is None: return "exception:qty_missing" if evidence.delivered_qty < delivery.expected_qty: return "exception:short" if evidence.delivered_qty > delivery.expected_qty: return "exception:over" if evidence.remarks: return "exception:remark_review" return "matched" Short deliveries are where the original poster was losing money: billed in full, then disputed, or never billed for the part that did arrive. An exception status forces a decision before the invoice goes out.
5. Gate billing on POD status
Only deliveries in matched, or exceptions resolved with a reason, should flow to invoicing. Then the month-end problem turns into a daily list:
- Deliveries past planned date still
awaitingevidence: chase today, not in four weeks. - Evidence with no delivery: someone sent a POD you can't place.
- Exceptions older than a set number of days.
Attach the evidence to the invoice, or link to it in the customer portal. Most "missing POD" disputes end when the customer can see the signed document next to the line they're questioning.
Where this fits
Delivery events from carriers can feed the same tables you use for tracking webhooks and customer notifications. If you run your own drivers, capturing signature, photo and quantity at the stop is a core job for courier management software, and it makes step 3 almost always an exact match.
Hasnain Qureshi, Co-Founder and Lead Engineer, BlinkShift