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

# Xero

## Connect to Xero

1. Click on the drop-up menu at the bottom of the left sidebar.
2. Click on the **Settings** option on the drop-up menu.
3. On the **Settings** page, move to the **Connectors** tab.
4. Click on **ERP** filter to access the Xero connector. Alternatively, you may use the search box to search for Xero.
5. Click on the **Connect** button on the Xero card, and login to Xero, as shown in Fig. 1:

<Image alt="Fig. 1: ERP connectors" align="center" border={true} src="https://files.readme.io/0ee3973b8c4d08a998a5ebbd09d3c9d5b526c6e1f0cf77657002cea3535099de-output.gif">
  Fig. 1: Connect Zenskar to your Xero account.
</Image>

6. Once the login is completed, you must allow Zenskar access to your Xero account, as shown below.

<Image alt="Fig. 2: Allow Zenskar access to your Xero account." align="center" border={true} src="https://files.readme.io/0ecec08f09462c5b763ed50e334e4d130d7f378c12ee73b9e10a298b5127a2b0-Screenshot_from_2024-10-15_15-44-32.png">
  Fig. 2: Allow Zenskar access to your Xero account.
</Image>

7. Once you allow Zenskar access to your Xero account, you will be redirected to the following page.

<Image align="center" className="border" border={true} src="https://files.readme.io/04a26761700e04030bc16d2741f8696d6e1525405934b4ffbad407386f3f136b-Screenshot_from_2024-10-15_15-42-45.png" />

## Account Mapping

The account mapping will be as shown in Fig. 2:

<Image alt="Fig. 2: Zenskar and Xero mapping" align="center" border={true} src="https://files.readme.io/e7e3b10-xero-account-mapping.png">
  Fig. 2: Zenskar and Xero mapping
</Image>

Each Zenskar account must be mapped with an account on Xero, as shown in Fig. 3. The dropdown shows all the non-system accounts present on Xero i.e., accounts for which journal entry creation is possible. You can select an appropriate account:

<Image alt="Fig. 3: Zenskar and Xero mapping" align="center" src="https://files.readme.io/aff07fc-xero-configure-columns.png">
  Fig. 3: Zenskar and Xero mapping
</Image>

If you find that the accounts listed are inappropriate, you can create a new account by checking the **Create Account** checkbox beside the dropdown. An account creation window shall appear, as shown in Fig.4:

<Image alt="Fig. 4: New Xero account creation window" align="center" src="https://files.readme.io/c61d7ed-xero-new-account-creation-window.png">
  Fig. 4: New Xero account creation window
</Image>

* Enter a name in the **Name** field.
* Select an account type in the **Account Type** dropdown. The dropdown contains all account types supported by Xero.
* Click on **ADD**. You have successfully configured Xero.

## How Zenskar journal entries look on Xero

Xero does not allow you to create entries with line amount equal to zero. Therefore, entries created with line amount zero such as **Free units** are not synced with Xero.

The actual Accounts Receivable and other system accounts cannot be used to create Journals. This is a known limitation of Xero. Therefore, you should map the Zenskar Accounts Receivable with something similar in Xero. For example, you can use the **Create Account** checkbox to create a new account with similar name in Xero.

### Example 1: When credits are issued to a Customer

![](https://files.readme.io/657b505-image.png)

System account names for these entries are:

* **Customer Wallet**: 4a003f19-ae13-4fe2-b7bb-98666a8abcd
* **Expenses**: **Sales Returns and Allowances**: 4a003f19-ae13-4fe2-b7bb-98666a8abcd

### Example 2: When an invoice is approved

![](https://files.readme.io/48e29cd-image.png)

System account names for these entries are:

* **Revenue**: **Storage - Volume Pricing**: 4d24700c-29de-4351-aa5a-965e3334abcd
* **Revenue**: **SQS - Per Unit Pricing**: 4d24700c-29de-4351-aa5a-965e3334abcd
* **Assets**: **Accounts Receivable**: 4d24700c-29de-4351-aa5a-965e3334abcd

### Example 3: When a payment is made

![](https://files.readme.io/a51eaa1-image.png)

System account names for these entries were:\
**Assets**: **Cash**: 4d24700c-29de-4351-aa5a-965e3334abcd\
**Assets**: **Accounts Receivable**: 4d24700c-29de-4351-aa5a-965e3334abcd

Usually the last element in the system account name is customer Id. Therefore it is ignored. All the accounts visible in the entries are created according to the mapping. The customer visible in the description is also created on Xero if it is not already present.
