Work snippetAI receivables

AI aged-receivables assistant for Xero: follow-ups for approval and a weekly cashflow summary

How I would approach about US$248,000 owing across 47 customers for a 20-tech commercial service business: follow-ups drafted from each customer's payment history for a person to edit and send, and a weekly cash summary whose every figure is checked against Xero. Nothing is sent automatically.

Work snippet with example figures.

Area
AI receivables
Tools
Xero · n8n · Airtable · Mailbox drafts
Typical scope
US$1,800–3,200
Timeline
About 6 weeks · 4 fixed milestones

Problem

What the owner sees

  1. A long aged receivables list and no time to write to each customer
  2. Reminders that read the same for a customer who always pays and one who never does
  3. Overdue invoices chased while the job is still in dispute
  4. No clear view of what cash will arrive in the next four weeks
  5. A tool that emails customers by itself

Chasing is mostly reading: who owes what, how they usually pay, and what was said last time. A model can draft each message from those facts quickly. It must not send anything, and it must not state a number that did not come from Xero. The design drafts, a person edits and sends, and every figure in the text comes from the data.

Where it goes wrong today
Everyday situationWhat goes wrong
Reminder sent for an invoice paid yesterdayThe customer is annoyed and the credit controller embarrassed
Same wording to every customerGood payers are insulted and poor payers ignore it
Dispute noted on a job, not in XeroA firm letter goes to someone waiting for a fix
Several overdue invoices for one customerFive separate emails instead of one statement-style message
Cashflow estimated in a spreadsheetBuilt once, never updated, wrong by the third week
An auto-send toolA message goes out on a bad day with a wrong figure

System map

A 20-tech commercial service business with about US$248,000 owing across 47 customers. A part-time credit controller chases by email and phone, and the owner wants a short cash view each Monday. Jobs run in ServiceM8 or Jobber and the ledger is in Xero.

The example drafts personalised follow-ups by customer history and puts them in a queue. The credit controller edits, approves and sends from their own mailbox. A weekly summary of cash is drafted from figures computed from Xero.

System map: who and what does each job
PartWhat it does
XeroOpen invoices, contacts, payments, aged receivables and bills due. Read only.
History tablePer customer: average days to pay, late payments in the last 12 invoices, last contact and any dispute flag.
Job systemJob status for each invoice, so work that is incomplete or disputed is excluded.
Language modelDrafts message wording from facts that code supplies. It does no arithmetic.
Review queueEach draft with the facts used, the reason it was drafted and the invoice list.
MailboxThe credit controller’s own mailbox. The workflow saves drafts there and has no send step.
n8n workflowPulls the data, runs the rules, builds the queue and the Monday summary.

How the data moves

  1. Xero aged receivables
  2. History and job status joined
  3. Stage chosen by rule
  4. Draft written
  5. Credit controller edits and sends
  6. Log updated
  7. Monday cash summary

Rules agreed in writing

Stages are chosen by rule, not by the model. The model only chooses wording within the stage and the customer’s history.

Follow-up stages and tone (example settings)
ItemExample setting
Stage 0Due in 3 days or less. No message unless the customer has paid late three times in a row.
Stage 11 to 14 days overdue. A short friendly reminder with the invoice list.
Stage 215 to 45 days overdue. A firm message that asks for a payment date.
Stage 3Over 45 days or over US$10,000. No email draft. A call is suggested and a note prepared for the owner.
Dispute flagNo draft. The owner is told and the item is excluded until the flag is cleared.
Tone by historyUsually pays within 5 days of due: light. Late on four of the last twelve: direct.
FrequencyOne message per customer per 7 days, covering all their overdue invoices.
What a draft may containInvoice numbers, dates, amounts and balances from Xero. Nothing else numeric.

Flow steps

Eight steps, run each weekday at 07:30 for follow-ups and Monday 07:00 for the cash summary.

Flow steps, in order
StepTriggerWhat happensResult
1 PullScheduleOpen invoices and aged receivables read from Xero.Invoice list
2 JoinInvoice listHistory and job status attached to each customer.Customer facts
3 StageCustomer factsRules pick a stage, or exclude the customer with a reason.Stage per customer
4 DraftStage 1 or 2Model writes the message. Code inserts the invoice table.Draft with facts
5 CheckDraft readyEvery number in the text compared with Xero. Invoice paid since the pull is removed.Pass or fail
6 QueueCheck passedDraft placed in the queue with the reason and facts.Queue item
7 ApproveCredit controllerEdits, approves, and a draft is saved in their mailbox.Mailbox draft
8 LogCredit controller marks sentDate and wording stored. Next review set in 7 days.History updated

Field mapping

The table shows what is read from Xero and where each value is used. The draft facts and the cash numbers are shown in the worked example.

Xero data to the assistant (example settings)
Xero valueUsed forRule
Contact name and emailAddressing the draftBilling contact if set, otherwise the primary contact
Invoice number, date, due dateInvoice table in the draftInserted by code, never typed by the model
Amount dueBalance and stageLive from Xero at the check step
Payments appliedDays to pay and the stale checkA paid invoice is removed before approval
Credit notes and overpaymentsNet balanceShown as a credit line, never ignored
Tracking categoryBranch or divisionUsed to route the draft to the right controller
Contact notesDispute flagA flag word in the note excludes the customer
Bank summary and bills dueWeekly cash summaryRead at 07:00 on Monday

Edge cases

Each is run as a test customer before go-live.

Edge cases and how each is handled
SituationHow it is handled
Invoice paid after the pullRemoved at the check step. If all are paid, the draft is withdrawn.
Customer with a credit noteThe credit is shown against the balance in the message.
Overpayment on accountNo chase draft. A note suggests allocating it.
Several billing contactsThe billing contact on the Xero contact is used and the rest are shown in the queue.
Customer replies with a promise to payThe controller records the date. No draft until that date passes.
Payment plan agreedMarked on the history table. Stage rules pause until the plan fails.
Large customer, small invoice overdueStage 3 rules do not apply below US$1,000 on a good payer, and the item is listed for a call.
Xero data unavailable at 07:30No drafts that day. An alert goes to the owner.
Model returns a number not in the dataDraft rejected and rewritten once, then shown as a plain invoice table.

Human sign-off and audit trail

There is no send step in the workflow. The credit controller reads every draft and sends it themselves, and the owner approves any stage 3 note.

Who signs off what
WhoSigns offWhenIf nobody acts
Credit controllerEvery draft, after editing, before it is saved as a mailbox draftDailyDrafts wait. Nothing is sent.
Credit controllerSending from their own mailboxAfter approvalThe draft is not sent
OwnerStage 3 notes and disputesWeeklyCustomer stays excluded
OwnerStage rules, tone settings and summary wordingBefore go-live and quarterlyExisting rules stay
OwnerThe Monday summary, by reading itWeeklySummary is a reminder, not a decision
Audit trail kept for every item (example entry)
FieldExample
Draft IDQueue item number
Data pulledXero pull time and invoice IDs used
Stage and reasonStage 2, 22 days overdue, usual payer late on 3 of 12
ModelModel name and version, prompt version
Number checkPass, with the list of figures compared
EditsText before and after, who and when
SentMarked sent by the controller, date and time

Data and privacy

Receivables data names customers and amounts. The assistant keeps it inside your own accounts.

Where the data lives and who can see it
DataHandling
Xero accessRead only for receivables, contacts, payments, bills and the bank summary.
Model requestContains first names, amounts and invoice numbers. Bank details and full addresses are left out.
Model useA hosted model on terms that do not allow training on your data, or a local model.
DraftsSaved in the controller’s mailbox or the queue only. Retention follows your mail policy.
AccountsXero, n8n and the mailbox stay in your accounts. I am added as a user and removed at handover.

Worked example

The tables below use example figures for one business. They show the shape of the numbers, not a client result.

Aged receivables by customer (example figures, US$)
CustomerCurrent1–3031–6061–90Over 90Total
Property manager, 14 sites38,200.0021,400.009,800.000.000.0069,400.00
Retail chain, 6 branches27,600.0012,900.006,400.000.000.0046,900.00
Medical practice9,400.000.003,100.000.000.0012,500.00
Builder, 3 active projects18,800.0011,200.0014,900.008,300.004,200.0057,400.00
School6,300.000.000.000.000.006,300.00
All other customers (42)31,500.0014,700.005,900.002,100.001,500.0055,700.00
Total131,800.0060,200.0040,100.0010,400.005,700.00248,200.00
Facts behind one draft (example)
FactValueSource
CustomerRetail chain, 6 branchesXero contact
Overdue invoices2 invoices, 23 and 41 days overdueXero
Amount overdue19,300.00Xero, live at check
Usual paymentPays 6 days late on averageHistory table
Last contactPhone call 12 days ago, promised paymentHistory table
Stage and toneStage 2, direct but politeRules
Weekly cash summary figures, next four weeks (example, US$)
WeekExpected inBills dueNetClosing balance
Week 131,200.0026,800.004,400.0088,700.00
Week 224,500.0019,300.005,200.0093,900.00
Week 328,900.0033,600.00-4,700.0089,200.00
Week 422,700.0017,400.005,300.0094,500.00

Testing and checks

Every check has a written pass condition and fail condition before it is run. A FAIL stops go-live until it is cleared and the check is run again.

Test plan with PASS and FAIL conditions
IDCheckMethodPASS whenFAIL when
T1Number checkEdit a draft number in a testDraft rejected and rewrittenWrong number reaches the queue
T2Paid invoicePay one invoice after the pullRemoved before approvalStill in the draft
T3Dispute flagAdd the flag word to a contactNo draft, owner toldA draft appears
T4Stage rulesRun ten test customers at known agesEvery customer in the right stageAny wrong stage
T5ToneCompare drafts for a good and a poor payerWording differs as setSame wording
T6No send stepReview the workflow and permissionsNo node or permission sends mailAny send route
T7Summary figuresRecompute the four weeks by handEvery figure equals the scriptAny difference
T8Summary wordingInsert a number the script did not produceSummary rejected, table sent insteadNumber appears
T9Xero outageBlock Xero in testNo drafts and an alertDrafts from old data
T10FrequencyRun two days runningOne message per customer per 7 daysTwo drafts for a customer

Scope and milestones

A fixed scope agreed in writing before anything starts. Each milestone is paid when you sign off its deliverable.

Scope: what a project like this covers
AreaIncluded
Systems AuditReview of the aged receivables report, your current chasing routine and the Xero contact setup, a 45-minute call, written findings and a fixed quote
Data pull and history tableXero reads and a per-customer history table
Stage rules and toneRules written with the credit controller and owner
Draft engine and number checkDrafts with code-inserted figures and a comparison to Xero
Review queueQueue with reasons, facts and mailbox drafts
Weekly cash summaryComputed figures, drafted wording and a check on every number
TestingTen checks, run to a pass before go-live
HandoverWritten SOPs, a recorded handover video and files you own, plus 14 days of fixes after go-live
Not includedTax filing and statutory returns.
Also outside the scopeSending messages automatically. Collections calls or letters. Model usage fees, billed to you by the vendors. Credit policy changes.
Fixed milestones
MilestoneDeliverableTimingShare
M1 Rules and historyStage rules signed and history table loadedWeek 125%
M2 Draft engineDrafts with the number check, T1 to T5 passWeeks 2 to 330%
M3 Queue and summaryQueue, mailbox drafts and the Monday summary, T6 to T10 passWeek 430%
M4 HandoverTwo weeks of supervised use, SOPs, handover video, 14 days of fixesWeeks 5 to 615%

Typical scope for this kind of project: US$1,800–3,200

About 6 weeks across 4 fixed milestones. The Systems Audit (US$300, fixed) comes first and confirms the scope.

Describe what is going wrong between your job system and your books, and I will say where I would look first.

Send a short note through the form on the home page. I will reply with where I would start, and whether the US$300 Systems Audit is the right first step.

Hire me on Upwork (opens in a new tab)Hire me on Freelancer (opens in a new tab)