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

# Setup & Troubleshooting

> Connect your Xero organization to Salesbricks, manage the connection, and resolve syncs that were skipped.

## Setup

<Card title="Take me there" icon="rocket-launch" href="https://app.salesbricks.com/admin/settings/integrations">
  [https://app.salesbricks.com/admin/settings/integrations](https://app.salesbricks.com/admin/settings/integrations)
</Card>

<Steps>
  <Step title="Open your integration settings">
    In Salesbricks, navigate to **Settings** -> **Integrations** and find the **Finance / ERP** section.
  </Step>

  <Step title="Choose Xero">
    Click **Connect** on the Xero option. This opens the Xero integration page.

    If the option shows **Contact us** instead, Xero hasn't been enabled for your account yet. Reach out to Salesbricks Support to have it turned on.
  </Step>

  <Step title="Start the connection">
    Click **Connect to Xero**. You'll be redirected to Xero to sign in.
  </Step>

  <Step title="Authorize Salesbricks in Xero">
    Sign in and allow access to the organization you want to sync.

    Salesbricks uses an OAuth connection to Xero, so your username and password are never stored by Salesbricks. The connection requests access to your contacts, invoices, payments, and organization settings.

    <Warning>
      Grant access to a **single** Xero organization. Salesbricks maps one Xero organization to one Salesbricks account, and the connection will fail if the authorized user grants access to more than one org.
    </Warning>
  </Step>

  <Step title="Confirm the connection">
    You'll land back on the Xero page in Salesbricks with an **Active** tag. Your integration is complete.
  </Step>
</Steps>

### What Salesbricks configures for you

The first time you connect, Salesbricks reads your Xero chart of accounts and seeds a working configuration so invoices sync without any manual setup:

| Setting                                  | Seeded value                                                                                |
| ---------------------------------------- | ------------------------------------------------------------------------------------------- |
| Revenue account                          | Your lowest-numbered active revenue account                                                 |
| Payment / bank account                   | Your lowest-numbered active bank account                                                    |
| Override invoice number                  | On, so Xero shows your Salesbricks invoice numbers instead of its own `INV-` sequence       |
| Override invoice sales tax               | On, so Salesbricks pushes its exact per-line tax rather than letting Xero calculate its own |
| Credit notes for credits and adjustments | On, so non-cash credits post as Xero credit notes instead of payments                       |
| Revenue tax type                         | Left unset, which keeps revenue lines tax-exempt until you choose a tax type                |

<Info>
  These defaults are only applied on a first-time setup. Reconnecting later never overwrites choices
  you've made.
</Info>

Next, review [what syncs to Xero and how to configure it](/integrations/xero/overview).

## Managing the connection

Open the actions menu on the Xero card in **Settings** -> **Integrations** -> **Xero**:

| Action                                   | What it does                                                                                      |
| ---------------------------------------- | ------------------------------------------------------------------------------------------------- |
| **Update config**                        | Opens the [integration settings](/integrations/xero/overview#configuration).                      |
| **Disable syncing** / **Enable syncing** | Pauses or resumes all syncing without removing the connection. Data already in Xero is unchanged. |
| **Remove connection**                    | Disconnects Xero and clears the stored configuration.                                             |

Choose **View logs** on the Xero card in the integrations list to see every sync attempt, including anything that was skipped and why.

## Troubleshooting

Start with **View sync logs** on the invoice, or **View logs** on the Xero card in your integration settings. Skipped syncs are recorded there with the reason.

<AccordionGroup>
  <Accordion title="Invoice not synced">
    | Potential cause                                                                                       | Resolution                                                                                                                                                                               |
    | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | *No revenue account could be resolved for a line.*                                                    | Set a [Revenue account](/integrations/xero/overview#xero-configuration) in your Xero configuration, or ask Salesbricks Support to add a per-item account mapping.                        |
    | *The customer hasn't synced to Xero yet.*                                                             | The contact syncs first. Retry the sync, or check the logs for a contact sync failure.                                                                                                   |
    | *The invoice is muted and [Sync muted invoices](/integrations/xero/overview#invoice-options) is off.* | Unmute the invoice, turn the setting on, or sync the invoice manually from its billing statement page.                                                                                   |
    | *Sync was disabled for the order or the invoice.*                                                     | Re-enable syncing from the invoice's actions menu.                                                                                                                                       |
    | ***Override invoice sales tax** is on but no taxable tax type could be resolved for a taxed line.*    | Set a [Revenue tax type](/integrations/xero/overview#xero-configuration) in your Xero configuration, or reconnect the integration so Salesbricks can create a matching tax rate in Xero. |
  </Accordion>

  <Accordion title="Payment not synced">
    | Potential cause                                                             | Resolution                                                                                                                                            |
    | --------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
    | *The invoice hasn't been synced to Xero yet.*                               | Payments attach to a synced invoice. Resolve the invoice sync first, then re-sync.                                                                    |
    | *No payment / bank account is configured.*                                  | Set a [Payment / bank account](/integrations/xero/overview#xero-configuration) in your Xero configuration. Xero requires an account on every payment. |
    | *The payment was fully refunded before it synced.*                          | Expected. There is nothing left to allocate.                                                                                                          |
    | *The payment in Xero is for an invoice that does not exist in Salesbricks.* | None. Salesbricks cannot reconcile payments for invoices outside the platform.                                                                        |
  </Accordion>

  <Accordion title="Line items aren't mapped to Xero items">
    | Potential cause                              | Resolution                                                                                                                                                              |
    | -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | *The brick or plan has no SKU code.*         | Add a code in your catalog, or turn on [Auto-populate missing SKU codes](/integrations/xero/overview#line-item-settings) so Salesbricks resolves and saves one for you. |
    | *The SKU code is longer than 30 characters.* | Xero caps item codes at 30 characters. Shorten the code in your Salesbricks catalog.                                                                                    |
  </Accordion>

  <Accordion title="Tracking categories aren't applied">
    | Potential cause                                             | Resolution                                                                                                                  |
    | ----------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
    | *Tracking categories are off, or no category is selected.*  | Turn on [Enable tracking categories](/integrations/xero/overview#xero-configuration) and pick a **Tracking category name**. |
    | *Your Xero org already has two active tracking categories.* | Xero allows a maximum of two. Archive one in Xero, or select one of the existing categories.                                |
    | *The order has no account representative.*                  | Assign an owner to the order. Lines sync untagged when there is no owner.                                                   |
  </Accordion>
</AccordionGroup>


## Related topics

- [Setup](/integrations/stripe/setup.md)
- [Setup a payment method](/api-reference/payment-methods/setup-a-payment-method.md)
- [OIN Configuration Setup](/integrations/okta/oin-configuration.md)
