Work snippet
HubSpot to Xero invoice sync, with payment status back on the deal
When sales mark a HubSpot deal won, Make builds a single draft invoice in Xero from its line items against the customer’s existing Xero contact. As money comes in, the deal shows paid, part-paid or overdue, so sales stop asking finance.
The problemWon deals are retyped into Xero by hand, and sales has to ask finance who has paid.
What changesEach won deal raises one correct Xero draft, and paid, part-paid or overdue shows on the deal.
- Area
- CRM to invoicing
- Tools
- HubSpot · Xero · Make · Slack
- Typical scope
- US$1,800-3,500
- Timeline
- About 4 weeks · fixed milestones
The situation and what was breaking
Winning the deal did not start the billing. Finance waited for an email listing what to charge, and sales had no view of whether the customer had paid.
When HubSpot and Xero are not linked, a closed deal becomes an email or a message to finance with the amount and the customer. The invoice is keyed by hand, sometimes against a second copy of the contact, sometimes with different line items from the quote the customer agreed. Sales cannot see whether the customer has paid without asking.
Marketplace connectors cover the simple case. They break down with deposits, line items mapped to Xero item codes and tracking, or a customer that exists in Xero under a slightly different name. This build handles those cases on purpose and logs every run.
- Invoices keyed by hand from deal emails
- Duplicate Xero contacts for the same company
- Line items that differ from the agreed quote
- Tracking and account codes missing on sales
- Sales chasing finance for payment status
What good looks likeWon deal to correct Xero invoice without retyping, and paid status on the deal without asking finance.
Discovery findings
What a read-only review checks first: three months of closed-won deals and their line items, the Xero invoices and contacts for the same period, and a call with sales and finance.
| ID | Finding | Evidence | Risk if left |
|---|---|---|---|
| F1 | Deals invoiced by hand | Won deals with no matching invoice reference | Missed or late invoices |
| F2 | Company names differ between systems | Same company under two Xero contacts | Statements split, debt chased twice |
| F3 | HubSpot products not mapped to Xero items | Free text lines on invoices | Revenue in the wrong account |
| F4 | Deposits agreed but not invoiced | Deal notes mention deposits | Work starts unpaid |
| F5 | No payment status in HubSpot | Sales asks finance | Wasted time, awkward customer calls |
| F6 | No log of what was sent | Nothing to audit | Disputes over what was invoiced |
Architecture: HubSpot Xero integration
HubSpot stays the place deals are won and Xero stays the ledger. Make sits between them with a contact match, a product map, a duplicate guard, and a second scenario that brings payment status back.
Scroll sideways to see the full drawing
The screens your team will use
Sales sees invoice and payment status on the deal. Finance reviews drafts in Xero and clears exceptions in Slack.
Deal properties
Timeline
- Deal closed-won
- Xero draft INV-7712 created
- Finance approved and sent
- Deposit US$7,300 received
Four deal properties are written by the payment scenario. Nobody edits them by hand.
A replay of the same deal stops at step 2 because the invoice reference already exists.
Every run, with the match method
| Run | Deal | Amount | Contact match | Xero | Result |
|---|---|---|---|---|---|
| a41… | D-3301 | 14,600.00 | Company number | INV-7712 | Created |
| a43… | D-3307 | 2,980.00 | Email domain | INV-7715 | Created |
| a44… | D-3307 | 2,980.00 | Email domain | INV-7715 | Exists, stopped |
| a47… | D-3312 | 8,250.00 | None | Held, alerted | |
| a49… | D-3312 | 8,250.00 | Created by finance | INV-7719 | Replayed |
The match method is logged, so finance can see why an invoice went to a contact.
How it is built
Matching and mapping first, because they decide whether the invoice is right. The payment write-back follows once drafts have been correct for a week of test deals.
- Module AContact match
Company number, then email domain, then exact name; no match holds the deal and alerts finance.
- Module BProduct map
HubSpot products to Xero item codes, accounts and tracking, in one table.
- Module CDraft invoice
One Xero draft per deal, deal id as reference, terms from the contact.
- Module DDeposit option
A deal property sets a deposit share; the first draft is the deposit, the balance follows on a later stage.
- Module EPayment write-back
Xero payments update paid, part-paid, overdue and outstanding on the deal.
- Module FLog and alerts
Every run logged; exceptions post to Slack with the deal link and the fix.
Field mapping and rules
The product map and the contact rules are the parts most likely to change. Both live outside the scenario steps.
| HubSpot | Xero | Rule |
|---|---|---|
| Company (associated) | Contact | Matched by company number or email domain, never created silently |
| Deal id | Invoice reference | Duplicate guard |
| Line item product | Item code | From the product map |
| Line item quantity and price | Quantity and unit price | As agreed on the deal |
| Deal owner | Tracking: sales owner | Optional, if tracking is used |
| Close date | Invoice date | Due date from contact terms |
| Xero state | HubSpot property | Value |
|---|---|---|
| Draft or awaiting approval | invoice_status | Draft |
| Authorised, unpaid | invoice_status | Sent |
| Part payment | payment_status | Part-paid, with outstanding |
| Paid in full | payment_status | Paid, with date |
| Past due date | payment_status | Overdue |
Worked figures
Walkthrough arithmetic for a quarter of closed-won deals.
How contacts were matched
QA and testing checklist
Every check runs in a copy or on test records first, and each one is ticked with evidence before go-live.
- T1CreateA closed-won test deal creates one Xero draft with the deal id.
- T2ReplayRunning the same deal again stops at the reference check.
- T3Contact matchA company with a Xero contact under a different name matches by domain.
- T4No matchAn unknown company holds and alerts, with no contact created.
- T5ProductsEvery line maps to an item code; an unmapped product alerts.
- T6DepositA deposit share raises the deposit draft first.
- T7Part paymentA part payment shows part-paid and the outstanding amount on the deal.
- T8OverdueA past-due invoice marks the deal overdue.
- T9Drafts onlyNo invoice is approved or sent by the scenario.
Scope
| Area | Included |
|---|---|
| Review | Three months of won deals, invoices and contacts, with findings |
| Matching | Contact rules and a clean-up list for existing duplicates |
| Invoice scenario | Deal won to Xero draft with product map and duplicate guard |
| Payment scenario | Xero payment status back to HubSpot deal properties |
| Log and alerts | Run log and Slack exceptions |
| Test week | Test deals through every path before live |
| Not included | HubSpot pipeline redesign, quoting tools, payment gateways, or HubSpot, Make and Xero plan costs |
Milestones, week by week
- Week 1
Review and rules
- Three-month review
- Contact rules
- Product map
- Week 2
Invoice scenario
- Match, map, guard
- Test deals
- Run log
- Week 3
Payment write-back
- Deal properties
- Part-paid and overdue
- Alerts
- Week 4
Live and handover
- Live for new deals
- SOP and walkthrough
- 14 days of fixes
Handover and keeping it running
Handover pack
- Scenario map each module and why it is there
- Product map guide adding a product or changing an account
- Exception runbook no contact, no item, failed run
- Run log kept beyond Make's own history
- Recorded walkthrough deal to draft to paid
- 14 days of fixes for defects in the agreed scope
Keep it running
Most exceptions come from a new product or a new customer. Fix the product map or the contact first, then replay; never edit the invoice in Xero to make the run look right.
- Daily: Slack exceptions cleared
- Weekly: won deals without an invoice reference checked
- When products change: update the product map first
- Optional support hours at US$35 per hour, agreed in writing
Typical scope for this kind of project: US$1,800-3,500
About 4 weeks · fixed milestones. The systems health check (US$150, fixed) comes first and confirms the scope. Extra hourly work is US$35 per hour, agreed before it starts. After handover, a set block of hours each month is available at the same rate, agreed in writing.
Discuss an engagement.
Outline the operational problem through the contact form. I respond with a recommended starting point, including whether the US$150 systems health check is the appropriate first step.