Skip to content

Accounting-package sync

Not yet shipped

Bidirectional accounting-package sync is in progress as of v0.6: the Xero OAuth connect/callback/status/trigger API surface exists (Enterprise-tier, feature-flag gated), and the database schema supports external IDs (external_id, external_source, external_etag, external_payload) on bills, invoices, credit notes, and payments. The full sync worker and UI are still being built. Don't treat this page as a deployment guide — it describes what's being designed.

The problem

Most small businesses switching to SAE Books have an accountant or bookkeeper who works in Xero, MYOB, or QBO. That person won't switch tools. Without a sync story, the customer is stuck: use SAE Books for daily ops and manually re-enter everything into the accountant's package, or don't switch at all.

The answer is bidirectional sync: customer keeps daily ops in SAE Books, accountant keeps seeing clean records in their package, the two stay in step.

What syncs

Object SAE Books → external External → SAE Books
Chart of accounts read-only on connect (never push) yes — new accounts discovered during sync
Contacts (customers + vendors) yes yes
Invoices yes yes
Bills yes yes
Payments yes yes
Credit notes yes yes
Journal entries push only accountant adjustments come back as journals on the SAE Books side
Bank statement lines no no — different concept; stays in SAE Books
Inventory items no (not in scope) no
Fixed assets no (not in scope) no
Payroll no — handled by STP no

Provider roadmap

Provider Status Notes
Xero Planned Xero v2 OAuth, clean API surface, good international coverage. Intended as the first adapter.
MYOB Planned AccountRight-Live API; messier auth than Xero. High priority because it's the dominant AU accountant tool.
QBO Planned Mapping work partially done (one-shot QBO migration CSV import exists at Pro tier); sync reuses the object shapes.

Architecture

Sync will be an Enterprise feature, gated by per-provider feature flags. It is designed to run as a separate worker process that calls the SAE Books API over HTTP — the same interface a third-party integration would use. The specific flag names and worker name are not yet finalised.

flowchart LR XERO[Xero / MYOB / QBO] SYNC["saebooks-sync worker
(Enterprise)"] API["saebooks-api
REST API"] PG[("Postgres")] XERO -->|"OAuth pull"| SYNC SYNC -->|"REST writes"| API API -->|"webhook push"| SYNC API --- PG

Conflict resolution: last-write-wins with audit trail. A sync_state table records (tenant, provider, external_id, last_pulled_etag) per synced object so divergence is detectable. Conflicts surface to the operator in a UI rather than silently picking a winner.

Hard-delete and sync: when sync is active for a tenant, the hard-delete path is blocked for synced object types (invoices, bills, payments, contacts, credit notes). Deletions are pushed as voids (VOIDED status in Xero; warn-only for MYOB which doesn't support server-side delete). The UI surfaces a warning when enabling sync that hard-delete becomes unavailable.

OAuth: each customer registers their own OAuth app with Xero/MYOB/QBO and supplies their own client_id + client_secret. SAE Engineering does not ship a shared credential. One Xero login can connect multiple Xero organisations — the unique key is (tenant, provider, external_tenant_id).

Enabling sync (Enterprise)

Once shipped, sync is enabled in the web UI under Settings → Integrations. The setup flow:

  1. Select provider (Xero, MYOB, or QBO).
  2. Enter your OAuth client_id and client_secret.
  3. Authorise the OAuth connection (browser redirect to the provider).
  4. Confirm the accounts mapping (SAE Books accounts ↔ provider accounts).
  5. Run the initial pull (one-shot historical sync from your connect date).
  6. Ongoing sync runs on a configurable schedule (default: every 15 minutes).

What sync doesn't solve

Sync is not a migration tool. For an initial migration from Xero or MYOB with historical data, see Migrate from Xero / MYOB.

Sync also doesn't eliminate the need to understand both systems. Accounts mapping, tax code matching, and contact deduplication require a one-time setup pass by someone who knows both ledgers.