CRM integration guide


The Xero API provides an easy way for developers to integrate their CRM system with Xero. There are numerous integration options, and some aspects of how Xero works that are important to note.

Contact syncing

Xero data structure

Xero has a relatively flat contact structure which essentially maps to a company entity in most CRM systems. While a contact does have first and last name fields, these do not correlate directly to a person entity (see contact person below). A typical integration might map a company and accounts/billing contact person to a contact in Xero.

In Xero, the ContactID, ContactNumber and Name elements are unique identifiers, and both ContactNumber and ContactID are uniform resource identifiers. For further information, see our documentation on the Contacts endpoint.

Contact Person

In addition to the fields available in the primary contact element, 'ContactPerson' elements are also available - these are up to five person entities stored within a contact. For more details on the fields available, see our contacts documentation.

Contact Number

The ContactNumber is a unique identifier that can be updated via the API only. This field is read only on the Xero contact screen, used to identify contacts in external systems.

Contact links

It is possible to place a custom link on a contact in Xero. This allows the user, when viewing a contact in the Xero application, to view the contact record in an external application.

contacts - link contact details-21fb95

When used with an identifier such as ContactNumber or ContactID, an external system can be linked to, to view the CRM data of that contact.

For more details on the setup of a custom contact link, see this help centre guide.

Summary of debtor and creditor information

Xero contains useful financial data that can be surfaced in CRM applications: what invoices are outstanding, sales & purchases history, average days to pay etc. This could be used drive workflows based on data in Xero (invoice is now overdue = follow up call, invoice has been paid = thank you call).

A number of endpoints could be used to leverage this data, primarily the Invoices endpoint, but also the aged receivables/payables by contact report and payments endoint may be of value.

Financial data entry

If your application wishes to segment access with the sales team working in the CRM application, and the accounts team working in Xero, streamlining the invoicing process by allowing sales staff to create draft invoices from won leads or by some other form of data entry within the CRM application may be an option.