If you want to create data sources for custom Klips, you're in the right place.
If you want to add pre-built Klips, see Pre-built Klips and the Klip Gallery and Klip Gallery: Xero.
If you want to add a pre-built Xero dashboard, see Pre-built Klip dashboards and the Dashboard Gallery.
Visualize, discover, and act on your data with Klips and Klip dashboards.
Ready to get the most from your Xero accounting data? Get started by setting up a connection between Klipfolio and your Xero data and adding some data sources.
When you're finished adding Xero data sources, you'll use them to power your custom Klips.
This article includes:
- Connecting Klipfolio to your Xero data
- Adding a Xero pre-built data source
- Adding a Xero custom data source
- Creating Xero custom Klips
Connecting Klipfolio to your Xero data
The first step in creating a Xero data source is to connect Klipfolio to your data.
Here are a couple things to note:
Your data is safe with us. The first time you connect your Xero data to Klipfolio, you'll be prompted to sign in to Xero and give permission to allow Klipfolio to securely access data within your Xero account. We are serious about protecting your data privacy.
Managing your connections. By default, your connection name looks like this: yourname@Xero <date and time created>. You can modify the default connection name when you create a new connection or from your list of connections, accessed by clicking your Account Name (located at the bottom of the left navigation sidebar) and selecting Account > Connected Accounts or by clicking the
button in the left navigation sidebar and selecting Connections.
You can use the same account connection every time you connect to Xero. If you have trouble accessing an existing connection, your OAuth token may have expired. If that happens to you, go here for help. This Xero article also explains several reasons why your OAuth token may have failed.
Adding a Xero pre-built data source
Our pre-built data sources focus on the most sought-after Xero data. Either use them as complete solutions or as starting points for custom building.
To add a Xero pre-built data source:
- In the left navigation sidebar, click the 3-dot menu beside Data Sources and select +New data source.
If you don’t see this option, go to the bottom of the left navigation sidebar and click your Account Name > Data Sources > +New data source. - On the Where is your data? page, select Xero.
- Select a pre-built data source from the left section of the Choose a pre-built or custom connection page.
-
If this is your first time connecting to Xero:
- Click Connect an account. Enter your Xero login credentials and click Log in. To confirm the organization you want data for is now connected to Klipfolio, click the drop-down arrow at Select another organisation, where it will be listed under “Already connected”. Click Continue. When prompted, name the new connection and click Apply. Click Continue to enter the Configure your data source page.
-
If you've connected with Xero before:
- Select an existing connection from the drop-down list and click Continue.
- At Connected Organization(s), click the drop-down arrow and select the organization for which you want to get data.
- Choose the Data Format in which you would like your data to be returned: XML, CSV, or JSON.
- If you chose CSV, select from the Summary and Detailed report options.
A summary report returns aggregated results. A detailed report breaks down the transaction by individual entries.
- Click Get data.
- Ensure this is the data you’re looking for and, optionally, select the checkbox to Model your data. Learn more about modelling your data source. Note: If you selected JSON or XML as your data format, go here to learn how to model your data.
- Click Continue.
- Name, choose refresh settings, and, optionally, share your data source.
- Click Save.
The data source is added to your account and is ready to use for custom Klips. You can see all your data sources in your Data Source Library, accessed by clicking Data Sources in the left navigation sidebar.
Adding a Xero custom data source
Need a unique set of data? When our pre-built data sources don't include exactly what you're looking for, create your own custom data source. You can either use a pre-built data source query as a base or write your own queries from scratch.
To add a Xero custom data source:
- In the left navigation sidebar, click the 3-dot menu beside Data Sources and select +New data source.
If you don’t see this option, go to the bottom of the left navigation sidebar and click your Account Name > Data Sources > +New data source. - On the Where is your data? page, select Xero.
- On the Choose a pre-built or custom connection page, click Create a custom Xero data source.
-
If this is your first time connecting to Xero:
- Click Connect an account. Enter your Xero login credentials and click Log in. To confirm the organization you want data for is now connected to Klipfolio, click the drop-down arrow at Select another organisation, where it will be listed under “Already connected”. Click Continue. When prompted, name the new connection and click Apply. Click Continue to enter the Configure your data source page.
-
If you've connected with Xero before:
- Select an existing connection from the drop-down list and click Continue.
- At Connected Organization(s), click the drop-down arrow and select the organization for which you want to get data.
- Edit the Query URL to return the data you need. Refer to the Xero API documentation.
- Choose the Data Format in which you would like your data to be returned: XML, CSV, or JSON.
- If you chose CSV, select from the Summary and Detailed report options.
A summary report returns aggregated results. A detailed report breaks down the transaction by individual entries.
- Click Get data.
- Ensure this is the data you’re looking for and, optionally, select the checkbox to Model your data. Learn more about modelling your data source. Note: If you selected JSON or XML as your data format, go here to learn how to model your data.
- Click Continue.
- Name, choose refresh settings, and, optionally, share your data source.
- Click Save.
The data source is added to your account and is ready to use for custom Klips. You can see all your data sources in your Data Source Library, accessed by clicking Data Sources in the left navigation sidebar.
Custom building: About APIs and queries
Klipfolio connects to hundreds of services in the cloud that have a REST API. If you take the time to learn your service’s API to create queries for the data you want, your possibilities are endless. Here’s a quick overview video on APIs and Klipfolio:
If you need help using APIs, ask a data analyst or developer.
Refer to the Xero API documentation to discover more data requests.
See the reference table below for API related information and sample queries.
| API Documentation | Xero API Documentation |
| Authentication Method | OAuth Authentication |
| Response Format | JSON, XML, CSV (supported for Reports endpoint only) |
| API Limits and Notes | Xero returns a maximum of 100 records per query. To retrieve a specific set of records, specify a date range in the query or, to retrieve more records, pagination (supported only for certain endpoints) is required. |
| Pagination Method |
Xero returns a maximum of 100 records per query and only certain endpoints (such as invoices and contacts) support pagination. Use the page parameter to retrieve more than 100 records, for example page=2. Note that Xero does not provide a count of the total number of records, so it is necessary to know in advance how many pages to request. Refer to Data Sources with Multiple Pages for details on how to handle pagination. |
| Date Format |
Example date format:
Note that date formats are supported for the Xero connector as a header parameter. |
| Sample Queries |
In Klipfolio, Xero API queries use the base URL: https://api.xero.com/ Examples:
|
Creating Xero custom Klips
Now that you've created a Xero data source, you can return to it and use it to make custom Klips. A single data source can be used to create a single or multiple custom Klips.
To create a Xero custom Klip:
- In the left navigation sidebar, click Data Sources to open your Data Source Library.
- Select the Xero data source you want to use for your custom Klip.
- On its details page, click Create a Klip.
- In the Klip Editor, configure your custom Klip.
If you need help, go to this article. (You can skip the “Choose the data source” step in the linked article. You’ve already chosen it.) You'll also find lots of articles on working with Klips in this section of our Knowledge Base. - Click Save.
Your new Klip is ready to add to a dashboard. Learn about dashboards.
Note: You can also add Xero pre-built Klips. You'll find them in the Klip Gallery or, if you're a White-Label customer, in the Integration Gallery. Go to this article for detailed instructions on adding pre-built Xero Klips to your dashboards.
Want to learn more?
Check out these related articles: