Search documentation...

K
ChangelogBook a demoSign up

Xero

Gain financial visibility and empower your accounting team by keeping your financials up to date

Overview

Give yourself confidence in the financial health of your business by integrating your Xero usage with Hightouch. We automate your financial workflows and eliminate inconsistent data issues and manual data entry.

With this integration, you can deliver up-to-date data directly from your source of truth to allow your team the luxury to focus on making financial decisions that benefit your business instead of wasting time finding, cleaning, and moving relevant data.

Getting started

Connect to Xero

Authorize Xero with OAuth and create your destination.

Add Xero as a destination in Hightouch

  1. Log in to Hightouch or create a free Hightouch account
  2. Click on Destinations in the left sidebar
  3. Click on Add destination in the top right corner
  4. Select Xero in the destination catalog and click Continue to proceed
  5. Complete the authorization steps until you are redirected back to the Hightouch application
  6. Give your destination a name and unique slug (for example, Xero Production and Xero-production)
  7. Click Finish to create your Xero destination.

Connect to your data source

Hightouch sits on top of your data warehouse and can read from Snowflake, Redshift, BigQuery, Databricks, Postgres, MySQL, and many other data sources. You can even fetch data from Google Sheets and Airtable. Hightouch can help activate your data wherever it resides.

We've written dedicated guides for each supported data source. Take your pick:

If you're missing the credentials necessary to connect to your data source, try inviting your teammates to Hightouch. You can have unlimited collaborators in your workspace.

Connect to a sample database instead

Waiting for credentials to your data warehouse? No problem. You can connect to one of our sample databases to get started right away. For the rest of this tutorial, we'll use our demo B2B SaaS, which contains a users table. This sample source is available when you log in for the first time—no setup required.

Next, we'll write a SQL query to define which users should be synced to our Xero accounts resource. You can follow the same pattern to sync to other Xero resources.

Create a model

In Hightouch, a model represents a query that filters or transforms the records in your data source. Models are used to determine exactly which records to sync between sources and destinations.

When you connect to a data warehouse, your models will probably be written in SQL. You can also import models from tools like dbt and Looker.

In this example, we'll keep it simple. Suppose you want to sync all your customers to Xero. To accomplish this, you'll want to create a model that looks like this:

SELECT * FROM users;
  1. Click on Models in the left sidebar.
  2. Click on Add model in the top right corner.
  3. Select Demo Database as your source and click Continue to proceed.
  4. Select SQL Editor as your modeling method.
  5. Paste the SQL query from above into the editor on the left side of the page.
  6. Click Preview to execute the query.
  7. Click Continue to proceed.
  8. Give your model a name and unique slug (for example, "All Users" and all-users).
  9. Select ID as the primary key for your model.
  10. Click Finish to create your model.

We just created a model using a SQL query that retrieves all our current users. Next, we'll configure our sync to add these users to Xero.

Create a sync

  1. Click on Syncs in the left sidebar.
  2. Click on Add sync in the top right corner.
  3. Select All Users as your model and click Continue to proceed.
  4. Select Xero as your destination and click Continue to proceed.

Sync configuration

Object selection

Hightouch supports syncing to the following Xero resources:

  • Accounts.
  • Contacts.
  • Payments.
  • Invoices.
  • Items.

Accounts

Account type selection

  • Select the type of accounts you would like to sync to your destination. To sync dynamic types, toggle 'use column' and select a column from your model that contains supported enum values by Xero.

Selecting an account type from the drop-down menu allows Hightouch to provide you with the appropriate validations for each account type. These validations will not exist if you choose to sync dynamic types from your model and will require you to be familiar with what is required by Xero.

Sync modes

For Bank account type, our integration supports:

  • Insert mode.

For all other account types, our integration supports:

  • Upsert: Records that aren't found in Xero given the provided identifier will be inserted. Existing records will be updated.
  • Update: Records that are found in Xero given the provided identifier will be updated.
  • Insert: Records will be pushed to your destination.

Record matching

Records can be matched from your source to your Xero workspace by:

  • Account ID
  • Name

Field mapping

Hightouch allows you to sync columns from your source to the supported Xero fields.

Delete records

When the Hightouch sync engine recognizes that a record has been removed from your source, you can either:

In Upsert mode:

  • Do nothing. An existing record in the destination would remain untouched.
  • Delete the record in the destination. Only non-system accounts and accounts not used on transactions can be deleted.

Contacts

Sync modes

This integration supports:

  • Upsert mode: Records that aren't found in Xero given the provided identifier will be inserted. Existing records will be updated.

Record matching

Records can be matched from your source to your Xero workspace by:

  • Name.

Field mapping

Hightouch allows you to sync columns from your source to the supported Xero fields.

Payments

Sync modes

This integration supports:

  • Insert mode: Records will be pushed to your destination.

Invoice record matching

Invoice records can be matched from your source to your Xero workspace by:

  • Invoice ID
  • Invoice Number
  • Credit Note ID
  • Credit Note Number

Account record matching

Account records can be matched from your source to your Xero workspace by:

Account ID Code

Field mapping

Hightouch allows you to sync columns from your source to the supported Xero fields.

Invoices

Invoice type selection

Select the type of invoices you would like to sync to your destination. To sync dynamic types, toggle 'use column' and select a column from your model that contains supported enum values by Xero.

Sync modes

This integration supports:

  • Upsert mode: Records that aren't found in Xero given the provided identifier will be inserted. Existing records will be updated.
  • Insert mode: Records that aren't found in Xero given the provided identifier will be inserted.

Record matching

In Upsert mode, records can be matched from your source to your Xero workspace by:

  • Invoice Number

Field mapping

Hightouch allows you to sync columns from your source to the supported Xero fields.

Associations

Hightouch can perform a reference look-up for reference fields. Select an identifier to use to perform the look-up and use the respective contact to create the invoice object.

You can perform a look-up using:

  • Contact Number
  • Email Address
  • Name

If the Contact ID exists in your model, you can skip the lookup step by selecting Contact ID from the drop-down menu.

Items

Invoice type selection

Select the type of invoices you would like to sync to your destination. To sync dynamic types, toggle 'use column' and select a column from your model that contains supported enum values by Xero.

Sync modes

This integration supports:

  • Upsert mode: Records that aren't found in Xero given the provided identifier will be inserted. Existing records will be updated.
  • Insert mode: Records will be pushed to your destination.

Record matching

In Upsert mode, records can be matched from your source to your Xero workspace by:

  • Item Code

Field mapping

Hightouch allows you to sync columns from your source to the supported Xero fields.

Tips and troubleshooting

Common errors

To date, our customers haven't experienced any errors while using this destination. If you run into any issues, please don't hesitate to . We're here to help.

Live debugger

Hightouch provides complete visibility into the API calls made during each of your sync runs. We recommend reading our article on debugging tips and tricks to learn more.

Sync alerts

Hightouch can alert you of sync issues via Slack, PagerDuty, SMS, or email. For details, please visit our article on alerting.

Ready to get started?

Jump right in or a book a demo. Your first destination is always free.

Book a demoSign upBook a demo

Need help?

Our team is relentlessly focused on your success. Don't hesitate to reach out!

Feature requests?

We'd love to hear your suggestions for integrations and other features.

Last updated: Feb 16, 2023

On this page

OverviewGetting startedConnect to XeroConnect to your data sourceCreate a modelCreate a syncSync configurationObject selectionAccountsContactsPaymentsInvoicesItemsTips and troubleshootingCommon errorsLive debuggerSync alerts

Was this page helpful?