# Xero Synchronisation

**Maica Client Management** natively integrates with the Xero financial platform for the purposes of exchanging invoices and payments, as shown in the below flowchart.

<figure><img src="https://documents.lucid.app/documents/883649a5-1d1d-466f-a217-c3d2eef328b8/pages/3qfqm6EvMkyb?a=13334&#x26;x=37&#x26;y=-1255&#x26;w=1370&#x26;h=749&#x26;store=1&#x26;accept=image%2F*&#x26;auth=LCA%2032ed37942f955d943541730a29bf3d049eed491c8fc4f67db8040202ff7f4f11-ts%3D1699836340" alt=""><figcaption><p>Maica's Xero Flow</p></figcaption></figure>

### Synchronising Individual Invoices

It is possible to synchronise individual invoices using the Maica solution by clicking on the `Sync with Xero` button on any given invoice record, as shown below.

<figure><img src="https://558904096-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKdn9R0jFmixyPeVowFpF%2Fuploads%2FGeAeniU0y9kU00mMuOeR%2FSync.png?alt=media&#x26;token=326f3c7e-cb6b-4ab1-99c2-71d0f20a7d39" alt=""><figcaption><p>Synchronising an invidual Invoice</p></figcaption></figure>

Once clicked, Maica will connect to your configured Xero instance and ask you to confirm that you would like to synchronise this invoice, as shown below.

<figure><img src="https://558904096-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKdn9R0jFmixyPeVowFpF%2Fuploads%2FKIAzj6BPYH84wOg1HrZv%2FXero%202.png?alt=media&#x26;token=3e5a2e40-39dd-4d8f-a6f1-f22c3bc358b1" alt=""><figcaption></figcaption></figure>

This will synchronise the invoice to Xero using the following mapping details.

| Maica Information | Xero Information                                                                                                                                                       |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Participant       | The participant of the Maica invoice will become the Contact of the Xero invoice.                                                                                      |
| Invoice Number    | The Maica invoice number will be captured in the `Reference` field in Xero and the Xero invoice number will be captured in `Xero Invoice Number`.                      |
| Support Item      | The Maica Support Item will be captured as the Xero Invoice Line Item `Description`; each Maica Invoice Support Item will have a corresponding Xero Invoice Line Item. |
| Rate              | The Maica Invoice Line Item Rate will be captured in the Xero `Unit Price`.                                                                                            |
| Quantity          | The Maica Invoice Line Item Quantity will be captured in the Xero `Quantity`.                                                                                          |
| Account           | The Xero `Account` will be derived from the Maica Support Item `Finance Account Code` field.                                                                           |

A sample Xero invoice is shown in the screenshot below for your reference.

<figure><img src="https://558904096-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKdn9R0jFmixyPeVowFpF%2Fuploads%2FodEwqKm1m6hUURVlhAEH%2Fimage.png?alt=media&#x26;token=312d7186-dba8-4949-97ef-93bff0ebfdda" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You are able to overwrite the default Product (Support Item) `Description` by using the `Xero Invoice Line Description` field instead which will then be used to create the Invoice Line Item `Description` in Xero.
{% endhint %}

### Synchronising Invoices via Salesforce Flows

In addition to being able to synchronise invoices individually, it is also possible to do this in bulk using Maica's Flow called `Maica - Xero Invoice Sync Flow` which can be scheduled as required and will execute the sync on a recurring basis.

### Salesforce Product Configuration

In order to use Salesforce `Products` on invoices that are synchronised to `Xero`, it is important to set a few `Product` fields to the appropriate values, as outlined below. &#x20;

<table><thead><tr><th width="296">Salesforce Product Field</th><th>Value</th></tr></thead><tbody><tr><td>Xero Invoice Line Description</td><td>This will be used instead of the <code>Name</code> on the <code>Invoice Line Item</code> if populated.</td></tr><tr><td>Finance Account Code</td><td>This needs to correspond to the appropriate <code>Xero</code> account code, as shown in the image below.</td></tr><tr><td>Tax Type</td><td>This needs to correspond to the appropriate <code>Xero</code> tax type, as shown in the image below.</td></tr></tbody></table>

<figure><img src="https://558904096-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKdn9R0jFmixyPeVowFpF%2Fuploads%2FzdIGjBJ4Pl87B35ob65H%2FXero.png?alt=media&#x26;token=f84f60c0-a2ad-4c72-a8c7-5c3e49736a1e" alt=""><figcaption></figcaption></figure>
