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

# How syncing works

> When Ledgitify pulls data from Xero, what it pulls, and how to trigger a sync yourself.

Once connected, Ledgitify keeps a cached copy of the transactions it needs so your reports load
instantly and Xero's API limits are respected. Here's how that cache stays current.

## When syncs happen

<CardGroup cols={3}>
  <Card title="On connect" icon="plug">
    Your first sync runs automatically as soon as you connect Xero.
  </Card>

  <Card title="Nightly" icon="moon">
    Automatic overnight sync on **Professional** and **Unlimited** plans.
  </Card>

  <Card title="Near real-time" icon="bolt">
    When an invoice or contact changes in Xero, a webhook triggers a sync within minutes.
  </Card>
</CardGroup>

You can also **sync on demand** at any time (all plans that have Xero connected): open
**Settings → Xero** and choose **Sync now**.

| Plan         | Manual sync | Nightly auto-sync | Post-sync email |
| ------------ | :---------: | :---------------: | :-------------: |
| Starter      |     Yes     |         —         |        —        |
| Professional |     Yes     |        Yes        |        —        |
| Unlimited    |     Yes     |        Yes        |       Yes       |

## What gets synced

* Bank transactions (spend and receive)
* Bills and sales invoices
* Manual journals
* Contacts (as payee/supplier labels on transactions)

Only **authorised / reconciled** items are pulled. A bank line you haven't reconciled in Xero yet
won't appear until you reconcile it.

<Note>
  **Sync horizon.** Ledgitify syncs from the start date of your oldest active project, so it doesn't
  pull years of irrelevant history. If you later add a project with an earlier start date, the next
  sync automatically backfills the gap.
</Note>

## Incremental vs. full resync

* **Sync now** is *incremental*: it fetches only what changed in Xero since the last sync. Fast, and
  safe to run often.
* **Full resync** re-scans your Xero history from the sync horizon. Use it if you think something is
  missing. It's limited to once per hour to stay well within Xero's daily API limits.

## Checking sync status and history

**Settings → Xero** shows your last sync and any error. For the full picture, open
**Settings → Sync history** to see the last 50 runs with their status, how many transactions were
added or updated, and any errors from that run.

## Changes and deletions in Xero

* If a transaction you've already **allocated** is later **edited** in Xero, Ledgitify flags it as
  **needs review** so you can re-check your allocation rather than silently changing your report.
* If a transaction is **voided or deleted** in Xero, Ledgitify flags an allocated one for review, or
  quietly excludes an un-allocated one.

## Reliability

Ledgitify handles Xero rate limits and transient errors automatically, retrying with a back-off, so
a brief hiccup won't fail your whole sync. If one type of record fails, the others still sync, and
the error is recorded against that run in your sync history.
