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.
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: http://opencrm.co.uk/crm-knowledgebase/kb6786897/Xero-Tax-Rates-Types.html
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.
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.
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.
You may also be interested in: