All integrations

Accounting

Xero Field Sales API Integration

Custom API connection — Xero OAuth client required

SalesPro Hub exposes the customer, submitted-order, inventory and signed-webhook building blocks needed for a custom Xero connection. Your connector must still authenticate with Xero, map contacts and accounting documents, and choose tax and stock policies. SalesPro Hub does not currently claim a native Xero OAuth connector or automatic invoice posting.

Test the field workflow first

Support level: Custom API connection — Xero OAuth client required. The workflow below separates shipped SalesPro Hub capabilities from connector work your implementation must provide.

What this solves

One operational hand-off, with explicit ownership

A typical integration keeps field capture fast and offline-capable while using Xero as the accounting system. Submitted orders are transformed only after validation, and the resulting Xero document number is written back as the external reference for office and field teams.

Available in SalesPro Hub today

  • Read submitted orders with line quantities, prices, discounts and VAT
  • Upsert SalesPro Hub customers against immutable Xero contact IDs
  • Write the Xero document number back to the field order
  • Return fulfilment status through a replay-safe endpoint
  • Use signed order webhooks or reliable polling
  • Publish inventory quantities when Xero-connected stock is authoritative

Custom work and limitations

  • Xero OAuth, tenant consent and token refresh must be implemented by your connector.
  • SalesPro Hub does not automatically create Xero invoices, payments or credit notes.
  • Account codes, tax rates, tracking categories and document policy remain implementation decisions.
Do not buy implementation work until the source of truth, idempotency key, failure owner and reconciliation process are written down.
Xero Accounting API overview

Xero integration evidence

Connect the operating records—not just the brand names

A useful Xero connection needs stable identities, explicit ownership and a visible exception path. These are the SalesPro Hub records the implementation must map and reconcile.

Written and maintained by Paul · Updated 28 July 2026

South African accounts receivable specialist reviewing a submitted field order and draft Xero accounting document beside a warehouse

Transform only approved field demand

The connector should read submitted orders, validate the commercial mapping and create the accounting document selected by finance policy.

Secure Xero OAuth tenant consent and rotating token lifecycle between field sales middleware and cloud accounting

Treat OAuth as an operating lifecycle

Consent, tenant selection, token refresh, revocation and reconnect behaviour belong in the implementation and support runbook.

Field order transformation diagram mapping customer item quantities prices discounts tax and reference into a Xero accounting document

Map the accounting document explicitly

Contact identity, ItemCode, quantities, discounts, tax types, accounts and approval status must be validated rather than inferred.

South African finance manager and integration developer validating Xero tax account code and document approval rules

Keep finance policy outside guesswork

Automatic posting should follow the buyer’s approved tax, account-code, date, due-date and draft-versus-authorised policy.

Retry-safe Xero integration diagram using stable contact and field order identities to create one document and return one accounting reference

Make retries safe before going live

A stable field order identity and stored external result prevent a lost response from becoming a second accounting document.

South African finance and sales operations team reconciling field order totals Xero references fulfilment status and stock ownership

Reconcile the pilot end to end

Compare counts, amounts, tax, customer identity, document references and rejected records before expanding the integration scope.

Architecture and ownership

Design the Xero operating contract before the data flow

A custom Xero connection normally runs as cloud middleware: the buyer authorises the intended Xero organisation, the connector maintains OAuth tokens, and submitted SalesPro Hub orders are transformed into the accounting document approved by finance. The returned Xero identifier and document number are written back so the office and field teams can refer to the same transaction. This design remains custom until consent, token lifecycle and entity mapping are packaged as a supported product adapter.

Xero owns the accounting document, contact identity, account code, TaxType, approval status and official accounting number.

SalesPro Hub owns field order capture, draft state, the source order number and operational fulfilment context.

The implementation chooses whether Xero contacts or SalesPro Hub customers are authoritative for each mutable field.

Stock ownership must be explicit because an accounting item quantity and a warehouse available-to-sell quantity may not mean the same thing.

Security review boundary

OAuth consent must bind the intended Xero organisation and store access and rotating refresh tokens in encrypted server-side storage. Token refresh needs a concurrency lock so two workers do not invalidate each other’s rotated credentials. Scopes should match the selected accounting and contact operations. Logs and support screens must never expose access tokens, refresh tokens or full sensitive payloads.

Failure recovery

Decide what happens when the happy path stops

A useful Xero integration is not defined by one successful demo. It is defined by what remains durable, what can be replayed safely, what must stop, who sees the exception and how both systems are reconciled.

Failure or conflictRequired response
Expired access tokenRefresh once under a lock, persist the rotated refresh token and replay the same idempotent operation.
Contact or ItemCode missingStop the document before posting and expose the mapping exception for finance or master-data correction.
Validation errorTreat invalid TaxType, account, amount or status as a permanent business error, not an endless temporary retry.
Lost create responseReconcile by idempotency key and source reference before considering another document request.
Wrong Xero organisation selectedFail the tenant binding and require an explicit reconnect; never silently switch accounting organisations.

Acceptance plan

Tests to run with the buyer’s real edition and workflow

A sandbox proves API syntax. Production readiness requires representative identities, accounting or CRM rules, failures and reconciliation. Record the result against the exact product edition and adapter release; do not transfer evidence from a different vendor version by assumption.

  • Authorise, expire, refresh, revoke and reconnect the intended Xero organisation.
  • Create test contacts and items with stable IDs, renamed display values and one missing code.
  • Post draft and approved policy variants with discounts, tax and different due dates.
  • Replay identical and conflicting source orders and simulate a lost create response.
  • Reconcile exclusive values, tax, total, ContactID, InvoiceID, document number and source reference.
  • Test Xero rate limiting and an incomplete token-refresh response without losing the durable operation.

Delivery lifecycle

From Xero discovery to a supportable steady state

Treat the connection as a small operational product with owners, release evidence and a lifecycle. These phases stop a promising prototype from becoming an invisible production dependency that only one developer understands.

  1. 1

    Discover the real workflow

    Name the exact Xero product, edition, company or tenant, licensed interface and deployment. Follow one representative customer and order from field capture to its final external state. Record current manual checks, approval points, cut-off times, volumes and the people who resolve errors. Brand-level assumptions are not a technical scope.

  2. 2

    Write the data contract

    List required and optional fields, types, formats, allowed values and stable identities. Declare a source of truth for customers, outlets, products, prices, tax, stock, documents and status. Define create, update, deactivate and delete behaviour separately. Include the idempotency key, cursor or event identity and the external reference returned after a successful commit.

  3. 3

    Build the exception contract

    Classify authentication, rate-limit, connectivity, validation, mapping, conflict and external-service errors. Decide which faults retry, how often and with what backoff; which stop immediately; and where exhausted work becomes visible. Assign a named business or technical owner and define the evidence needed to replay, correct, reject or manually reconcile an operation.

  4. 4

    Prove a controlled pilot

    Use representative South African customers, addresses, SKUs, rand values, VAT rules, discounts, warehouses and approval cases. Include duplicates, missing mappings, offline or network loss, service restart, expired credentials and a lost response after external commit. Reconcile counts and commercial totals in both systems; a green API response alone is not acceptance.

  5. 5

    Release with a rollback plan

    Version the mapping, adapter and configuration together. Record the approved package, supported architectures, required runtime, database or API prerequisites and the previous known-good state. Start with a bounded customer or order cohort, monitor exceptions and keep a tested way to pause new work without deleting the durable queue or losing reconciliation evidence.

  6. 6

    Operate and review

    Monitor reachability, authentication, latency, retry and dead-letter trends, external rate limits, installed version and reconciliation differences. Rotate credentials and exercise recovery before an emergency. Review vendor API or SDK changes and the adapter support matrix before upgrades. Retire obsolete credentials, mappings and data under the agreed security and POPIA operating process.

South African procurement note: confirm the parties’ POPIA roles, purposes, access, retention, operator terms and incident process during procurement. Hosting and subprocessors should be confirmed from current contractual evidence. Product controls can support a lawful implementation, but an integration page cannot certify the buyer’s operating practices or replace legal and security review. Before expanding the pilot, agree measurable release criteria: the maximum acceptable age of a pending operation, expected daily reconciliation window, alert response owner, acceptable mapping-error rate, retry ceiling and the evidence required to close an incident. Keep deployment, configuration and mapping versions beside the reconciliation result so a later difference can be traced to the exact operating state. Review those criteria when order volume, product range, warehouses, tax treatment or the external vendor version changes. A technically healthy connector can still create the wrong commercial result if ownership or mapping assumptions have drifted. Keep the sign-off, evidence and named operational owners accessible for every later support and change review.

Decision-maker intent

Questions different buyers ask about Xero

Finance

Will field orders become invoices automatically?

A custom connector can do that only after finance chooses the document, approval, account, tax and due-date policy. SalesPro Hub does not currently claim a native automatic Xero invoice feature.

IT and security

Who owns the OAuth credentials?

Customer middleware or a future approved managed adapter owns the Xero consent and token lifecycle. Tokens must stay server-side, encrypted and out of logs.

Operations

Can Xero send stock to the field app?

The Inventory API can receive absolute quantities by SKU, but the business must define whether Xero-connected stock is sufficiently current and which system handles deductions.

Professional includes scoped APIs and signed webhooks for custom, customer-operated middleware. A managed Windows connector, remote configuration, heartbeat/version monitoring and managed recovery require Enterprise—and only become available for this named system after its real adapter passes the published release boundary.

Buyer decision guide

Scope the Xero connection before buying implementation

A good trial should prove the workflow with your data—not rely on a sales promise.

Strong fit when you need

  • Teams that have already proved the SalesPro Hub field workflow with real data.
  • Businesses able to assign an owner for mapping, credentials and exception handling.
  • Integrations built around stable customer, order or product identifiers.

Confirm during the trial

  • The exact Xero product, edition and API access available to your account.
  • The system of record for customers, stock, tax, status and accounting documents.
  • Whether polling, signed webhooks or middleware best fits your network and support model.

Implementation flow

How the connection works

  1. 1

    Authorise Xero

    Your middleware completes Xero OAuth and securely stores the selected Xero tenant relationship.

  2. 2

    Map contacts

    Persist the Xero contact ID as the SalesPro Hub external identity so renames and email changes never create a second customer.

  3. 3

    Transform submitted orders

    Read only non-draft SalesPro Hub orders, validate the mapping, and create the chosen Xero document with an idempotency record.

  4. 4

    Return the reference

    Acknowledge the SalesPro Hub order with the Xero reference, then reconcile fulfilment and stock under one declared source-of-truth policy.

Field mapping starting point

SalesPro Hub field/eventXero equivalentImplementation note
customer.external_idXero ContactIDStable contact identity.
order_numberReferenceRecommended connector deduplication key.
external_referenceXero document number/IDReturned after successful creation.
items[].skuItemCodeValidate before automated posting.
vat_rate / vat_amountTaxType and calculated taxConfirm inclusive/exclusive policy.

Xero integration questions

Does SalesPro Hub connect natively to Xero?

Not currently. SalesPro Hub provides the REST and webhook foundation, while a custom connector must handle Xero OAuth and accounting entity mapping.

Can field orders become Xero invoices?

A custom connector can transform submitted SalesPro Hub orders into the chosen Xero document. Automatic posting is not built into SalesPro Hub itself and must follow your approval, tax and account-code policy.

How are Xero contacts matched?

Use the immutable Xero ContactID as the external customer identity. Do not merge on company name or email because both can change.

Can Xero own stock quantities?

A Xero-connected inventory source can publish absolute quantities to SalesPro Hub by SKU. The implementation must prevent a delivery from being deducted twice.

Validate the field workflow before connecting accounting

Import real products and customers, capture a representative order, then scope the integration against evidence instead of assumptions.

Start the free trial