> ## Documentation Index
> Fetch the complete documentation index at: https://docs.salesbricks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Connect Salesbricks to Xero to sync contacts, invoices, payments, and credit notes into your accounting ledger.

<Tip>
  Ready to connect your Xero organization to Salesbricks? Follow our [Setup
  guide](/integrations/xero/setup) to get integrated within minutes.
</Tip>

## Overview

Linking Salesbricks to your Xero organization automatically pushes contacts, invoices, payments, and credit notes from Salesbricks into Xero, and reads payment activity back out of Xero to reconcile your Salesbricks invoices.

Salesbricks is the source of truth for customers, invoices, and payments. The integration writes that data into Xero, and reads payment updates in Xero for any invoice that originated in Salesbricks.

If a customer pays their Salesbricks invoice through Stripe, or checks out directly through Stripe, Salesbricks pushes the invoice and payment details into Xero.

If an invoice is paid outside of the Salesbricks paywall (for example, the customer pays by check or wire and you record the payment in Xero), the payment syncs from Xero back to Salesbricks and the invoice is auto-reconciled. See [Payment sync](#payment-sync-from-xero) below.

<Note>
  Salesbricks connects to one finance system at a time. If QuickBooks is already connected,
  disconnect it before connecting Xero.
</Note>

<Note>
  Xero is enabled per account. If the Xero option shows **Contact us** instead of **Connect**, reach
  out to Salesbricks Support to have it turned on.
</Note>

## What syncs to Xero

### Customers

A Salesbricks customer syncs as a Xero **contact**.

* **Name**: the customer's legal name, suffixed with `(via Salesbricks)` so Salesbricks-created contacts are easy to identify and don't collide with your existing records.
* **Email**: the accounts payable email the buyer enters when signing the order form.
* **Address**: the customer's billing address, written to Xero's postal address so it appears on invoices.

If you're interested in syncing orders to existing Xero contacts instead, reach out to Salesbricks Support.

### Invoices

A Salesbricks invoice syncs as a Xero **ACCREC (accounts receivable) invoice**, created directly in **Authorised** status so it posts to the ledger immediately.

* **Invoice date** and **due date** come from the Salesbricks invoice. The due date is kept current on later syncs.
* **Reference** always carries the Salesbricks invoice number, so the two systems can be tied together at a glance. With **Override invoice number** on, the Salesbricks number is also used as the Xero invoice number.
* **Line items** are pushed tax-exclusive, one line per billed brick, with quantity and unit amount at up to four decimal places. Lines map to Xero items by SKU code where one is available.
* **Contract discounts** and **invoice adjustments** each appear as their own line, so a negotiated concession is visible as a single amount. Line-level discounts stay on each line's discount column.

### Payments

A payment recorded in Salesbricks is pushed to Xero and allocated against the synced invoice, posting to the configured payment / bank account.

Payments are posted net of any refunds already processed, and the payment reference notes the refunded amount when that applies.

### Credits and adjustments

Invoice credits and adjustments sync as Xero **credit notes** (ACCRECCREDIT) and are allocated against the original invoice, so the invoice balance drops without touching a cash account.

### Refunds

A Stripe refund reopens the invoice in Xero. Salesbricks reconciles the invoice's Xero payment down to its net amount, so the amount due in Xero matches the amount due in Salesbricks.

### Voids

Voiding an invoice in Salesbricks sets the corresponding Xero invoice to **Voided**.

## Payment sync from Xero

Payments and credits recorded in Xero are reconciled against unpaid Salesbricks invoices, which reduces manual effort and keeps both ledgers accurate.

### How it works

Xero notifies Salesbricks when an invoice changes, and Salesbricks reads the invoice back to pick up its payments and credit allocations. An hourly background scan backs this up, so each connected organization is rechecked regularly even if a notification is missed.

Both paths require **Auto-matching enabled** in your Xero configuration.

<Info>
  Only payments applied to invoices that originated in Salesbricks are processed. Salesbricks cannot
  reconcile payments for invoices that exist only in Xero.
</Info>

## Configuration

From **Settings** -> **Integrations** -> **Xero**, open the actions menu on the Xero card and choose **Update config**.

### Xero configuration

| Setting                        | What it does                                                                                                                                                     |
| ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Revenue account**            | The chart-of-accounts revenue account invoice lines post to when a line has no specific account mapping.                                                         |
| **Payment / bank account**     | The bank or clearing account every synced payment posts to. Required, since Xero will not accept a payment without an account.                                   |
| **Revenue tax type**           | The Xero tax type applied to sales lines, for example `OUTPUT`. Only sales (output) rates are valid on revenue. Leave it unset to keep revenue lines tax-exempt. |
| **Enable tracking categories** | Tags invoice lines with the order's account representative as a tracking option.                                                                                 |
| **Tracking category name**     | The Xero tracking category the account representative option is created under. Categories are created in Xero, which allows a maximum of two active categories.  |

<Note>
  Tracking category names are pick-only. Set the category up in Xero first, then select it here.
</Note>

### Sync settings

| Setting                         | What it does                                                                  |
| ------------------------------- | ----------------------------------------------------------------------------- |
| **Auto-create customers**       | Creates a Xero contact when a Salesbricks customer doesn't exist in Xero yet. |
| **Auto-create invoices**        | Creates new invoices in Xero.                                                 |
| **Auto-create payments**        | Creates new payments in Xero.                                                 |
| **Auto-create default account** | Creates a default account in Xero for unmapped items.                         |

### Payment matching

| Setting                   | What it does                                                                                           |
| ------------------------- | ------------------------------------------------------------------------------------------------------ |
| **Auto-matching enabled** | Automatically matches payments recorded in Xero back to the corresponding unpaid Salesbricks invoices. |

### Invoice options

| Setting                        | What it does                                                                                      |
| ------------------------------ | ------------------------------------------------------------------------------------------------- |
| **Override invoice number**    | Uses Salesbricks invoice numbers instead of Xero's auto-generated numbers.                        |
| **Override invoice sales tax** | Uses the sales tax Salesbricks calculated instead of Xero's own tax calculation.                  |
| **Sync muted invoices**        | When off, invoices excluded from Salesbricks invoice and collections emails are not sent to Xero. |

### Line item settings

| Setting                             | What it does                                                                                                                                                            |
| ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Auto-populate missing SKU codes** | When a brick or plan has no SKU code, Salesbricks reuses a same-named Xero item (or creates one) and saves that code back, so future syncs map the line to a Xero item. |

<Info>
  Need invoice lines to post to different revenue accounts per plan or brick? Reach out to
  Salesbricks Support to set up per-item account mappings.
</Info>

## Controlling what syncs

<AccordionGroup>
  <Accordion title="Skip an entire order">
    When closing an order, check **Don't sync invoices for this order to the finance system**. None of that order's invoices will be pushed to Xero.
  </Accordion>

  <Accordion title="Turn off sync for a single invoice">
    On the invoice's billing statement page, open the actions menu and choose **Disable syncing**. The invoice will no longer be pushed to Xero, existing data in Xero is unchanged, and you can re-enable it later from the same menu.
  </Accordion>

  <Accordion title="Sync an invoice on demand">
    On the invoice's billing statement page, choose **Sync transactions to finance system** to push the invoice and its payments and adjustments to Xero immediately. This also overrides the **Sync muted invoices** setting for that run.
  </Accordion>
</AccordionGroup>


## Related topics

- [Overview](/integrations/stripe/overview.md)
