# Configuring the Integration

Source: https://docs.astalty.com.au/guide/integrations/xero-integration/configuring-the-integration

> Set up a valid Xero configuration so the integration works correctly.

## Configuration

Open **Settings > Integrations > Xero**.

![The Xero Integration Settings page, with Overview selected in the menu on the left above Charge Items, Pay Groups, Custom Allowances, Employees, Payroll Calendars, Manage Timesheets and Leave Types. The card has Actions and Edit buttons, a warning to configure a Default Sales Account before the Xero integration will sync invoices, and the connected organisation Demo Company (AU).](https://docs.astalty.com.au/assets/xero-configuration.png)

Click **Edit** on the **Xero Integration Settings** card.

#### Default Sales Account

This is the income account Astalty uses when a Charge Item has no separate Xero sales account mapping. A default is required even if every active Charge Item has its own mapping. Invoice batches do not sync while it is missing.

The list contains your active **Revenue**, **Sales**, and **Other Income** accounts from Xero. Archived accounts are not offered. If an account was archived or removed after you selected it, its code remains visible with an **Inactive** badge. Choose an active account before syncing another batch, because Xero will reject an invoice line that uses the inactive code.

#### New Invoice Status

Choose how new Xero invoices are created: **Draft**, **Awaiting Approval**, or **Approved**. The default is **Draft**. A payment cannot be recorded against a draft invoice, so approve it in Xero before reconciling a payment.

#### Sync Invoices Automatically

This setting is on by default. When it is on, finalising an invoice batch queues the eligible invoices for Xero. When it is off, the finalised batch stays pending until you choose **Actions > Sync with accounting**. A failed batch can also be queued again from that action. The sync runs in the background and can retry for transient Xero failures.

#### Sync Invoice Comments to Xero

Tick **Sync invoice comments** to add comments on individual invoices to the matching Xero invoice as history notes. It is off by default. Comments waiting on an unsynced invoice are included after the invoice sync; later comments are queued separately. Invoice batch comments never sync. See [Syncing Invoice Comments to Xero](https://docs.astalty.com.au/guide/integrations/xero-integration/syncing-invoice-comments-to-xero).

![The Update Xero Integration Settings drawer, with the Sync invoice comments checkbox ticked and highlighted below Sync invoices automatically and Sync leave automatically, above More and the Update button.](https://docs.astalty.com.au/assets/xero-sync-invoice-comments-setting-guide.jpg)

## Advanced Settings

On the [Xero settings page](https://app.astalty.com.au/settings/integrations/xero), click **Edit**, then expand **More**.

### Changing the Invoice Contact

Choose whether Astalty creates each plan managed Xero invoice against the **Plan Manager** or the **Participant** contact. **Plan Manager** is the default and recommended option. This setting changes the Xero contact; it does not change the invoice email recipient in Astalty.

![The Update Xero Integration Settings drawer with More expanded. An arrow points to the Who should we use to create invoices for Plan Managed invoices? dropdown, and its Participant and Plan Manager options are highlighted, with Plan Manager selected.](https://docs.astalty.com.au/assets/xero-settings-1a.png)

### Send NDIA Invoices

**Send NDIA invoices** sends NDIA managed invoices to Xero alongside your plan and self managed ones. It is off by default, and Astalty recommends leaving it off.

With it off, NDIA managed invoices never reach Xero. You reconcile the NDIA batch in Astalty against the receipt file, which tells you how much the NDIA paid, and record that total in Xero as a single [Receive Money](https://central.xero.com/s/article/Add-a-receive-money-transaction) transaction. See [Reconciling NDIA Payments](https://docs.astalty.com.au/guide/finance/payments/reconciling-ndia).

![The Update Xero Integration Settings drawer with More expanded and the NDIA section highlighted: a note saying Astalty does not recommend changing this setting, and the Send NDIA invoices checkbox unticked, with an arrow pointing to it.](https://docs.astalty.com.au/assets/xero-settings-2a.png)

#### Why NDIA Invoices Are Kept Out of Xero

Astalty reconciles NDIA claims line by line from the receipt file, which is the only thing that matches how the NDIA actually pays:

- **The NDIA rejects claims individually.** An invoice can be partly paid, with rejected charges fixed and claimed again later. The invoice in Xero keeps its original total while Astalty reconciles the individual claim results.
- **A claim can remain open**, then be paid in a later deposit, which can split one invoice across receipt files.
- **Payments do not reconcile through Xero for NDIA invoices.** Astalty excludes NDIA invoices from Xero payment pulls regardless of this setting. Payments also never travel from Astalty to Xero. Turning the setting on therefore adds a separate Xero reconciliation step.
- **Every NDIA invoice uses one contact.** Astalty creates them in Xero against a single contact named **NDIA**, so one deposit covering a whole batch has to be split across those invoices manually.

> **Turning it on doesn't backfill**
>
> Only invoices without an accounting identifier are sent. A batch marked as synced is no longer offered by the normal batch sync action. Enabling this option therefore does not add older NDIA invoices to Xero. Contact Astalty Support if an already synced batch needs review.

## Charge Item Settings

Open **Settings > Integrations > Xero > Charge Items**. Active Charge Items are shown by default. Select **Show archived** when you need to review or change the mapping on an archived Charge Item.

Open a Charge Item's action menu and select **Edit**. You can set the following values:

#### Sales Account

Map the Charge Item to an active Revenue, Sales, or Other Income account. This mapping overrides the default sales account for that invoice line.

If the saved account is no longer active in Xero, its code appears with an **Inactive** badge. Replace it before syncing another invoice that uses the Charge Item.

#### Xero Item

Choose a Xero item to include its item code on invoice lines for this Charge Item. Leave it blank when you do not use Xero items for invoicing.

#### Tracking Categories

You can assign a Xero tracking category and option to each Charge Item. A cost code mapping takes priority over this mapping for the first tracking dimension. See [Teams Tracking Categories in Xero](https://docs.astalty.com.au/guide/integrations/xero-integration/teams-tracking-categories-in-xero) for the full precedence rules.
