Bills or invoices, settlements and customers from the ERP or billing
Days overdue on the reference date, open items only
Overdue balance by bucket and customer, and collection queue
Collection workflow, CRM and AI agent
What it solves
- The overdue balance in the report matches accounts receivable in the ERP or billing system.
- Each customer appears once, with the real debt, without repeated attempts or doubled renegotiations.
- The collections team gets the day's queue in priority order.
Business questions it answers
Ask your agent these questions once the case is live.
What you need
- ERP or billing connected to Nekt, with bills or invoices, settlements, customers and each bill's issue, due, payment and cancellation dates
- The company's collection policy: buckets, deadlines and what to do in each
- The collections CRM connected, if the team works there
What you get
- A daily snapshot per bill with days overdue, bucket and open balance
- Overdue balance by customer, bucket and month, with the delinquency rate
- A prioritized collection queue sent to the CRM or the team's channel
- An AI agent that answers about overdue payments with the right rule
Where to activate
The day's queue, by bucket and priority, sent to the CRM, WhatsApp or the team's channel.
Answers who owes, how much and for how long, using the snapshot on the reference date.
Notice when a large customer falls overdue or when the delinquency rate crosses the limit.
The overdue rule is simple. The work is handling renegotiation, partial payment and payment attempts in each source, and storing the daily snapshot starting now. The detailed view has the business rules, the pitfalls and the acceptance test. Or send everything straight to your agent with the Nekt MCP.
Billing shows each charge's current status, the ERP shows bills with a text status and the collections CRM shows only what someone copied there. Summing everything marked as late counts a declined card attempt as debt, keeps a renegotiation's old bill next to the new installments and mixes those who paid late with those who still owe. The number changes depending on when you look, and nobody can rebuild last month's delinquency.
How it is usually done, and the rule
Each row is a mistake that already happened in practice.
A bill is delinquent on the reference date when its actual due date (with extensions applied) is before that date and it has not been paid. Not yet due and due today do not count. Cancelled is always out. A partial payment leaves only the remaining balance delinquent. In billing systems with automatic card charging, the invoice often has no due date: the actual due date is the date the invoice was finalized, when the first charge is attempted (in Stripe, `due_date` is null for `charge_automatically`; use `status_transitions.finalized_at`).
Official delinquency is a one-day picture: who owes on that date, how much and for how long. Having been late at some point in the month is a different metric, for history only. Store the daily or monthly snapshot in append mode so a past month's delinquency can be rebuilt exactly. Until a snapshot is stored, a past date can be rebuilt from each bill's status transition dates (issued, paid, cancelled, written off), never from the current status. In Stripe, these dates live in `status_transitions`.
Aging buckets cover only bills without a settlement. A paid bill leaves aging, even if it was overdue for months, and moves to the punctuality metric: days between due date and payment. Buckets are contiguous and start at 1 day, so the sum of the buckets equals the overdue balance.
Each bill's balance is the bill amount minus recorded settlements. Before trusting the ERP's ready-made balance field, test it: in real cases it came empty or zero on most installments. Interest and late fees received are kept apart from principal. In billing systems the ready-made remaining amount also misleads: in Stripe, `amount_remaining` stays filled on voided (`void`) and draft (`draft`) invoices and on invoices paid outside Stripe (`paid_out_of_band`, with no `amount_paid`). Treat any bill with a payment date on or before the reference date as settled, and drop drafts and voided ones. Sum balances per currency, never different currencies together.
When debt is rescheduled, the old bill is replaced by the new installments. A bill with renegotiated status (which some ERPs zero out) leaves, and only the new installments count. If the ERP keeps the old one as late, flag it by the renegotiation and take it out of the sum. In billing systems, renegotiating usually means voiding the invoice and issuing a new one (in Stripe, `void` plus a new invoice): the voided one leaves from its void date, and snapshots of earlier dates do not change.
In billing systems, each declined card attempt becomes a row, and the same invoice can have several. The grain for delinquency is the invoice or bill, never the attempt. While an invoice is being retried and is past due, it shows in the snapshot in the first bucket, like any open bill; once paid, it leaves. Do not create an exception for invoices in retry. Recovery within the billing cycle is measured separately, in the recovery rate.
Group by normalized and validated CPF (individual tax ID) or CNPJ (company tax ID), 11 or 14 digits, not by name. A tax ID of the wrong length is treated as missing, so debt does not stick to the wrong customer. The payer can differ from the account holder (a parent paying for a student, a head office paying for a branch): link the bill to the contract by id, and use the payer's tax ID for collection.
When bills are copied into a collections CRM, the CRM has sync lag and a cutoff date: anything older than the integration is not there. Use the CRM to know which collection stage a customer is in, and the ERP or billing to know how much they owe.
Loans between partners, balances between group companies, companion bills for card prepayments and test charges are not delinquency. An old pending charge with no operational trace (no link, boleto, Pix QR Code or invoice) is not real debt either.
Aging buckets and what to do
Example of a policy with contiguous buckets. The company sets the cutoffs and actions.
Definitions
Pitfalls that already happened
Leadership asked how much each customer owed and the answer came from the CRM mirror, which only had bills created after the integration started. Total debt looked much smaller.
Amounts always from the ERP; the CRM only for the collection stage.
In the ERP, the current balance field on installments came empty or zero on almost every bill, and delinquency computed from it was close to nothing. In billing the error went the other way: the remaining amount stayed filled on voided, draft and out-of-band paid invoices, and the direct sum came out several times larger than the real overdue balance.
Compute the balance from the bill amount and settlements, settle by payment date, drop voided and draft invoices, and test the ready-made field first.
The write-off amount came as an object with date and value, not as a number. Summed directly, total write-offs came out as zero, and zero looked like a result.
Read the value field inside the object and distrust a total that is exactly zero.
Bills migrated from an old system stayed open there and were settled in the new system, and the same charge appeared twice.
Flag migrated bills and use only the system where settlement happens.
The billing system kept old pending charges that never had a boleto, link or Pix issued, and they inflated the overdue balance.
Exclude pending charges with no operational trace.
Hundreds of records had a CNPJ field of the wrong length and started matching other customers.
Normalize, validate 11 or 14 digits and treat the rest as missing.
Acceptance test
The case is done when every item passes.
- For a reference date, the sum of the buckets equals the total overdue balance and no overdue bill is left without a bucket.
- The overdue balance per customer matches the open and overdue invoices report of the ERP or billing system itself on the same date (difference below 0.5%), not another transformation built on the same table.
- No paid, cancelled, replaced renegotiated, not yet due or due-today bill appears as delinquent.
- Each invoice appears once in the overdue portfolio, whatever the number of payment attempts.
- Rebuilding the snapshot for a past reference date returns exactly the same overdue balance.
Agent package
Paste into Claude, ChatGPT or any client with the Nekt MCP connected.
Overdue payment monitoring - Delinquent = bill with an actual due date before the reference date and an open balance above zero. Not yet due and due today do not count. Cancelled is out. - Actual due date = due date; if an automatically charged invoice has no due date, its finalization date (Stripe: status_transitions.finalized_at). - The main definition is the snapshot on the reference date. Late at some point in the month is a historical metric and must be labeled as such. - Aging covers open bills only. Paid bills go to punctuality (days between due date and payment). - Buckets: <1 to 5, 6 to 30, 31 to 60, 61 to 90, over 90>. The sum of the buckets equals the overdue balance. - Open balance = bill amount - settlements, zero if paid by the date. Interest and late fees are kept apart. Do not use the ready-made balance (Stripe: amount_remaining stays filled on void, draft and paid_out_of_band). Never add different currencies. - Renegotiation: the replaced or voided bill leaves from its void date; only the agreement's installments count. Earlier snapshots do not change. - A written-off bill leaves the portfolio on the write-off date and goes to the write-off metric. - The grain is the invoice or bill. Declined payment attempts are not delinquency cases; a failure paid within one cycle is a recovery. - Debtor = validated CPF or CNPJ. Never group by name. - How much a customer owes comes from the ERP or billing. The collection stage comes from the collections CRM. - Out of the portfolio: partner loans, intercompany, technical card prepayment bills and charges with no operational trace. - Delinquency rate = overdue beyond <cutoff> days / open portfolio, on the same date. Client exceptions: - <client>: bills paid outside billing are settled in <system>; treat them as paid on the date recorded there. - <client>: bills with flag <flag> came from system <old> and are settled in <new>; count them only in <new>. - <client>: customers with a <product> contract are not suspended before <n> days overdue.
Build the "Overdue payment monitoring" case in my Nekt workspace following the rules at https://academy.nekt.com/en/casos/inadimplencia.md. 1) Find the source tables and confirm the columns the rules use. 2) Create a transformation at the stated grain applying every rule. 3) Run the acceptance test and show me the result of each item. 4) Create the case's context document in the workspace, leaving my clients' exceptions open for me to fill in.
Variations
Grain per recurring invoice, with recovery rate per cycle and a list of cards to update before the due date.
Installments adjusted by an index, delinquency by development or vintage and priority by number of overdue installments.
A percentage per bucket over the overdue balance, with the debtor's longest delay applying to all their bills.