New: CodeSierra Studio turns your policies and SOPs into narrated video courses. Join the private beta →
HomeSolutions OverviewAll solutionsSalesforce ImplementationSalesforce ConsultingSalesforce DevelopmentSalesforce IntegrationSalesforce Managed ServicesAgentforce ImplementationSalesforce CustomizationSalesforce Data MigrationCPQ & Revenue CloudReports & DashboardsExperience Cloud PortalsHire a Salesforce DeveloperIndustries We ServeAll industriesHealthcareFinancial ServicesManufacturingRetail & E-commerceReal EstateLogisticsNon-ProfitEducationMoreCodeSierra StudioCase StudiesPricingCoursesBlogCareersAbout UsGet Started
Finance professional and account manager reviewing an abstract invoice status table
Consulting

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.

Discuss a similar project
QuickBooks + XeroAccounting platforms
IdempotentInvoice creation
Payment statusVisible in Salesforce
ConsultingIndustry
The client

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.

What was not working

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.

Our solution

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.

Solution architecture

Salesforce, QuickBooks and Xero integration architecture

Sales Cloud
  • Accounts and contacts
  • Won opportunity
  • Invoice request
  • Payment status fields
Integration layer
  • Salesforce Flow trigger
  • Apex + Named Credentials
  • Idempotency keys
  • Error log and retries
Accounting
  • QuickBooks Online API
  • Xero Accounting API
Finance
  • Invoices (system of record)
  • Payments
  • Reconciliation report
A won opportunity triggers an invoice request; Apex sends it to QuickBooks Online or Xero, and payment status syncs back.
What changed

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.
Answers

Questions about this project