by Business Fundamentals

SuiteCRM BI-Directional link to Xero
Automated BI-DIRECTIONAL synch between SuiteCRM and Xero, synch most recent record. Accounts, Contacts, Invoice and Products, connect and forget. Synch based on your criteria. This module also gives you the ability to manually update Accounts/Contacts/Invoice records to/from Xero

Free 30 day trial
Try it Now


My installation fails
My custom detail views have gone
My Invoices from Xero aren't displaying the line items correctly
My contact/account ALREADY exists in Xero
Can I create a link from my Xero account to the SuiteCRM account/contact record
I've installed the module but when I click on the Action menu all I get is a blank screen
MySQL error 1054: Unknown column line_item_id in field list
How do I migrate to a new/different Xero application?
When I try and send multiple entries to Xero the function times out with a 500 error. What should I do?
My changes in Xero don't appear to be synching to SuiteCRM

The installation of my package fails

Please check that you have the recommended SuiteCRM file/folder ownership and rights BEFORE installing the module. Generally, upload problems are associated with file/folder permissions. If the system generates an error message, please get back to us with as much detail as you can, Suite version, PHP version, platform and the error message

My custom detail views have gone

If you had custom detail view files configured for EITHER your Accounts OR Contacts modules, both of those configuration files have been backed up. They can be recovered from your /custom/modules//metadata folder HOWEVER doing so means the Xero Actions menu button will need to be re-enabled. The backup files are named detailviewdefs.php.BACKUP. If you rename the current detailviewdefs.php file to e.g. detailviewdefs.php.OLD and rename your detailviewdefs.php.BACKUP to detailviewdefs.php you will have re-enabled your old view.

To re-enable the Send to Xero button you will need to edit your detailviewdefs.php file, complete the following steps:

1 Navigate to the /custom/modules//metadata folder and open the detailviewdefs.php file for editing
2 Scroll down until you find the following a commented line that says

/*** Custom Xero code, cut and paste if required **/

3 Copy from there to the following line:

/** end of custom Xero code **/ 

4 Paste the code into the same position in your detailviewdefs.php file
5 Run an Admin -> Repair -> Quick Repair and Rebuild
6 Go to a Quote, Contact or Account record, open the Actions menu and make sure your Xero button is there

The line items in the Invoices downloaded from Xero are formatted weirdly

After installation of the Get Xero Invoices add-on you should go to the Admin -> Repair section and run a Quick Repair and Rebuild. Scroll to the bottom of the window that loads when the repair has completed and you will see a window with SQL in it, you MUST commit those changes to the database for the module to display your line-items correctly

My account/contact already exists in Xero

If your account/contact record already exists in Xero, clicking on the Send to Xero will create the connection to SuiteCRM and load the Xero ID and Xero Link fields to that record. The button will then change to Update to Xero, click on that to Update any changes you may make to that record to your Xero record

Can I create a link from my Xero account to the SuiteCRM account/contact record

When we send an Account/Contact record to Xero we also send the ID of that record and store it in the Xero Contact -> Account No. field. The majority of the time that ID will be the primary Contact in Xero as selected from SuiteCRM. If you use the Send to Xero function from a Contact record in SuiteCRM and that Contact has a related Account record in Suite, the Account Name is used to create the record in Xero (Xero is BUSINESS centric) and the Contact record becomes the primary contact record for that account in Xero - the contacts ID from Suite is sent to Xero

To create a custom link to the SuiteCRM record from Xero do the following:

  1. In your Xero account go to Settings -> General Settings -> Custom Contact Links
  2. Click on the Add A Custom Link button
  3. Enter a name in the Name field e.g. Xero to Suite
  4. In the Link Definition field enter https://your_crmsite_URL/index.php?module=Contacts&action=DetailView&record=
  5. Select ALL of that text
  6. From the Contact fields chooser, select the Contact Account No. field
  7. You should now see the URL change to https://your_crmsite_URL/index.php?module=Contacts&action=DetailView&record={!CONTACTACCOUNTNO}
  8. Save the link record and view a contact, you should see your custom link on the right hand side of the window in the Contact Details section

IMPORTANT This link will ONLY work with records created from the module that you selected in the URL e.g in the above example the Contacts module,.ANY records created from the SuiteCRM Accounts module will not link correctly, Send to Xero will send the Account ID NOT the Contact ID.

MySQL error 1054: Unknown column 'line_item_id' in 'field list'

You'll need to run an Admin QRR. Scroll to the bottom of the window that loads when the repair has completed and you will see a window with SQL in it, you MUST commit those changes to the database for the module to display your line-items correctly

How do I migrate this installation to a NEW Xero application?

In SuiteCRM go to the Admin -> Xero Configuration Setting module. DELETE any/all settings that are currently there. Create a new Xero Configuration using all the variables that relate to the new Xero Application. Save your changes. From the Actions menu select the Connect to Xero option


After saving the new record, click on the Connect to Xero link in the Actions menu. You should be redirected to the Xero site to allow your Suite instance access to the Xero app


You can also use the Remove Xero Account link to disconnect from this Xero app and to change the details and connect to a different app

Send to Xero times out when sending multiple records, what can I do?

If you are using the Suite to Xero module to process large numbers of records to Xero you may need to increase your PHP (max_execution_time) settings to allow the time taken to process each record OR break the process down into smaller numbers of records at a time.

My changes in Xero don't appear to be synching to SuiteCRM

There are a number of steps you can take to get your connection up and running again.
1. The synch process from Xero can at times be delayed and this could be because of a number of things outside of our control. Try refreshing the screen that you are expecting the changes to appear in a few times.
2.Go to your Admin->Xero Configuration Settings and run the Connect to Xero option. From the window that opens, give your App access. Check to see if your changes in Xero have synced to SuiteCRM
3.There can be times when your Xero webhook authentication 'breaks' Please login to the MyApps section of your Xero account and check the webhooks section. Ensure that the linkage is returning an OK message. If it is NOT try and reconnect (this may take a number of attempts) Once you have an OK message, check to see if your changes have synched to SuiteCRM. If not, open the record that you made changes to in Xero for editing, click on the Save button. Check the record in SuiteCRM
4. If none of the above work, you may have to delete the existing webhook in Xero and create a new one. Once you have done that, in SuiteCRM -> Xero Configuration Settings enter the NEW webhook key and save your changes. In your Xero webhook settings, initiate the connection and wait for an OK message. Check SuiteCRM to see if changes have been migrated. If not, open the record in Xero, save it and once again check in SuiteCRM

Saving Comment Saving Comment...