# Sync customers Prerequisite The user must have connected their Accounting Software with Adfin to enable this flow. This is completed in their [Adfin Console](https://console.adfin.com/settings/integrations) hr # Create customers Creating a customer in Adfin will automatically try and create it in the connected Accounting Software. When Adfin completes this operation, it will return `Customer.externalData` after a successful request. ## External Data responses ```json Xero Response "externalData": [ { "connectorType": "Xero", "id": "885f4605-7070-46ed-984a-6fb5dc47361b", "name": "John Smith" } ``` ```json QuickBooks Response "externalData": [ { "connectorType": "Quickbooks", "id": "37215b54-0499-4456-84fc-38ed39fd1883", "name": "John Smith" } ``` ## Flow Diagram Image description hr # Retrieve customers ## Retrieve all External Data If you are connecting to an Adfin and are expecting existing data (eg. customers already imported from Xero or Buickbooks), it is important to make sure you read all of the existing data. This is to prevent data mapping issues where you create a new customer, when one already existing. It is recommended to retreive all data via a GET API call. ## External Data responses Adfin will return populated `Customer.externalData` when a customer is synched with an Accounting software. ```json Xero Response "externalData": [ { "connectorType": "Xero", "id": "885f4605-7070-46ed-984a-6fb5dc47361b", "name": "John Smith" } ``` ```json QuickBooks Response "externalData": [ { "connectorType": "QuickBooks", "id": "37215b54-0499-4456-84fc-38ed39fd1883", "name": "John Smith" } ``` ## Flow diagram Image description hr # Updating Customer information Adfin has read and write access to accounting systems as part of our integrations. PUT requests to customers When updating customer information from your platform, you must always remember the following: - If a customer is linked to Accounting Software, updates to the customer will cascade through Adfin and the Accounting Software. - Adfin does not currently support PATCH requests, meaning that your PUT request must contain all the information. ## Recommend update pattern Image description