Accounts receivable automation is one of the highest-leverage places to spend engineering time in a finance stack, because every day of delay in collections is cash sitting in a customer's account instead of yours. The patterns below are the ones that consistently move DSO (days sales outstanding) down without turning the finance team into full-time system babysitters: automated invoice delivery, matching, dunning, and cash application.
Invoice generation and delivery
The first automation win is almost never collections — it is getting the invoice out the door faster and in the format the customer's AP system expects. Batch-generate invoices on a schedule tied to your billing cycle, not on-demand per customer, and deliver through the channel the customer actually processes: email PDF for small accounts, a structured feed (EDI 810, cXML, or a vendor portal upload) for larger ones. Every day an invoice sits ungenerated is a day added to the payment clock before it has even started.
Automated matching and cash application
Cash application is the step that eats the most manual hours: matching an incoming payment to the right invoice(s). Remittance-advice parsing (from the check stub, the ACH addenda record, or an emailed remittance) lets you auto-match a large share of payments — vendors report 60-85% straight-through match rates once remittance data is clean. The remainder needs a review queue, not a pile in someone's inbox: surface unmatched cash with the likely invoice candidates ranked by amount and customer, and let a human confirm rather than search from scratch.
Amount-only matching produces false positives whenever two invoices happen to sum to a payment. Match on customer + amount + date proximity, and treat partial payments and short-pays as a distinct workflow rather than a failed match.
Dunning and collections workflows
Dunning is where automation earns its keep on DSO. A staged dunning schedule — a friendly reminder a few days before due, a firmer notice at 7-15 days past due, and escalation to a collections queue or account hold past 30-45 days — should run itself, with exceptions routed to a human. Segment the schedule by customer risk tier; a large, reliable account that pays late every quarter does not need the same cadence as a small account with a history of write-offs.
dunning_schedule:
- stage: reminder
trigger_days_before_due: 3
channel: email
- stage: past_due_notice
trigger_days_past_due: 10
channel: email
cc: account_owner
- stage: escalation
trigger_days_past_due: 30
action: create_collections_task
hold_new_orders: true
- stage: final_notice
trigger_days_past_due: 60
channel: email+phone
escalate_to: credit_manager
Credit holds and risk scoring
Automated credit holds prevent the AR problem from compounding — a customer who is 60 days past due should not be placing new orders on open terms without someone deciding that is acceptable. Tie the hold to a credit limit and an aging threshold rather than a single missed invoice, so a customer with one late payment on an otherwise clean account is not blocked over a rounding dispute. Whatever scoring model you use, make the override path visible and logged; sales will ask for exceptions, and you want a record of who approved them.
Automate the dunning and the hold. Do not automate write-offs or bad-debt reserves — those touch the general ledger and need a human sign-off, both for internal controls and because a write-off is often the wrong call when a dispute, not non-payment, is the real issue.
Measuring what changed
DSO is the headline metric, but it lags — it tells you what happened over the last period, not what is about to happen. Track leading indicators alongside it: percentage of invoices delivered same-day, straight-through cash application rate, and the age distribution of the open AR balance (not just the average). A falling DSO with a growing 90+ day bucket means you are collecting the easy invoices faster while the hard ones pile up — automation solved the wrong problem.
| Metric | What it tells you |
|---|---|
| DSO | Overall collection speed, lagging indicator |
| Straight-through match rate | How much manual cash-application work remains |
| Aging bucket distribution | Whether hard-to-collect AR is growing, not just shrinking on average |
| Dispute rate | Whether AR problems are billing errors, not payment behaviour |
Wrapping up
The highest-value AR automation is not the cleverest algorithm — it is getting invoices out fast, matching cash without a human unless the match is genuinely ambiguous, and running a dunning cadence that scales with account risk instead of treating every customer the same. Get those three right and DSO moves; write-offs and disputes stay a deliberate, reviewed decision rather than something a script did on its own.
Independent software engineer in Nairobi specialising in Acumatica customisations, Laravel backends, and tax fiscalisation integrations across East and Southern Africa.