Xero
The Seven20 integration with Xero is designed to streamline the process of creating bills and invoices in Xero but is not intended to be a complete end-to-end solution. Billing data is sent from Seven20 to Xero, but invoices will need to be issued directly from within Xero and no financial transaction data is stored in Seven20.
The Seven20 integration only interacts with two Xero objects - Contacts and Invoices. Further information on these can be found in Xero's Accounting API documentation.
Create a Xero Invoice
To send a Billing (seven20__Billing__c) and its Billing Items (seven20__Billing_Item__c) to Xero, two conditions must be met:
- The required fields must be populated
- The seven20__Send_To_Xero__c field on Billing must be checked
It is recommended that this process is done using the Billing Builder Component by adding the mapped fields to the component alongside the seven20__Send_To_Xero__c field.
Create a Xero Contact
If a Xero Contact does not already exist it will automatically be created when a Billing is sent to Xero; if the Xero Contact has already been created via Seven20 it will automatically be linked to the resulting Invoice in Xero.
Contacts in Xero can be mapped from two objects in Seven20, Address or Account. If the Address lookup (seven20__Billing_Address__c) is populated on the Billing, the Xero Contact will be created using the mapped fields from the Address; otherwise, it will be created using the Account from the lookup (seven20__Account__c) on the Billing record.
The integration is designed primarily to use the Address object as this allows for a more flexible hierarchy due to the one-to-many relationship between Account and Address. As such, the field mappings for Address are more comprehensive and it is recommended to use Address, with Account acting as a fallback.
Receive Status Updates
If the webhook has been correctly set up, Seven20 will receive and reflect updates to the Billing Status (seven20__Status__c) field and the Billing Item Status (seven20__Status__c) field on the relevant records when an update to the status occurs in Xero. The statuses are mapped as below:
| Xero Status | Seven20 Status |
|---|---|
| AUTHORISED | Authorised |
| PAID | Paid |
| DRAFT | Draft |
| SUBMITTED | Submitted |
| VOIDED | Voided |
| DELETED | Deleted |
Ensure the Seven20 status values are available in the relevant picklists
Add Existing Xero Contacts Into Seven20
If integrating with an existing Xero that contains data, some data migration will be required to allow users to create invoices against the correct entity in their Xero. Additional steps are required to achieve this beyond a simple data migration due to the multi-organisational nature of the integration.
The integration supports multiple Xero organisations through an additional object, Xero Account (seven20__Xero_Account__c). Most of the time these records are created in the background without the need for user interaction. However, for each existing Xero Contact not created via Seven20, a Xero Account record must be created.
The Xero Account object acts as a junction object between either the Address or Account object (it is possible to map from either object), the Xero Contact record and the Xero Organisation the Xero contact is located in. It is structured as below:
| Seven20 Xero Account | Type | Details |
|---|---|---|
| seven20__Account__c | Lookup(Account) | Which Account record is being mapped to a Xero contact |
| seven20__Address__c | Lookup(seven20__Address__c) | Which Address record is being mapped to a Xero contact |
| seven20__Xero_Contact_Id__c | Text(255) | The Id from Xero for the relevant Contact record |
| seven20__Xero_Tenant_Id__c | Text(255) | The Id for the Xero Organisation this contact record is located in |
Only one of seven20__Account__c or seven20__Address__c should ever be populated.