The Sisense Xero connector is a standalone connector that allows you to import data from Xero’s API into the ElastiCube Manager. After you have downloaded and installed the connector, you can connect through a connection string you provide Sisense in the ElastiCube Manager. The connection string is used to authenticate users who connect to the Xero APIs. To obtain a connection string, you will need to create a Xero app.

Once you have connected to Xero, you can import a variety of tables from the Xero API.

This page describes how to install the Xero connector, how to connect to Xero with a connection string, and what tables you can import into the ElastiCube Manager:

Installing the Xero Connector

Sisense provides the Xero connector as a standalone connector that you can download and add to your list of default Sisense connectors.

To install the Xero connector:

  1. Download the Xero installation file.
  2. Open the installation file and click Install.
  3. After the installation process is complete, click Close.
    The Xero connector is displayed in the ElastiCube Manager under Add Data > Web Services.

Connecting to the Xero REST API

To access Xero’s REST API from the ElastiCube Manager, you must provide valid Oauth Xero credentials through a connection string. These credentials are provided by Xero when you register an application.

After you receive your credentials from Xero, you can create the connection string and provide Sisense with it to connect to your data.

Registering an App

Follow the steps below to obtain the OAuth client credentials, the OAuthClientId and OAuthClientSecret:

  1. Log in to the Xero Developer Portal.
  2. Click My Applications > Add Application.
  3. Select the Public option.
  4. Enter a name for your application and the URL of your company. This information is displayed to users when they connect.
  5. If you are making a Desktop application, set the Callback Domain to ‘localhost’.
    If you are making a Web application, set the Callback Domain to the domain name of the URL where the user returns with the token that verifies that they have granted your app access.

After you click Save, you are shown your OAuth credentials, the consumer key, and consumer secret.

Authenticating through Xero

After setting the following connection properties, you are ready to connect:

  • OAuthClientId: Set this to the consumer key in your app settings.
  • OAuthClientSecret: Set this to the consumer secret in your app settings.
  • XeroAppAuthentication: Set this to the type of your application. Allowed values: PUBLIC or PARTNER. Default: PUBLIC.
  • InitiateOAuth: Set this to GETANDREFRESH. You can use InitiateOAuth to avoid repeating the OAuth exchange and manually setting the OAuthAccessToken connection property.

When you connect the driver opens the OAuth endpoint in your default browser. Log in and grant permissions to the application. The driver then completes the OAuth process:

  1. Extracts the access token from the callback URL and authenticates requests.
  2. Refreshes the access token when it expires.
  3. Saves OAuth values in OAuthSettingsLocation to be persisted across connections.

Adding Xero Tables to your ElastiCube

Sisense uses connection strings to connect to Xero and import data into the ElastiCube Manager. Each connection string contains a authentication parameters that the data source uses to verify your identity and what information you can export to Sisense. To learn more, see Connection String Parameters.

To add Xero data:

  1. In ElastiCube Manager, click Add Data and then, Xero. The Connect to Xero window is displayed.
  2. In Datasource Connection String, enter your connection string.
  3. Click Connect to Server. Xero is displayed in the Select Database list.
  4. Click OK. Sisense connects to Xero and displays a list of tables available for you to import.
  5. Select the relevant tables and click Add.
    The tables are displayed in the ElastiCube Manager.

Xero Tables

Xero’s RESTful APIs expose the following Xero tables that you can import into the ElastiCube Manager through the Sisense Xero connector:

Available Tables

NameDescription
AccountsCreate, delete, and query accounts for a Xero organisation.
BankTransactionsCreate, update, delete, and query bank transactions for a Xero organisation.
BankTransfersUsage information for the operation BankTransfers.rsd.
ContactGroupsCreate, update, and query contact groups for a Xero organisation.
ContactsCreate, update, and query contacts for a Xero organisation.
CreditNotesCreate, update, delete, and query credit notes for a Xero organisation.
EmployeesCreate, update, and query employees for a Xero organisation.
ExpenseClaimsCreate, update, and query expense claims for a Xero organisation.
InvoicesCreate, update, delete, and query invoices for a Xero organisation.
ItemsCreate, update, delete, and query items for a Xero organisation.
LinkedTransactionsCreate, update, and query LinkedTransactions for a Xero organisation.
ManualJournalsCreate, update, and query manual journals for a Xero organisation.
PaymentsCreate and query payments for a Xero organisation.
PurchaseOrdersCreate, update, delete, and query purchase orders for a Xero organisation.
ReceiptsCreate, update, delete, and query receipts for a Xero organisation.
TaxRatesUsage information for the operation TaxRates.rsd.
Payroll US Data Model
EmployeesCreate, update, and query employees for a Xero organisation.
PayItemsBenefitsCreate, update, and query PayItems for a Xero organisation.
PayItemsDeductionsCreate, update, and query PayItems for a Xero organisation.
PayItemsEarningsCreate, update, and query PayItems for a Xero organisation.
PayItemsReimbursementsCreate, update, and query PayItems for a Xero organisation.
PayItemsTimeOffCreate, update, and query PayItems for a Xero organisation.
PayRunsCreate, update, and query payruns for a Xero organisation.
PaySchedulesCreate, update, and query PaySchedules for a Xero organisation.
PaystubsCreate, update, and query pay stubs for a Xero organisation.
WorkLocationsCreate, update, and query work locations for a Xero organisation.
Payroll AUS Data Model
EmployeesCreate, update, and query employees for a Xero organisation.
LeaveApplicationsCreate, update, and query Leave Applications for a Xero organisation.
PayItemsDeductionsCreate, update, and query PayItems for a Xero organisation.
PayItemsEarningsCreate, update, and query PayItems for a Xero organisation.
PayItemsLeaveCreate, update, and query PayItems for a Xero organisation.
PayItemsReimbursementsCreate, update, and query PayItems for a Xero organisation.
PayrollCalendarsCreate, update, and query Payroll Calendars for a Xero organisation.
PayRunsCreate, update, and query payruns for a Xero organisation.
SuperFundsRetrieve, add and update Payroll Super Funds in a Xero organisation.

Available Views

NameDescription
Accounting Data Model
AgedPayablesByContactQuery organisation data for a Xero organisation.
AgedReceivablesByContactQuery organisation data for a Xero organisation.
BalanceSheetQuery organisation data for a Xero organisation.
BankSummaryQuery organisation data for a Xero organisation.
BrandingThemesQuery branding themes for a Xero organisation.
BudgetSummaryQuery organisation data for a Xero organisation.
CurrenciesQuery currencies for a Xero organisation.
JournalsQuery the line items in journals for a Xero organisation.
OrganisationQuery organisation data for a Xero organisation.
OverpaymentsCreate and query Overpayments for a Xero organisation.
PrepaymentsCreate and query Prepayments for a Xero organisation.
ProfitAndLossQuery organisation data for a Xero organisation.
RepeatingInvoicesUsage information for the operation RepeatingInvoices.rsd.
TrackingCategoriesQuery tracking categories for a Xero organisation.
TrialBalanceQuery organisation data for a Xero organisation.
UsersQuery users for a Xero organisation.
Payroll US Data Model
TimeOffBalancesRetrieve, add and update an Employee's TimeOff balance in a Xero organisation.
TimesheetsCreate, update, and query timesheets for a Xero organisation.
Payroll AUS Data Model
LeaveBalancesRetrieve, add and update an Employee's Leave balance in a Xero organisation.

Limitations

To access the AgedPayablesByContact and AgedRecievablesByContact tables, you need to specify a particular ContactID, the unique ID of the Contacts table, in the select query using a WHERE clause. This allows you to retrieve data for a specific contact. These are limitations of the Xero API, as these reports are specific to each contact. Here’s an example:

SELECT due, paid, total FROM AgedPayablesByContact WHERE ContactID='xyz'
SELECT duedate, reference FROM AgedRecievablesByContact WHERE ContactID='1234'

Due this limitation, you cannot build an ElastiCube with these tables without custom SQL.

Daily Limit

There is a daily limit of 1000 API calls against a single Xero organisation in a rolling 24-hour period.

In addition to the daily limit, a single access token can only be used up to 60 times in a rolling 60-second period.

Encountering a Rate Limit

If you encounter a rate limit, the Xero API will return an HTTP 503 (Service Unavailable) error, with the following message: “oauth_problem=rate limit exceeded”.

Note: If you encounter a rate limit, do not continue to make requests, as this may continue to add to your limitation. If necessary, you may need to queue requests.

Token Limitations

Each access token will only last for 30 minutes. If you want longer access to the organisation, you need the user to re-authorize your application.