
Salesforce integrated with QuickBooks Online and Xero for invoicing and payment status
Finance re-keyed every won deal into the accounting system. We connected Salesforce to QuickBooks Online and Xero so invoices start in Salesforce and payment status flows back.
Project overview
Our client is a consulting firm that manages its pipeline and engagements in Salesforce and its accounting in QuickBooks Online and Xero. Every won opportunity meant finance re-entering the customer and building the invoice by hand, and sales could not see whether a client had paid.
We integrated Salesforce with both accounting platforms, so invoices start from Salesforce and payment status comes back, while the accounting system stays the financial system of record.
The challenge
Duplicate customer entry
Customer details were typed into both Salesforce and accounting.
Manual invoices
Finance recreated Salesforce data to prepare each invoice.
No payment visibility
Sales and account managers could not see invoice or payment status.
Mismatched data
Names, addresses and tax details drifted between systems, making reconciliation hard.
Silent failures
When a sync failed, nobody knew.
What we built
Data mapping
One agreed mapping between Salesforce and accounting.
- Account to accounting customer, contact to contact
- Opportunity to financial reference
- Salesforce products to accounting items
- Invoice request to accounting invoice
- Payment status back to Salesforce
QuickBooks Online integration
Customer creation and updates, invoice creation and retrieval, payment status sync, invoice references on Salesforce records and error reporting through the QuickBooks Online API.
Xero integration
Contact sync, invoice creation and retrieval, payment sync, tax and line-item mapping and external references through the Xero Accounting API.
Invoice workflow from Salesforce
Invoices start where the deal closes.
- Opportunity reaches the agreed stage
- Salesforce validates billing details
- An invoice request is created and sent to QuickBooks or Xero
- The accounting system creates the invoice and returns its ID
- Salesforce stores the reference and syncs status on schedule
Payment status in Salesforce
Invoice number, date, due date, total, outstanding amount, currency and payment status are visible to authorised Salesforce users, read-only.
Reliability
OAuth with secure credential storage, duplicate prevention, idempotent invoice creation so a retried request never creates a second invoice, error handling, retries, transaction logs and reconciliation reports.
Currency and tax
Currency mapping, tax codes, line-item calculations and billing addresses were set up with the client's finance team for US and UK invoicing.
Salesforce, QuickBooks and Xero integration architecture
- Accounts and contacts
- Won opportunity
- Invoice request
- Payment status fields
- Salesforce Flow trigger
- Apex + Named Credentials
- Idempotency keys
- Error log and retries
- QuickBooks Online API
- Xero Accounting API
- Invoices (system of record)
- Payments
- Reconciliation report
Results
- Customers are created once and synced to accounting.
- Invoices are created from Salesforce data instead of being re-typed.
- Sales and account managers see invoice and payment status on the account.
- Retries never create duplicate invoices.
- Failed syncs are logged and reported, and reconciliation is a report rather than a hunt.


