Skip to main content
Xero → SalesforceIntegration guide

Connecting Xero to Salesforce

Xero holds the invoice and the reconciliation, which makes it the definitive revenue record for many service and trade businesses. Sending conversions into Salesforce rather than out of it is how marketing data reaches the place sales actually works. The join between them succeeds or fails on one thing: whether the Lead or Contact identity reaches the Xero invoice before the conversion happens, because Salesforce can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Xero to Salesforce: write paid status onto the Opportunity

Bring Xero payment status back onto the Salesforce Opportunity so Closed Won becomes paid revenue by campaign. Check whether your connector returns payment status, then join on the Opportunity or Account ID stored in the Xero invoice reference, writing paid-to-date, payment date and a reconciled flag. Credit notes should reduce the paid amount.

This is a common and useful pairing. Salesforce owns the Opportunity and the campaign that produced it; Xero owns the invoice and whether the money reached the bank. Bringing paid status back into Salesforce turns Closed Won into paid revenue by campaign, which matters for businesses on payment terms where some won deals are paid late, partly, or never.

Several third-party Xero and Salesforce connectors are listed on the Xero App Store and AppExchange; check what each one syncs before choosing, since some only push invoices out of Salesforce and never return payment status. The join key is the Salesforce Opportunity or Account ID stored on the Xero invoice (the reference field is a common place) or the Xero contact ID stored on the Account. Write paid amount, payment date and a reconciled flag to Opportunity fields, then check the record in the UI.

Credit notes need to reduce the paid amount on the Opportunity, not just sit in Xero. Partial payments are common on large trade jobs, so a single paid checkbox is too blunt; store paid-to-date instead. Offline conversion uploads to Google or Meta should read the payment date from the Opportunity alongside the click ID captured at lead time.

Xero → Salesforce · what breaks

Why this join usually fails — Xero → Salesforce

  1. 01

    The Lead or Contact identity never reaches Xero

    Like any accounting system, Xero has no marketing context of its own. The identifier must be written onto the contact record by whatever creates it, and in many businesses that is a manual step which will be applied inconsistently unless it is automated.

  2. 02

    Payment terms separating the sale from the money

    An invoice issued in March and paid in May is one sale and two dates. Which one the conversion uses has to be a decision rather than an accident.

  3. 03

    Writes that succeed and change nothing

    Field-level security, validation rules and required-field constraints can reject a write while the API reports success. Open the record and look rather than trusting the response.

  4. 04

    Nothing reconciles afterwards

    Check the record in Salesforce itself, not the API response. Then confirm the value survives Lead conversion onto the Contact, Account and Opportunity — the mapping is separate and is usually the thing that was missed.

Xero → Salesforce · the fix

What working looks like — Xero → Salesforce

  • The Lead or Contact identity on every invoice

  • Conversions arriving in Salesforce

    The marketing context appears on the record and flows into the opportunity, where sales and reporting can both use it.

  • Reconciled against the source

Xero → Salesforce · architecture

How Xero and Salesforce actually connect

  1. 1

    Xero holds the truth

    Xero's bank reconciliation is what makes it unusually trustworthy as a source of truth — an invoice marked paid and reconciled is money that actually arrived, which is a stronger guarantee than most systems offer.

  2. 2

    Salesforce needs a click to match

    Salesforce needs a resolvable record and a custom field to write to. Field-level security and validation rules can silently reject writes, which is a Salesforce-specific failure that returns success at the API level and changes nothing.

  3. 3

    The identifier is the bridge

    The Lead or Contact identity, captured at the visit and carried into the Xero invoice.

  4. 4

    The event source decides reliability

    Fire on payment, not on invoice issue. Trade businesses on thirty-day terms will otherwise report revenue a month before it exists.

  5. 5

    Deduplication at the destination

    Salesforce deduplicates according to whatever matching rules your org has configured, which vary enormously between instances. Duplicate Leads are the standard failure and merging them afterwards is manual work.

Xero → Salesforce · normal or broken

Working vs. broken, side by side — Xero → Salesforce

Normal, not a fault

  • The Lead or Contact identity present on the invoice

  • Sent from the Xero invoice payment webhook

  • Deduplicated correctly

    Salesforce deduplicates according to whatever matching rules your org has configured, which vary enormously between instances. Duplicate Leads are the standard failure and merging them afterwards is manual work.

  • Reconciles with the source

Actually broken

  • The Lead or Contact identity missing on most records

    Like any accounting system, Xero has no marketing context of its own. The identifier must be written onto the contact record by whatever creates it, and in many businesses that is a manual step which will be applied inconsistently unless it is automated.

  • Sent from the browser

    An invoice issued in March and paid in May is one sale and two dates. Which one the conversion uses has to be a decision rather than an accident.

  • Counted twice, or not at all

    Field-level security, validation rules and required-field constraints can reject a write while the API reports success. Open the record and look rather than trusting the response.

  • Nobody has reconciled it

Xero → Salesforce · diagnose

Diagnostic order — Xero → Salesforce

  1. 01

    Count invoices carrying the Lead or Contact identity

  2. 02

    Follow one real conversion end to end

  3. 03

    Check whether the conversion fires on issue or on payment

    On terms-based businesses this single choice moves the numbers by a full billing cycle.

  4. 04

    Write a test value and open the record in the UI

    The API saying it worked and the field actually holding the value are different things in Salesforce more than anywhere else.

  5. 05

    Read the match rate, not the success message

    Check the record in Salesforce itself, not the API response. Then confirm the value survives Lead conversion onto the Contact, Account and Opportunity — the mapping is separate and is usually the thing that was missed.

Xero → Salesforce · prove

How it gets proven — Xero → Salesforce

Source of truth

Xero's paid invoices by payment date, reconciled against the bank feed.

  • The Lead or Contact identity confirmed present on a live invoice.
  • A test value confirmed present on the record in the UI, and confirmed to survive Lead conversion.
  • A paid invoice confirmed reconciled against the bank feed before being counted.

Xero → Salesforce · free audit

What we check in the free audit

  • Count invoices carrying the Lead or Contact identity
  • Follow one real conversion end to end
  • Check whether the conversion fires on issue or on payment
  • Write a test value and open the record in the UI
  • Read the match rate, not the success message

Checked against

Xero's paid invoices by payment date, reconciled against the bank feed.

Get my free conversion tracking audit

Free30 minutesNo obligation

Xero → Salesforce · when not to buy

When you don't need this — Xero → Salesforce

  • Measure identifier coverage yourself first — pull your last hundred invoices and count how many carry the Lead or Contact identity.
  • If your work is paid at point of sale with no invoicing, the accounting system is not where the conversion should come from.
  • If your Salesforce org is administered by a team you cannot get time with, scope their availability before starting — this build is usually blocked on admin access rather than on the work.

Xero → Salesforce · what we deliver

What gets built — Xero → Salesforce

  • Identifier capture into Xero

    Write the click identifier to a tracking category or a custom field on the Xero contact at creation, so subsequent invoices inherit the association.

  • Event source: the Xero invoice payment webhook

    Fire on payment, not on invoice issue. Trade businesses on thirty-day terms will otherwise report revenue a month before it exists.

  • Dispatch to Salesforce

    API writes to the Lead or Contact record, or a platform event, carrying the marketing context as custom field values.

  • Reversals where they exist

    Credit notes reverse against the original invoice and should reduce the reported figure.

Written guarantee

95%+ tracking accuracy

Measured against Xero's paid invoices by payment date, reconciled against the bank feed.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Xero → Salesforce questions, answered

Yes, through third-party connectors on the Xero App Store and Salesforce AppExchange. Check whether the one you pick returns payment status to Salesforce, not just sends invoices out.

Free · 30 min

Get Xero and Salesforce joined properly

Free30 minutesNo obligation