Xero data source

Learn how to set up a Xero data source and then move this data to one of the supported by Coupler.io data destinations.

The 2 steps to complete the setup

  1. Set up your data source
  2. Set up your data destination

1. Set up your data source

1.1. Select an application: Xero

1.2. Connect a Xero account

  • Click CONNECT.
  • Log in to the chosen Xero account. 
  • Coupler.io will need access to view your Xero data. Click Allow access to grant access.

1.3. Choose the tenant

The drop-down has all tenants available under your account. All further configurations will be applied to chosen tenant. 

Please note, that Coupler.io defines available tenants during the connection creation, so, if you add new tenant and would like to use it also, then you have to reconnect Xero account.

1.4. Select Data Entity to import

Click on the field and select a category of accounting data. Coupler.io supports the following Xero data entities:

  • Accounts, Bank Transactions (pulls reconciled data only), Bank Transfers, Branding Themes, Contact Groups, Contacts, Credit Notes, Currencies, Employees, Expense Claims, Invoices, Items, Journals, Linked Transactions, Manual Journals, Organisation, Overpayments, Payments, Prepayments, Purchase Orders, Receipts, Repeating Invoices, Reports, Tax Rates, Tracking Categories, Users

If you need to import preset Xero reports, check out the Xero Reports importer.  

1.35 Select the Report Type to import

  • Simple report imports all default fields.
  • Detailed report provides an extended list of fields and is supported by the following data entities: Invoices, Contacts, Bank Transactions, and Manual Journals. All other data entities only support Simple report type.

1.6. Fill out the "Where" field

Use this field to retrieve a filtered set of elements that don't have explicit parameters. Examples:

  • Retrieve all Bank Accounts using the Accounts endpoint: TYPE=="BANK".
  • Retrieve all contacts with specific contact email using the Contacts endpoint: EmailAddress.StartsWith("example").

It is also possible to retrieve data using multiple Where conditions. To do it, please use operators between values in the 'Where' field:

  • You can use 'OR'  operator (which is the same as 'or' and '||') when you need to evaluate several conditions separately. For example, you need to import accounts with the tax type = 'input', 'output', and 'fixed'.
TaxType=="INPUT" or TaxType=="OUTPUT" or Type=="FIXED" <br>TaxType=="INPUT" || TaxType=="OUTPUT" || Type=="FIXED"
  • You can use 'AND' operator (which is the same as 'and' and '&&') if you need to pull data when both conditions are true, then the result is true. For example, you need to get accounts with the tax type = 'input', and the type = 'fixed' at the same time.
TaxType=="INPUT" and Type=="FIXED" <br>TaxType=="INPUT" && Type=="FIXED"

Read a detailed explanation about the usage of the Where parameter in Xero:  How to use Where parameter in Xero importer?

1.6.1 Note for "Journals" Data Entity

Journals Data Entity has no "Where" parameter in settings. However, it has 2 specific fields that allow fetching journals filtered by JournalNumber:

  • Journal number more than
  • Journal number less than

1.6.2 Macros

Xero Importer supports macros that you may use to import data dynamically: e.g., import Xero Invoices data where the date is today

Format to use:

Date >= DateTime({{value.format(YYYY)}}, {{value.format(MM)}}, {{value.format(DD)}})

E.g.: Date >= DateTime ({{today.format(YYYY)}},{{today.format(MM)}},{{today.format(DD)}})

Note: This is special formatting required by Xero importer only. Other importers, including Xero Reports importer, support regular ISO date format. 

To see the full list of supported macros values, please visit this article.

Examples of macros usage:

Retrieve all data entities created in the current month using Date macro:

Date >= DateTime({{thismonthstart.format(YYYY)}}, {{thismonthstart.format(MM)}}, {{thismonthstart.format(DD)}}) && Date <= DateTime({{thismonthend.format(YYYY)}}, {{thismonthend.format(MM)}}, {{thismonthend.format(DD)}})

Retrieve all data entities created during the last 20 hours using DateTime macro:

Date >= DateTime({{20hoursago.format(YYYY)}}, {{20hoursago.format(MM)}}, {{20hoursago.format(DD)}}, {{20hoursago.format(HH)}}, {{20hoursago.format(MM)}}, {{20hoursago.format(ss)}})

1.7. Fill out the "Order" field

Use this field to retrieve results in ascending or descending order.

Example:

  • Retrieve the list of contacts filtered by email address in descending order: EmailAddress DESC.
  • Retrieve the list of contacts filtered by email address in ascending order: EmailAddress. Learn more

1.8. Fill out the "Split by" field

Example: if an invoice has several line items (several items mentioned in a single invoice) and you want to split them into different rows during the import, type in  LineItems in the Split by field.

1.9. Fill out the "Changed after date" field

Use this field to specify date which you want to start from.  This field supports macro. Learn more.

2. Set up your data destination

Continue setting up the integration depending on the system where you want to import data to. See full list of supported data destinations and follow set up guide for chosen one.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.