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

# Xero

Xero is an accounting ERP. The connection is one way, from Zenskar to Xero only. A connection binds to exactly one Xero organisation, so an organisation with multiple entities needs one connection per Xero organisation.

## Connect Xero

### Prerequisites

* A Xero organisation, and a user who can authorize a connected app for it.
* A chart of accounts already set up in Xero. The connector references accounts by their code and does not create them, except where auto-create is explicitly available for journal entry accounts. Have ready: a sales or revenue account, a tax account, a discount account, a credit note account, and a payment account.
* For multi-currency billing, the currencies you bill in must already be enabled on the Xero organisation. Xero rejects a record in a currency the organisation has not enabled.

> [!WARNING]
>
> The Xero organisation you authorize is fixed to this connection. If you reconnect later, you must authorize the same organisation; authorizing a different one is rejected.

### Steps

1. In Zenskar, go to **More > Integrations > ERP**, find the **Xero** card, and click **Connect**.

   ![Integrations page, ERP category, Xero card with the Connect button](https://assets.zenskar.com/20240301/erps-xero-connector-card.png)

2. On the Xero page, click **Connect to Xero**, then click **Connect** in the confirmation dialog. You are redirected to Xero.

   ![Xero overview page in Zenskar, with the Connect to Xero button](https://assets.zenskar.com/20240301/erps-xero-connector-overview.png)

3. Log in to Xero, and choose which Xero organisation to authorize.

4. Zenskar redirects you back to the **Configuration** screen.

## Configure the connection

1. Under **Select Zenskar Entity**, select the entity this connection belongs to. This is required. **Save Configuration** stays disabled until you select one, and you cannot change it after saving.
2. Under **Data Sync Setup**, choose a sync mode. Only one mode can be active per connection:

   | Mode | What it does |
   | :- | :- |
   | **Object Sync** | Syncs Customers, Invoices, Payments, and Credit Notes directly with Xero. Journal entries are left to Xero's own accounting. |
   | **Journal Entries Sync** | Syncs Customers, and pushes journal entries, for example revenue recognition postings, directly to Xero, instead of syncing objects. |

   > [!NOTE]
   >
   > Switching from one mode to the other clears the configuration already set under the mode you are leaving.

### If you choose Object Sync

Enable the objects to sync:

| Module | Sync direction | What it syncs |
| :- | :- | :- |
| **Customers** | Export only | Zenskar customers, to Xero. |
| **Invoices** | Export only | Approved Zenskar invoices, to Xero. |
| **Credit Notes** | Export only | Zenskar credit notes, to Xero. |
| **Payments** | Export only | Zenskar payments, to Xero. |

For each module with account mapping, none of the accounts below have a default or recommended value, and each must already exist in Xero:

| Setting | Applies to | What it does |
| :- | :- | :- |
| **Sales Account for Invoices** | Invoices | Required. |
| **Tax Account for Invoices** | Invoices | Required. |
| **Discount Account for Invoices** | Invoices | Required. |
| **Tax Code Mappings** | Invoices | Maps each Zenskar tax code to a Xero tax rate, for example a `GST_8.25` code at an 8.25% rate to a matching Xero tax type. Required if the Invoices module is enabled. |
| **Sales Account for Credit Notes** | Credit Notes | Required. |
| **Sales Account for Payments** | Payments | Required. |

![Object Sync selected, with Customers, Invoices, Credit Notes, and Payments modules configured](https://assets.zenskar.com/20240301/erps-xero-object-sync.png)

> [!NOTE]
>
> Customers referenced by an invoice sync to Xero during invoice sync, even if the Customers module is turned off.

### If you choose Journal Entries Sync

Enable **Journal Entries**, then map each account under **Journal Accounts Mapping** to a Xero account.

> [!NOTE]
>
> The accounts listed on the Zenskar side come from your own **Settings > Accounting > Chart of Accounts**, not from Xero. Add, rename, or remove an account there to change what appears here. None of these have a default Xero account mapped to them.

![Journal Entries Sync selected, with Journal Accounts Mapping showing Zenskar accounts mapped to Xero accounts](https://assets.zenskar.com/20240301/erps-xero-journal-accounts-mapping.png)

> [!WARNING]
>
> Xero's own bank and system accounts, including the real Accounts Receivable account, cannot be posted to by a journal entry. Map each Zenskar account to a comparable account you create in Xero instead, not to Xero's built-in equivalent.

Click **Save Configuration**. The connection shows as **Configured** on the Xero **Connections** tab.

![Xero Connections tab showing the Account ID, Connected Entity, and Configured status](https://assets.zenskar.com/20240301/erps-xero-connection-configured.png)

## Features

| Feature | What it does |
| :- | :- |
| **Invoices and credit notes post live** | Invoices and credit notes are created in Xero as **Authorised**, not Draft. They are live in Xero immediately on sync. |
| **Journal entries post as Draft** | Unlike invoices and credit notes, journal entries post to Xero as **Draft**, for review before they take effect. |
| **Tax distribution** | Zenskar distributes an invoice's tax across its lines so the total matches Zenskar exactly, instead of relying on Xero's own per-line tax rounding. |
| **Product and item mapping** | Zenskar reuses a mapped Xero item for a product if one exists, otherwise it creates one. Items are matched by mapping or by exact name, never by partial match. |

## Reference

### Known limitations

* Xero rejects a journal entry with an account line amount of zero. A line with a zero amount is skipped. If every line in an entry is zero, the whole entry is rejected.
* Xero does not allow a journal entry to post against its own system or bank accounts, including the real Accounts Receivable account. Map the equivalent Zenskar account to a comparable account you create in Xero instead.
* A credit note syncs to Xero as a single line, with tax as a flat amount. It does not carry a per-line breakdown or per-line tax the way an invoice does.
* An invoice or credit note cannot be re-synced once it has posted to Xero. To correct it, edit it directly in Xero. Journal entries are the exception: Zenskar can update a journal entry it already posted.
* Xero customers are matched by exact name, not by email. Two Zenskar customers with the same name risk being treated as the same Xero contact.
* An invoice line with no resolvable sales account, or a taxed line with no resolvable tax rate, fails the sync rather than posting without the missing value.
* Xero tracking categories are limited to two active categories at a time. This is a Xero platform limit, not a Zenskar one.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.