A service business rarely sells to one building. A housing association, a school trust or a retail landlord signs one account and sends you to a dozen sites under two or three contracts. When that customer is slow to pay, "they owe us £40,000" is not much use to a credit controller. The useful questions are which site the money is stuck on, which contract it sits under, and who at the customer signs off that site's invoices. Xero holds the answer, but its standard aged debt view is organised by customer. This page shows where site and contract already live in your Xero data, how to rebuild aged debt at that level, and how a chase workflow can run on the result.
Why Xero's aged debt stops at the customer
In the Xero app, the Aged Receivables Summary and Aged Receivables Detail reports (Xero Central) list what each customer owes and how long it has gone unpaid, aged either by due date or by invoice date. They answer "who owes us" well. They are built around the contact.
The Accounting API follows the same shape. Xero's reports documentation lists AgedReceivablesByContact with one required parameter, contactID, and three optional ones: date, fromDate and toDate. There is no tracking parameter on it. Compare the Profit and Loss report, which accepts trackingCategoryID and trackingOptionID and returns one column per option, or the Balance Sheet, which accepts trackingOptionID1 and trackingOptionID2. So an API pull of aged debt is one call per customer, and the answer is still one line per customer.
To age debt by site, you build it yourself from the invoices.
Where site and contract actually live in Xero
There are three places a business tends to record the site, and most use a mix.
- Tracking categories on invoice lines. Xero's tracking categories endpoint returns each category (for example "Region") with its options. On an invoice, tracking is set per line, and the invoices documentation says any line item can carry at most two tracking categories. This is the cleanest home for site and contract, because one invoice can cover several sites line by line. The cost is that both slots are then used, leaving none for branch or department.
- One contact per site. Some customers insist on it, so "Velling HA – Ferris Court" becomes its own contact. Xero's aged reports then split by site for free, but the customer total needs regrouping, and statements go to many contacts.
- The invoice
Reference. The invoices documentation describes it as an additional reference on sales invoices. Field service systems often write a job or site reference here when they post invoices. It is free text, so treat it as a hint, not a key.
If your job system posts invoices to Xero, check what it writes into each field before you rely on it. Do not assume that the invoice number in the job system matches Xero's InvoiceNumber; on many set-ups they differ, and the job reference travels in Reference or the line description instead.
The data model
Fields used
All Xero field names below appear in Xero's own invoices, credit notes and tracking categories documentation.
| Xero object | Fields | Why the site report needs them |
|---|---|---|
| Invoice | Type (ACCREC), Status, InvoiceNumber, Reference, Contact, Date, DueDate |
Open sales invoices and the date each one ages from |
| Invoice | SubTotal, Total, AmountPaid, AmountCredited, AmountDue |
What is still owed, after part payments and credits |
| Invoice | ExpectedPaymentDate |
A promised payment date, used to hold a chaser |
| Invoice line | LineAmount, Tracking (Name, Option, TrackingOptionID) |
Which site and contract each part of the invoice belongs to |
| Credit note | Contact, RemainingCredit, Allocations, line Tracking |
Credit not yet set against an invoice |
| Tracking category | TrackingCategoryID, Name, Options, option Status |
The list of valid sites and contracts, including archived ones |
Joins
| From | To | Key | Watch for |
|---|---|---|---|
| Invoice line | Site | Tracking option where Name is your site category |
Lines with no option, and options renamed mid-year |
| Invoice line | Contract | Tracking option in the second category |
Contracts that cover several customers |
| Invoice | Customer | Contact |
Contact-per-site customers need a parent mapping you keep yourself |
| Credit note | Invoice | Allocations |
Unallocated credit belongs to the customer until someone allocates it |
| Xero invoice | Job system job | Job ref in Reference or line text |
Never the two invoice numbers, unless you have proved they match |
Formulas
| Measure | Formula |
|---|---|
| Line share | line LineAmount ÷ invoice SubTotal |
| Site amount due | invoice AmountDue × Σ line shares tagged to that site |
| Days past due | report date − DueDate (zero or less is current) |
| Site ageing | sum of site amount due in buckets: current, 1–30, 31–60, 61–90, over 90 days |
| Untagged debt | invoice AmountDue × Σ line shares with no site option |
| Chase trigger | site overdue ≥ threshold and oldest overdue invoice ≥ minimum days, excluding invoices with a future ExpectedPaymentDate |
The pro rata split is the one judgement call. Xero records payments against the invoice, not the line, so a part payment cannot be traced to a site. Sharing it in proportion to line amounts is neutral and repeatable. If a customer remits against specific lines, record that outside Xero and override the split.
Xero receivables · 5 November 2026
Aged debt by site · Brackenmoor Building Services (fictional)
£77,258 overdue,
split across 12 sites.
36 open sales invoices. Each invoice’s amount due is shared across sites in proportion to its line amounts, using the Site and Contract tracking options on each line.
- Open receivables
- £87,506
- 36 invoices · 12 sites
- Overdue
- £77,258
- Past due date
- Over 60 days
- £33,223
- Past due date
- No site tag
- £3,989
- 5 invoices to re-tag
Amount due by customer and site, days past due date
Customer rows: one line per contact, as in Xero’s aged report
| Customer / site | Current | 1–30 | 31–60 | 61–90 | Over 90 | Total |
|---|---|---|---|---|---|---|
| Velling Housing Association | £600 | £1,140 | £3,600 | – | – | £5,340 |
| Ferris Court | £450 | – | £2,160 | – | – | £2,610 |
| Linden Rise | – | – | £1,440 | – | – | £1,440 |
| Marsh Lane Depot | – | £1,140 | – | – | – | £1,140 |
| No site tag | £150 | – | – | – | – | £150 |
| Glenmarrow Retail Parks | £2,994 | £2,748 | £2,880 | £6,449 | £6,180 | £21,251 |
| Glenmarrow North | £1,764 | £1,620 | – | £3,834 | £4,602 | £11,820 |
| Glenmarrow South | £1,230 | £1,128 | £2,880 | £1,926 | £1,578 | £8,742 |
| No site tag | – | – | – | £689 | – | £689 |
| Kestowe Learning Trust | £1,818 | £13,206 | £6,642 | £3,816 | £2,034 | £27,516 |
| Kestowe Primary | – | £4,386 | – | – | – | £4,386 |
| Oakridge Academy | £1,818 | £5,154 | £2,124 | – | £2,034 | £11,130 |
| Trust office | – | £3,666 | £3,102 | £2,880 | – | £9,648 |
| No site tag | – | – | £1,416 | £936 | – | £2,352 |
| Ravelin Cold Stores | – | £624 | £4,164 | £3,570 | £1,748 | £10,106 |
| Ravelin Unit 4 | – | £624 | – | £1,992 | £1,496 | £4,112 |
| Ravelin Unit 9 | – | – | £4,164 | £1,578 | £252 | £5,994 |
| Quillon Medical Group | £4,836 | £5,047 | £3,984 | £9,426 | – | £23,293 |
| Saltings Surgery | £2,046 | £728 | £3,984 | £5,796 | – | £12,554 |
| Bell Yard Clinic | £2,790 | £3,521 | – | £3,630 | – | £9,941 |
| No site tag | – | £798 | – | – | – | £798 |
Overdue by contract
1–60 days past due over 60 days
Deskless chase queue
One draft per customer and site where at least £500 is overdue and the oldest invoice is 14+ days late. Each waits for credit control to approve.
| Site · customer | Oldest | Overdue | Draft · status |
|---|---|---|---|
| Trust officeKestowe Learning Trust · 6 invoices | 61d | £9,648 | Final reminder before account reviewFor review |
| Oakridge AcademyKestowe Learning Trust · 3 invoices | 140d | £9,312 | Final reminder before account reviewFor review |
| Glenmarrow NorthGlenmarrow Retail Parks · 5 invoices | 106d | £7,638 | Final reminder before account reviewFor review |
| Glenmarrow SouthGlenmarrow Retail Parks · 5 invoices | 122d | £7,512 | Final reminder before account reviewFor review |
| Saltings SurgeryQuillon Medical Group · 3 invoices | 67d | £7,352 | Final reminder before account reviewFor review |
| Ravelin Unit 9Ravelin Cold Stores · 5 invoices | 110d | £5,994 | Final reminder before account reviewFor review |
| Bell Yard ClinicQuillon Medical Group · 4 invoices | 67d | £5,861 | Final reminder before account reviewFor review |
| Kestowe PrimaryKestowe Learning Trust · 2 invoices | 30d | £4,386 | Friendly reminderFor review |
| Ravelin Unit 4Ravelin Cold Stores · 3 invoices | 110d | £4,112 | Final reminder before account reviewFor review |
| Ferris CourtVelling Housing Association · 1 invoice | 46d | £2,160 | Second reminderFor review |
| Linden RiseVelling Housing Association · 1 invoice | 46d | £1,440 | Second reminderFor review |
Held: INV-20342 (Glenmarrow Retail Parks, £2,418) has an expected payment date of 11 November 2026, so it is left out of the drafts.
Held: INV-20421 (Quillon Medical Group, £4,446) has an expected payment date of 8 November 2026, so it is left out of the drafts.
Deskless by IVP.ai · morning run log
Xero → IVP.ai Data Layer
- 07:00Read open sales invoices (ACCREC, AUTHORISED)36 invoicesSynced
- 07:00Read tracking categories: Site, Contract12 sites · 7 contractsSynced
- 07:01Split amount due by line tracking, age by due date56 site linesDone
- 07:01Lines with no Site option5 invoices · £3,989For review
- 07:02Apply chase rules (≥ £500 overdue, oldest ≥ 14 days)11 site chasersDone
- 07:02Hold where ExpectedPaymentDate is set2 invoices heldDone
- 07:03Draft chasers and queue for credit control11 drafts · £65,415For review
- 07:03Send without approvalOff in this set-upSkipped
Worked example (illustrative, fictional)
Brackenmoor Building Services is an invented contractor. One of its customers, Velling Housing Association (also invented), has three open invoices on 5 November 2026, all on 30-day terms with VAT at 20%.
INV-20418, quarterly planned maintenance. Two lines: Ferris Court £2,400 and Linden Rise £1,600, both tagged to the contract "VHA planned maintenance". Subtotal £4,000, total £4,800. Velling paid £1,200, so AmountDue is £3,600. Ferris Court's share is £2,400 ÷ £4,000 = 60%, which is £2,160; Linden Rise takes 40%, £1,440. The due date was 20 September, so on 5 November it is 46 days past due.
INV-20533, pump replacement. One line, Marsh Lane Depot, £950 net, "VHA reactive". Total and amount due £1,140. Due 25 October, so 11 days past due.
INV-20602, leak repair. Ferris Court £375 tagged "VHA reactive", plus a £125 out-of-hours call-out charge that someone entered with no tracking. Total £600. Ferris Court's share is £375 ÷ £500 = 75%, or £450. The untagged 25%, £150, lands in "no site tag". Due 19 November, so not yet due.
What Xero's aged report shows. One line for Velling: £5,340 owed, £600 current, £1,140 at 1–30 days and £3,600 at 31–60 days.
What the site split shows. Ferris Court £2,610 (£2,160 at 31–60 days, £450 current). Linden Rise £1,440 at 31–60 days. Marsh Lane Depot £1,140 at 1–30 days. No site tag £150. These add back to £5,340.
What the chase rules do. With a threshold of £500 overdue and a minimum of 14 days, Ferris Court (£2,160, 46 days) and Linden Rise (£1,440, 46 days) each get a draft second reminder addressed to the person who approves that site's invoices. Marsh Lane Depot is over the threshold but only 11 days late, so it waits. The £150 call-out line goes to finance to tag.
By contract, "VHA planned maintenance" has £3,600 overdue and "VHA reactive" £1,140 overdue plus £450 current. The planned maintenance money is the older debt, which is useful to know before a contract review meeting.
What distorts a site split
- Untagged lines. Every line without a site option becomes debt nobody owns. Report the untagged total every day and make tagging a step in invoice approval.
- Unallocated credit. A credit note with
RemainingCreditabove zero reduces what the customer owes, but not on any invoice. Show it as a separate customer-level line, using the credit note's own line tracking if it has any, rather than netting it silently against one site. - Archived and renamed options. The tracking categories endpoint takes
includeArchived=true. Without it, old invoices tagged to an archived site can fail to match the site list. - Ageing basis. Xero's app lets you age by due date or by invoice date. Pick one, say which on the report, and keep it the same as the figure finance quotes to the board.
- API limits. Xero's published limits for one app against one organisation are 60 calls a minute and 5 at a time, with a daily cap of 1,000 calls for apps on the starter tier and 5,000 on higher tiers. Fetch invoices with the
Statusesfilter and paging, and use theIf-Modified-Sinceheader for daily changes rather than reloading everything.
For how aged debt sits alongside the other weekly measures, see field service KPIs. If your job data is in Uptick, Simpro or ServiceMax, the Uptick, Simpro and ServiceMax guides cover getting that side out.
The chase workflow that runs on it
Once debt is split by site, chasing can be addressed to the right person instead of the customer's general accounts inbox. Deskless by IVP.ai runs the steps each morning:
- Read open sales invoices and tracking options from Xero into the IVP.ai Data Layer.
- Split and age the amount due by site and contract, as above.
- Hold any invoice with a future
ExpectedPaymentDate, and any invoice your team has marked as queried. - Draft one chaser per customer and site, listing only that site's invoices and amounts, with the tone set by the age of the oldest invoice.
- Queue the drafts for credit control. A person reads, edits and approves each one.
In a typical set-up Deskless drafts and flags, and a person sends. A business can choose to let it send routine first reminders automatically; that is a configuration decision. In this set-up it doesn't change an invoice, write off debt or alter a payment in Xero; anything beyond chasing is also a choice the business makes when configuring it, not a default. The same principle runs through the renewal agents case study, where renewal agents sent 90+ renewal invoices in one dispatch, with no price changed without a person.
Running it with IVP.ai
The IVP.ai Data Layer connects to Xero with read-only access, keeps the split and ageing rules above as tested definitions, and joins Xero to your job system on the reference you have proved, not on invoice numbers. The result runs as a report or agent every morning. See the platform and field service reporting for the wider picture.
To see your own aged debt by site, start a free 48-hour pilot. We connect up to three sources, clean the data and have one report or agent running on your real data within 48 hours of read-only access. You then have 14 days of access to decide on a plan or walk away.