Skip to main content

Extract data from customer statements

At month end a supplier sends each customer a single page that answers one question: what is still owed. A customer statement, or statement of account, rolls the opening balance forward through the period’s charges, payments, and adjustments to a closing balance, and lists the open invoices behind it. It is not an invoice, which bills a single transaction, and it is not an accounts-receivable aging, which the supplier keeps internally across all customers. A customer statement is addressed to one buyer and is the document the buyer’s accounts-payable team reconciles against its own records before paying. The statement has to roll forward cleanly. A June statement from the supplier Evergreen Supplies Ltd to the buyer Coastal Cafés Ltd, account CUST-4821, covering period_start_date 2026-06-01 to period_end_date 2026-06-30 in GBP, might carry an opening_balance of 12,000.00, total_charges of 28,500.00, total_payments of 18,000.00, and total_adjustments of 500.00, giving a closing_balance and amount_due of 22,000.00, due 2026-07-15 on Net 30 terms. The aging summary then splits that 22,000.00 GBP into current, 30 to 60, 60 to 90, and 90-plus buckets so the buyer sees what is overdue. Each open invoice is listed with its invoice date, amount, and outstanding balance so the two sides can match line by line. Matched to the customer-statement schema, the page returns the supplier and buyer, the period, the opening and closing balances, the charges, payments, and adjustments, and the amount due as fields, while the transactions, the aging detail, and the open invoices stay as tables. Within an accounts-payable workflow, a statement whose 22,000.00 GBP closing balance rolls forward from a 12,000.00 GBP opening balance lets a clerk reconcile the balance and the open invoices from structured fields rather than a scanned page.

What gets extracted from customer statements

Statement NumberSTMT-2026-06-4821document_number
Supplier NameEvergreen Supplies Ltd
Buyer NameCoastal Cafés Ltd
Buyer Account NumberCUST-4821
Statement Period2026-06-01 to 2026-06-30
Opening Balance12,000.00 GBP
Total Charges28,500.00 GBP
Total Payments18,000.00 GBP
Closing Balance22,000.00 GBPOpening + charges - payments - adjustments
Amount Due22,000.00 GBP
Due Date2026-07-15

How extraction works for customer statements

Customer statements arrive from every supplier in a different layout, some with a full transaction ledger, some with only open invoices, some with an aging box in the corner. Routed to the customer-statement model in the Field Registry, the statement has the supplier and buyer separated (with the customer account number) from the balance summary, and the transactions, the aging detail, and the open invoices kept as distinct tables. It checks the roll-forward: closing_balance equals opening_balance plus total_charges less total_payments and total_adjustments, and the aging_detail buckets sum to the amount_due, so a 22,000.00 GBP balance that rolls from a 12,000.00 GBP opening balance and splits across four aging buckets is confirmed to reconcile rather than trusted. The document_date, period dates, and due_date parse to ISO 8601, the payment_terms and statement_type are captured, and each open invoice returns with its invoice date and outstanding balance. Sitting with each figure is a confidence score and a source-region pointer under DIN SPEC 91491, so an accounts-payable clerk can match the statement balance to their own ledger before releasing payment.

Sample extraction

A month-end customer statement with transactions and aging

{
  "document_number": "STMT-2026-06-4821",
  "document_date": "2026-06-30",
  "period_start_date": "2026-06-01",
  "period_end_date": "2026-06-30",
  "buyer.name": "Coastal Cafés Ltd",
  "buyer.account_number": "CUST-4821",
  "buyer.address": "18 Marine Parade, Brighton BN2 1TL, United Kingdom",
  "supplier.name": "Evergreen Supplies Ltd",
  "supplier.address": "Unit 7 Trident Park, Bristol BS11 8AZ, United Kingdom",
  "opening_balance": 12000,
  "total_charges": 28500,
  "total_payments": 18000,
  "total_adjustments": 500,
  "closing_balance": 22000,
  "amount_due": 22000,
  "due_date": "2026-07-15",
  "currency": "GBP",
  "payment_terms": "Net 30",
  "statement_type": "regular",
  "note": "12,000.00 opening + 28,500.00 charges - 18,000.00 payments - 500.00 adjustments = 22,000.00 GBP closing",
  "transactions": [
    {
      "transaction_id": "T1",
      "transaction_date": "2026-06-01",
      "transaction_type": "balance_forward",
      "reference_number": "OB",
      "description": "Opening balance",
      "debit_amount": 0,
      "credit_amount": 0,
      "running_balance": 12000
    },
    {
      "transaction_id": "T2",
      "transaction_date": "2026-06-08",
      "transaction_type": "charge",
      "reference_number": "INV-9012",
      "description": "Coffee beans, 200kg",
      "debit_amount": 16500,
      "credit_amount": 0,
      "running_balance": 28500
    },
    {
      "transaction_id": "T3",
      "transaction_date": "2026-06-15",
      "transaction_type": "payment",
      "reference_number": "PMT-5521",
      "description": "Payment received, thank you",
      "debit_amount": 0,
      "credit_amount": 18000,
      "running_balance": 10500
    },
    {
      "transaction_id": "T4",
      "transaction_date": "2026-06-22",
      "transaction_type": "charge",
      "reference_number": "INV-9088",
      "description": "Disposables and packaging",
      "debit_amount": 12000,
      "credit_amount": 0,
      "running_balance": 22500
    },
    {
      "transaction_id": "T5",
      "transaction_date": "2026-06-28",
      "transaction_type": "adjustment",
      "reference_number": "CN-311",
      "description": "Credit note, short delivery",
      "debit_amount": 0,
      "credit_amount": 500,
      "running_balance": 22000
    }
  ],
  "aging_detail": [
    {
      "aging_bucket": "current",
      "days_overdue_min": 0,
      "days_overdue_max": 30,
      "amount": 15000,
      "percentage": 68.2
    },
    {
      "aging_bucket": "30-60",
      "days_overdue_min": 31,
      "days_overdue_max": 60,
      "amount": 4000,
      "percentage": 18.2
    },
    {
      "aging_bucket": "60-90",
      "days_overdue_min": 61,
      "days_overdue_max": 90,
      "amount": 2000,
      "percentage": 9.1
    },
    {
      "aging_bucket": "90+",
      "days_overdue_min": 91,
      "days_overdue_max": 9999,
      "amount": 1000,
      "percentage": 4.5
    }
  ],
  "invoice_lines": [
    {
      "line_number": 1,
      "invoice_number": "INV-9012",
      "invoice_date": "2026-06-08",
      "description": "Coffee beans, 200kg",
      "quantity": 200,
      "unit_price": 82.5,
      "line_amount": 16500,
      "amount_paid": 16500,
      "amount_due": 0
    },
    {
      "line_number": 2,
      "invoice_number": "INV-9088",
      "invoice_date": "2026-06-22",
      "description": "Disposables and packaging",
      "quantity": 1,
      "unit_price": 12000,
      "line_amount": 12000,
      "amount_paid": 2000,
      "amount_due": 10000
    }
  ]
}

Frequently asked

How is a customer statement different from an invoice?

An invoice bills a single transaction. A customer statement summarizes all activity for one customer over a period, rolling an opening balance through charges, payments, and adjustments to a closing balance, and lists the open invoices behind it. Talonic reads each on its own schema.

How is it different from an accounts-receivable aging?

An AR aging is an internal report covering all customers and their overdue buckets. A customer statement is addressed to one buyer and sent to them. Talonic reads a customer statement on its own schema and reports one account’s balance, transactions, and aging.

Does it check that the balance rolls forward correctly?

Yes. The closing_balance is verified to equal opening_balance plus total_charges less total_payments and total_adjustments, and the aging buckets are checked to sum to the amount_due, so a 22,000.00 GBP closing balance is confirmed to reconcile.

Can it match the open invoices line by line?

Yes. The invoice_lines table returns each open invoice with its invoice number, date, amount, amount paid, and outstanding balance, so an accounts-payable team can match the statement against its own records before paying.

Author note

Reviewed by Talonic engineering, finance schema review · last reviewed 2026-07-09