Call Us: +44 (0)1748 473000

Call Us Facebook Twitter Pinterest Linked in Instagram Youtube GooglePlus

Find out how to get 2 hours free training by referring a friend? 
What's the catch?
Articles Categories Screencasts

How to use the Xero integration with OpenCRM

Updated: 30 January 2017 14:49:41 OpenCRM::Invoice

NOTE: OpenCRM's integration with Xero is currently in closed beta testing. If this is something you are interested in using, please contact your account manager for more information.


The Xero settings page contains a link to the Xero page you need to go to to set up the Xero app. Currently only Public authentication is supported although the feature was originally written for private key authentication which means the process can be automated.
Note : Once this private key authentication is approved by Xero, automated invoice creation and balance updating will happen without user input.

To enter your Xero details, go to Settings > Configuration and scroll down until you see the Xero Settings option. Clicking this link will give you the below page. Tick the Enable Integration box and Save.

You can also access the Xero access screen from the Invoice module by clicking on the Connect to Xero button:

Clicking Connect to Xero will take you to a Xero login page where you can then authorise your OpenCRM system to connect to Xero.

Once you authorise Xero to connect to OpenCRM, the page will refresh and you will find yourself back in OpenCRM with the consumer key and secret fields populated. This will turn on the connection. That connection will remain active for approx 30 minutes and is available to all users of the system in that time (each user does not need to connect each time).

Each time you enter the settings page, the saved connection is cleared and you will need to click Connect to Xero to reactivate the connection.

Tax table / rates can be associated with tax rates in Xero via the Settings page in OpenCRM, please see this FAQ for more information:

There is a background poll which can automatically send and update invoices to/from Xero but this will only work while the connection is valid. The connection expires every 30 minutes (approx), so it is actually quite unlikely this will be useful at the moment. 

Importing Client Data from Xero into OpenCRM

If you have been using Xero prior to integrating with OpenCRM, you will need to run an import or an update import, in order to get the Xero Reference field populated on the Company record in OpenCRM. If you do not do this, you will be creating duplicate client records in Xero and invoices from OpenCRM will be linked to a new Contact record in Xero instead of the existing client.

 The Xero Reference field is the unique identifier that is used to match up records in OpenCRM with existing data in Xero. This reference is not available on a standard Xero export or report, so you will need to use the tool built into the Xero Settings page, as per the screenshot below:

This will create a csv file that looks like this:

Importing New Client Data into OpenCRM

If your client data is present in Xero, but not present in OpenCRM, then you can carry out an import, to create new Company records in OpenCRM. Click on the link from the screenshot above. This will perform an export of your client data held in Xero. They key columns to note are ContactID (= Xero Reference) and Name (Company Name).

As well as this key information the export provides details such as a Contact person, email address, telephone and address details. The export also provides numerous columns of information exported from Xero that you are not likely to need in OpenCRM e.g. "AccountsReceiveableTaxType" or "BankAccountDetails".

1. You need to decide which columns you wish to import. You may need to create custom fields for non-standard information, in which case please refer to this guide on how to create custom fields in OpenCRM:

2. Formatting the address columns in Xero to match the formatting in OpenCRM. Typically, you will want to import the address details into the fields Billing Address Street/ Billing Address City/ Billing Address State/ Billing Address Postcode/ Billing Address Country. So, you will need to concatenate AddressLine1 and AddressLine2 into one field, to populate the Billing Address Street field in OpenCRM. Also you may wish to duplicate all the address fields, so that you can also import them to the Shipping Address fields in OpenCRM. See this FAQ for details on how to concatenate two (or more) fields in Excel:

3. Formatting telephone numbers to import into OpenCRM. In the Xero export, the phone numbers are split into separate columns for phone number/ area code/ country code, so you will need to concatenate the columns as per with addresses. Also, csv strips out formatting so numbers are likely to be missing leading zeros ie "0221" will display as "221". This FAQ explains how to restore and leading zeros that may be missing:

4. Once you have formatted the data, you can proceed with the Import. You will need to import the Company details into the Companies module, and if you want to add the Contact details, you should import this to the Contacts module. Go to the relevant module and select the Import option

The key fields to map are the Xero Reference and Account Name. You can map the other fields as described above. once you have finished, select Import Now at the bottom of the import screen and that will launch the import and create the Companies in OpenCRM.

5. You can repeat the process to import into the Contacts module, and create Contacts that will be linked to the Company.

Updating Existing Client Data in OpenCRM with Xero information

The procedure for carrying out an update import is very similar to doing a new import - you pick the columns you wish to bring into OpenCRM. The difference is that at the bottom of the Import screen you select the option to Update Existing Records before hitting Import Now.

For OpenCRM to know which record to update, you need to add a column to the spreadsheet, containing the CRM ID from the matching record in OpenCRM. You can use the VLOOKUP function in Excel to match the Xero Reference to the correct company. You should be OK with using the Company Name as the identifier to match up records however if you have more than one Company with the same name you will need a more sophisticated solution (e.g. using the Company Name and Postcode as the unique identifier). This FAQ explains how to use VLOOKUP:

Once you have matched up the Company with the relevant CRM ID, map the fields you want to update in OpenCRM. The key fields to map are the CRM ID field, as this is the look-up field that will be used to update the relevant record, and the Xero Reference, or ContactID field, which is the identifier that will be used to look up the correct Company record in Xero.


On Invoice home screen, there are two buttons - "Send to Xero" and "Update From Xero". These buttons are only visible if integration is enabled, and the current connection has not expired.

If it has expired, a button "Connect to Xero" is displayed which takes you to the settings screen.

Send to Xero

This button will send selected invoices (and associated company details) to Xero. It will send all invoices even if they have already been sent to Xero, so long as the outstanding balance matches the total amount. As soon as the outstanding balance is below the total amount (i.e. payments have been made in Xero), the invoice is no longer sent to Xero. The invoice status is ignored, so this will send Pending and Paid invoices so long as the outstanding and total balance matches 

Update From Xero

This button will update selected invoice balances from Xero, and update associated companies with their Xero reference. It will NOT update company balances. It will only get updates for invoices not marked as Paid or cancelled and where the "Sent to Accounts" field is checked. 

Once an Invoice has been updated from Xero, the status will be updated from Created to Live. The Invoice will also be marked as having been Sent to Accounts, with the Date on which it was sent.

Once Payments (in Xero) have been logged, these will be reflected in OpenCRM if the Update from Xero option is selected. It will show part-payments and full payments, updating the status to either "Part Paid" or "Paid", and the Amount Outstanding field will be adjusted accordingly.

Other Options

In the tools section, there are links to send all live invoices (that is all invoices where the outstanding amount is equal to the due amount),and update all live invoices (all invoices not marked as Paid and which have previously been sent to Xero).

Send All Live Invoices

Sends all invoices where the outstanding amount is equal to the due amount, and the status is not Paid or Pending

Update all Invoice Balances

This will go through all invoices not marked as Paid or Cancelled and which have previously been sent to Xero and query Xero for an updated balance. It will update associated companies with their reference in Xero. Additionally, at the end it will update all company balances following the invoice update. This could take some time to complete, during which time your OpenCRM session on that browser will be locked and unusuable. 

Logging / Error Checking

* In order to create an Invoice in Xero, the sync will first add the Products. This is so it can link any existing or new Products to the Invoices in Xero. If there is a problem with any Product row, this will not send any invoices, until the error has been corrected. An error message will be displayed which outlines the problem Product(s).

* When sending multiple invoices, if 2 invoices send successfully and one fails, the 2 which are sent successfully will be marked sent to sage.

* A separate log table "xero_log" is updated on any successful attempt to send the invoice and any errors are logged in here too.


Important Notes and Info

* Invoices and credit notes sent currently go into the "Drafts" section in Xero where they can then be approved.

* OpenCRM's integration with Xero allows you to create a new Client record, with a Primary Person linked (first name, last name, email address). If you sync a subsequent invoice for the same client, but with a different Person linked, it will not add a second Person, but will overwrite the first Person.

* Finance and System admins only are able to access the Xero settings page and send invoices to Xero or update balances from Xero.

* Line amounts are passed through as the full undiscounted amount. The discount rate is calculated to a percentage per line and passed through to Xero which then calculates the actual line total.

* Credit notes are transferred with list prices as the discounted amount because Xero does not support discount on credit notes.

* Update of balances on credit notes is not yet supported.

Rate This Article
  • 1 star
  • 2 star
  • 3 star
  • 4 star
  • 5 star
Feedback and Comments
captcha code  

You may also be interested in:


Twitter Feed


Software Add-ons Ltd
1 Battalion Court
Colburn Business Park
North Yorkshire
United Kingdom
+44 (0)1748 473000
+44 (0)870 125 5962
Reg #:
England & Wales 05387424

marker Find on Google Maps


OpenCRM Campaigns vs …

A little while ago now, we had a customer with a very specific reason for wanting to use MailChimp instead of relying solely the bulk emailing and Campaigns module in OpenCRM. This was all down to the way they managed some, but not all of the elements of their marketing strategy. Long story short, we developed a MailChimp integration as part of this implementation. As it was an integration we could see being useful to other customers, we decided to release it...

Let Your Employees Ru…

Each different industry and the players within that field face their own challenges when it comes to the successful running of their business, but the basic goals will generally be along similar lines - business expansion, growing profits, customer retention and keeping employees happy. A key part of that staff satisfaction is empowerment. Brands all over are doing their best to empower their customers by inviting them to complete customer surveys and take part in competitions. By inviting them to...

The Cloud is Just Bet…

I’m always amazed when I speak to people who would rather keep their data in a onsite server in their office rather than the Cloud. I spoke to someone just this past weekend who was convinced that it was safer because they could see and touch that server in the back room of the office. They knew where it was and what it was doing…or at least knew that it wasn’t physically going anywhere. And I can understand the peace of mind...

Productivity is Drive…

Productivity has always been one of those things that I feel strongly about when it comes to running a business. Now you talk about giving people the right tools and finding the right job role for them all day long, but the one thing that never fails to increase a team’s productivity in my experience comes down to processes. Let me give you an example. Several years ago we had a little problem here at OpenCRM. Our sales team and our projects team...

Protect Yourself agai…

As currencies fluctuate, make sure the Value of your Quotes and Sales Orders don’t. I was listening to a conversation on BBC Breakfast the other morning when something caught my ear: No one is quite sure what the impact of Brexit will be on the strength of the pound. This can create some uncertainty when generating Quotes if you operate using a number of different currencies. Lots of systems, including OpenCRM, have the ability to integrate with an Online Currency Exchange, giving...

Find the Right Approa…

It’s not terribly surprising that a recent study presented to the British Psychological Society by John Hackston found that some people found receiving, replying, and managing their email inbox more stressful than others. The author suggested that different personality types will need to structure the way they approach their emails and to-do lists in different ways. It all makes perfect sense to me (and I’m assuming most of you). I think about the way our “always on” MD likes to work...

Making Your Data Safe…

We are so used to storing data in the cloud, it is simply how things work these days. Large swathes of your personal life are already cloud-based – all your email addresses, social media profiles, photos etc. are likely to be stored digitally. In your home you may also have connected appliances – also known as the internet of things – such as heating that is controlled via an account synced to an app on your mobile phone. But apart...

Happy Burns' Night

Everyone remembers to wish people a Happy New Year or Merry Christmas when the season approaches, but what about the other, more regional or country specific holidays? Let's say, for example, that I would like to wish a Very Happy Burns Night to all of my Scottish clients….how can I do this in the most efficient way? In the words of Mel Gibson in Braveheart..’ FILTERING !!’ The ability to filter the information or data that you have stored within OpenCRM makes...

From Website Visitor …

Your website is your shop front. You spend time, money, and effort into getting it just right and making sure that people are finding it. Once there, you want to turn as many of these people as you can into actual sales, but first you have to find out a little bit about them. Then you need to nurture that relationship, but I’m getting ahead of myself. Asking people for their contact details via a web form is pretty ubiquitous these days...

Making The Best Use O…

The end of the year tends to be something of an expensive exercise. At home you’ve spent money on food, drinks and presents. At work you have had Christmas parties and a period of closure – all in all it’s not the cheapest time of year. So if now is a time when you are looking to spend a little less, it is the perfect occasion to dig into the existing resources you have to try and make the most out...

Post-Holiday Struggle…

The first week back from the Christmas holidays is almost over and there’s a curious mixture of sadness and gladness at being back at work. There is the tiredness we all feel, the result of a slightly altered sleeping schedule and a week of indulgences and lazy days. Plus you’ve got the slight malaise from bad weather and no bank holidays until April. Finally, there’s the enjoyment that comes from accomplishing something during the day and feeling productive. Some will even look...

Forecasting for 2017

As we approach the end of 2016, it is time to start looking forward to 2017. It’s become a bit of a tradition for me to write a post with a bit of a forecast on what I think the big topics in CRM will be for the New Year. So below are the issues that I think will be the three “big ticket” items in 2017, along with some questions you might want to consider asking your CRM and SaaS...

The Office Christmas …

Last week saw the the usual out of office OpenCRM Christmas Party. Last year we got all dressed to the nines and went Private Dining at Rockliffe Hall so this year we thought how on earth are we going to top that….. PAINTBALL AND PUB!!! We headed off to No Limits Paintball for an afternoon of snipering and target practice for some and lots of ooo’s and ahh’s from others, I was the latter! We had a blast (Pardon the pun)...

Interviewing for a CR…

Whenever I’ve been to an interview, my two favourite questions to ask are: “What is a normal day for someone in this role?” and “What will be your expectations of me after the first three months?” The first question is usually answered with a quick outline of basic jobs and then quickly descends into some of the more quirky, unusual, or random tasks that sometimes crop up. Every time I’ve asked this question, I have walked away with a far better...

Is It Safe To Head Ou…

There are so many ways of receiving the news, and this information becomes so much more powerful when it is designed to answer your questions or make you aware of issues specific to you. One great example of this is Transport Scotland. They have recently worked on developing a website and companion app that lets you know in real-time along which routes their trucks have been gritting the roads. The idea behind the live monitoring is to help give motorists confidence...