Create an Invoice Automatically When a Job Is Marked Complete
Short answer: Connect the job tool to your accounting software so that marking a job complete creates a draft invoice, not a sent one. Map the customer, the job lines and the tax type, and send the draft to a person for a quick check before it goes to the customer. Add a fixed step for extras that were agreed on site, because those are the most common source of wrong amounts. Start with one job type, run it for two weeks alongside your manual process, and compare the drafts with what you would have invoiced.
Map the fields before you connect anything
A job record and an invoice hold different information, so list what must move between them. For a typical trade business, the job tool should provide:
- Customer: the name, the billing email and the account number from the accounting package.
- Job reference: a number the customer will recognise, for example "Job 2041 kitchen tap repair".
- Line items: one line for labour and one for each part, with quantity and unit price.
- Tax type: the GST treatment for each line.
- Completion date: used as the invoice date, so the period is right.
Write this list on one page. It becomes the specification for your connection, and it is the document to check when an invoice looks odd.
Choose the trigger and the connector
Most booking and job tools can send a webhook when a status changes. A connector service, such as a low-code automation platform, receives that webhook, looks up the customer, and calls the accounting API to create a draft. Xero's developer documentation describes how invoices are created through its API, including the draft status. If your tool has a native integration with your accounting package, use it first, because fewer moving parts means fewer failure points.
Set the trigger on the status "Complete" only, not on "Ready to invoice" or "Paid", unless your process needs those. A status change that happens twice, such as a job reopened and completed again, should not create a second invoice. Check the connector for duplicate protection, and test by completing and reopening a test job.
Use draft-only with human approval
The safest rule is that automation creates drafts and a person sends them. The draft appears in the accounting package with the customer and lines filled in. Someone checks the total, the tax and the customer details, then approves and sends. This takes two minutes per job and removes most of the risk. Once the drafts have been right for a month, you can consider sending automatically for a limited group of simple jobs, such as fixed-price services.
Handle the extras added on site
Extras are where automated invoices go wrong. A technician fixes a second leak, replaces a valve, or changes the job from a repair to a replacement. If the job record does not capture that, the automated draft shows the original quote and the customer receives a lower bill that you then have to correct.
Solve this with a form on the job that the technician completes before marking the job complete. It should list the agreed extras, the quantity and the price, and it should require a reason for any change from the quote. The connector then adds those lines as separate items on the draft. If a technician skips the form, the job cannot be marked complete, which is a deliberate limit.
Match the customer correctly
Customer matching causes duplicate accounts. Match on the billing email first, then the account number if the job tool stores it, and only then on the name. A rule that matches on name alone will create two customers when a business appears as "J Smith Plumbing" and "John Smith Plumbing". Keep a review queue for anything that does not match, so a person decides the link.
Get the tax codes right
Tax mistakes are the most common error after the amounts. In New Zealand, GST is charged at the standard rate on most supplies, and the IRD's guidance explains when a supply is zero-rated or exempt. Map each job item to a tax type in the accounting package, not in the job tool, so the rule lives in one place. Review the tax lines for the first few invoices from each new job type, and check any unusual supply against the official guidance before you send.
Run a parallel test
For two weeks, keep your manual invoicing running alongside the automation. Each morning, compare the drafts with the jobs you completed the day before. Count the differences, note their causes and fix the mapping. When the differences fall to nothing for a week, switch off the manual step for that job type.
Keep a trail of approvals
Approval should leave a trace. When the reviewer approves a draft, the accounting package records the person and the time in the invoice history. Check that this history is visible, and review a sample of approvals each month. A reviewer who approves everything without looking is a risk that no setting can fix, so rotate the task and ask for a second look at any invoice above a value you agree in advance.
FAQ
Can the invoice be sent automatically from the start?
It can, but starting with drafts gives you a safety net while the mapping settles. Move to automatic sending for simple, fixed-price jobs once the drafts have been accurate for several weeks.
What happens if the connection fails?
Good connectors log the failure and retry. Check the log each morning for a few weeks, and create a simple alert that emails someone when a job completes without a matching draft.
Does this work with QuickBooks as well as Xero?
The same principles apply. The field names and API details differ, so check the documentation for the package you use and test the connection with a dummy customer first.
Should the customer see the job reference?
Yes. A job number on the invoice helps the customer match the bill to the work and reduces calls about which visit it covers.
If you want the mapping and the approval step set up for your jobs, tell us which booking tool and accounting package you use and our studio will draft the connection plan for your business.