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, 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. Example:

  • 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><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><br>TaxType=="INPUT" && Type=="FIXED"

Examples of data filtering using Where field:

Retrieve all Bank Accounts using the Accounts endpoint:

Type=="BANK"

Retrieve all contacts with specific text in the contact name using the Contacts endpoint:

Name.Contains("Peter") Name.StartsWith("P") Name.EndsWith("r")

Retrieve all contacts with specific contact email using the Contacts endpoint:

EmailAddress!=null&&EmailAddress.StartsWith("example")

Retrieve invoices with an invoice date between a date range:

Date >= DateTime(2015, 01, 01) && Date < DateTime(2015, 12, 31)

Retrieve all PAID Invoices:

Status="PAID"

Retrieve all not PAID Invoices:

Status!="PAID"

Retrieve all PAID or AUTHORISED Invoices:

Status="PAID" || Status="AUTHORISED"

Retrieve all Invoices for a specific Contact:

Contact.ContactID=GUID("ac565f9c-9829-4f51-8a5b-0400de972b3c")

Retrieve all PAID Invoices for a set of specific Contacts:

(Contact.ContactID=GUID("ac565f9c-9829-4f51-8a5b-0400de972b3c") || Contact.ContactID=GUID("181edd84-d098-4468-95cd-e3ac74bc22c5")) && Status="PAID"

Retrieve particular Invoice by ID:

InvoiceID=GUID("20ff01b8-c2d8-49bb-8abf-a9486c9ea665")

Retrieve all Invoices linked with a specific number:

InvoiceNumber="RPT644-1"

Retrieve all Bank Transactions for a specific Bank account:

BankAccount.AccountID=GUID("ceef66a5-a545-413b-9312-78a53caadbc4")

Retrieve all Bank Transaction where Total amount > some amount for specific Bank account:

BankAccount.AccountID=GUID("ceef66a5-a545-413b-9312-78a53caadbc4") && Total > 5.05

Retrieve all Payments for specific Invoice:

Invoice.InvoiceNumber="INV-0004"

Read more about Retrieving a filtered set of resources

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.