# Syncing Invoice Comments to Xero

Source: https://docs.astalty.com.au/guide/integrations/xero-integration/syncing-invoice-comments-to-xero

> Send the comments on your invoices to Xero as history notes.

## Overview

[Comments on an invoice](https://docs.astalty.com.au/guide/finance/invoicing/invoices/commenting-on-invoices) record context that is not on the invoice itself, such as a disputed travel charge or a payment arrangement. By default that context stays in Astalty.

Turn on **Sync invoice comments** and each eligible invoice comment is added to the matching Xero invoice as a history note.

> **Sent notes are not changed from Astalty**
>
> Once Astalty adds a history note, its workflow does not update or remove that note. Editing or deleting the comment in Astalty afterwards has **no effect** on the copy already sent. Treat syncing as a one-way, one-time push and use Xero's current controls if the external record needs review.

## Turning it On

The setting is off until you enable it.

1. Open [**Settings > Integrations > Xero**](https://app.astalty.com.au/settings/integrations/xero).
2. On the **Xero Integration Settings** card, click **Edit**.
3. Tick **Sync invoice comments**.
4. Click **Update**.

![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)

The checkbox is in the first group of settings, below **Sync invoices automatically** and, when Leave is enabled, **Sync leave automatically**. It is not under **More**.

> **Turning it on doesn't backfill on its own**
>
> Enabling the setting does not immediately push existing comments.
>
> Pending comments are considered the next time that invoice is pushed to Xero or another comment is added to an invoice already in Xero. At that point, every unsynced eligible comment on the invoice is sent, including older ones. Review existing comments before enabling the setting if that matters to your workflow.

## Only Invoice Comments Sync

This setting applies to comments on **individual invoices** only.

- [Invoice comments](https://docs.astalty.com.au/guide/finance/invoicing/invoices/commenting-on-invoices) - can sync to Xero as notes on the matching Xero invoice.
- [Invoice batch comments](https://docs.astalty.com.au/guide/finance/invoicing/invoice-batches/commenting-on-invoice-batches) - never sync and stay in Astalty.

## When Comments Are Sent

Invoices are created when a batch is finalised. A draft batch holds charges rather than invoices, so invoice comments begin after finalisation.

From there, when a comment reaches Xero depends on whether its invoice has made it to Xero yet.

- **The invoice is already in Xero.** Saving a new comment queues it for Xero. You do not need to sync the batch again.
- **The invoice is not in Xero yet.** The comment waits and is included when the invoice batch syncs. If automatic invoice sync is off, use **Actions > Sync with accounting** on the finalised batch.

With **Sync invoices automatically** on, finalising the batch queues its invoice sync. Comments added while the invoice is still waiting are picked up after the invoice reaches Xero.

> **You can comment after a batch has synced**
>
> Adding a comment to an invoice that has already reached Xero still queues the Xero note. A synced batch does not need to be synced again.
>
> The comment list updates when the note succeeds or fails.

> **When the drawer says a comment won't be added**
>
> If the comment drawer says *This comment won't be added to your accounting platform*, the comment stays in Astalty only. See [Comments That Won't Sync](#comments-that-wont-sync).

### The Sync Confirmation

When you sync a batch manually, the **Sync with your accounting platform** confirmation tells you how many comments are pending:

![The Sync with your accounting platform confirmation over an invoice batch. It says the invoices will be sent to your accounting platform, 12 invoice comments will also be added as notes on their invoices, and notes added to your accounting platform cannot be edited or removed, with Cancel and Sync buttons.](https://docs.astalty.com.au/assets/xero-sync-invoice-comments-confirmation.jpg)

> The invoices in this batch will be sent to your accounting platform.
>
> 12 invoice comments will also be added as notes on their invoices.
>
> Notes added to your accounting platform can't be edited or removed.

The comment line appears only when at least one comment is pending. It excludes comments already marked as synced.

After the batch has synced, later eligible comments are queued on their own.

## What the Note Looks Like in Xero

In Xero, open the invoice and expand **History & Notes**. Each synced comment appears as a separate history note.

![A Xero invoice with the History and notes section expanded, listing three System Generated entries with the action Note. Each note's detail starts with the comment author's name followed by the comment text.](https://docs.astalty.com.au/assets/xero-sync-invoice-comments-history-notes.jpg)

The note text starts with the comment author's name, followed by the comment. For example: *Sarah Whitfield: Resent after the original bounced.*

> **Formatting is not carried across**
>
> Xero history notes are plain text. Astalty removes formatting and flattens line breaks. It limits the final note, including the author's name and truncation marker, to 2,500 characters.
>
> If a comment needs to read well in Xero, keep it short and write it as a sentence rather than a formatted list.

## Checking a Comment Reached Xero

You don't have to open Xero to know whether a note landed. In the invoice's **Comments** list, each comment carries a small icon beside its timestamp once Astalty has tried to send it:

- A **green tick** - the comment is in Xero. Hover it to see *Added to your accounting platform*.
- A **yellow warning triangle** - the attempt failed. Hover it to see the recorded reason.
- **No icon** - the comment has not been sent. It may be waiting for its invoice to sync, or it may be ineligible.

The icons appear on their own as notes land, so you don't need to refresh the invoice while a batch is syncing.

## Editing and Deleting After Syncing

Astalty and Xero keep separate copies once a comment has synced.

When you edit a comment that has already gone to Xero, the drawer warns you:

![The Edit Comment drawer for invoice I-90011-90026, with a yellow warning at the top saying the comment was added to your accounting platform and editing it here won't change the note there, above the comment text and the Save Comment button.](https://docs.astalty.com.au/assets/xero-sync-invoice-comments-edit-warning.jpg)

> This comment was added to your accounting platform. Editing it here won't change the note there.

Deleting shows the equivalent warning: *This comment was added to your accounting platform. Deleting it here won't remove the note there.* The comment disappears from Astalty, but the note stays in Xero.

An edited comment is **not** re-sent, either. Xero keeps the wording as it was at the moment the note was created.

## Comments That Won't Sync

Even with the setting on, a comment is skipped when:

- **The invoice never reached Xero and no longer can.** Comments follow the invoice. If an invoice isn't in Xero and its batch has already been through a sync, there is nothing left to attach a note to.
- **The invoice is NDIA managed** and you haven't enabled *Send NDIA invoices*. See [Send NDIA Invoices](https://docs.astalty.com.au/guide/integrations/xero-integration/configuring-the-integration#send-ndia-invoices).
- **The invoice has been voided.** See [Voiding Invoices](https://docs.astalty.com.au/guide/finance/invoicing/invoices/voiding).
- **The comment has no text** - for example, a comment containing only an image or empty formatting.
- **It's a batch comment**, which never syncs.
- **The Xero connection is not usable** - the connection has been disconnected or expired, or no **Default Sales Account** is set. See [Connecting and Disconnecting](https://docs.astalty.com.au/guide/integrations/xero-integration/connecting-and-disconnecting).

Comments are never sent twice. If an invoice is pushed again, comments already in Xero are skipped rather than duplicated.

> **If a note fails to reach Xero**
>
> A note can fail without failing the invoice or batch. The comment shows a **warning triangle** with the recorded reason.
>
> Astalty retries transient failures for up to six hours. An unsynced comment can be attempted again the next time comments are pushed for that invoice. There is no manual comment retry button.

## Related Guides

- [Commenting on Invoices](https://docs.astalty.com.au/guide/finance/invoicing/invoices/commenting-on-invoices) - how to add, read, edit, and delete invoice comments.
- [Commenting on Invoice Batches](https://docs.astalty.com.au/guide/finance/invoicing/invoice-batches/commenting-on-invoice-batches) - internal notes on an invoicing run.
- [Configuring the Integration](https://docs.astalty.com.au/guide/integrations/xero-integration/configuring-the-integration) - the other Xero integration settings.
- [Sync With Xero](https://docs.astalty.com.au/guide/integrations/xero-integration/sync-payments-with-xero) - manually syncing batches and payments.
