# Xero

Welcome to the DBSync Xero Connector documentation. This guide provides a comprehensive overview of the Xero Connector, including features, setup instructions, configuration, troubleshooting, and frequently asked questions. Use this documentation to understand, implement, and troubleshoot the Xero integration within the DBSync platform.

### Overview <a href="#overview" id="overview"></a>

The **Xero Connector** enables seamless integration between Xero accounting software and other applications or databases. It automates data flows, synchronizes financial data, and streamlines accounting processes.

### Features <a href="#features" id="features"></a>

* Bi-directional data sync between Xero and supported applications.
* Automated scheduling for regular data transfers.
* Custom field mapping between Xero and target systems.
* Error handling and logging for troubleshooting.
* Pre-built templates for common use cases (e.g., syncing invoices, contacts, payments).

### Supported Objects <a href="#supported-objects" id="supported-objects"></a>

| Xero Object  | Description                  |
| ------------ | ---------------------------- |
| Contacts     | Customers and suppliers      |
| Invoices     | Sales and purchase invoices  |
| Payments     | Payments related to invoices |
| Accounts     | Chart of accounts            |
| Items        | Inventory items              |
| Credit Notes | Credit notes issued/received |
| Employees    | Employee records             |

### Prerequisites <a href="#prerequisites" id="prerequisites"></a>

* Active Xero account.
* DBSync account with appropriate permissions.
* Internet connectivity.

### Setup Instructions <a href="#setup-instructions" id="setup-instructions"></a>

1. **Login to your DBSync iPaaS with your user credentials.**
2. **Add the Xero Connector:**
   * Navigate to the connector detail page for your Xero Connector.
3. **Connect to Xero via OAuth:**
   * On the connector detail page, you will find a **"Connect to Xero"** button.
   * Click the button to open the Xero authentication popup.
4. **Authenticate Your Xero Account:**
   * Enter your Xero account email/user ID and password in the popup.
   * Complete any additional authentication steps required by Xero (such as entering a code sent to your registered email).
   * Grant the requested permissions to allow DBSync to access your Xero data.
5. **Connection Confirmation:**
   * After successful authentication, your Xero organization name and user details will be displayed on the connector settings page.
   * This indicates that the Xero connector is now connected to your Xero account.

### **Field Mapping**

* Go to **Mappings**.
* Select Xero as the source or target.
* Map the required fields between Xero and your other application or database.

### Scheduling Jobs

* Set up triggers for real-time or scheduled sync.
* Define the frequency (e.g., hourly, daily).

### Uses Of Xero Connector <a href="#uses-of-xero-connector" id="uses-of-xero-connector"></a>

* **Eliminate manual data entry** by connecting Xero to other systems supported by DBSync.
* **Automate business processes** to increase efficiency across departments and reduce the need for data reconciliation.
* **Ensure accuracy** for your contacts, items, vendors, and invoice records when moving data in and out of Xero.
* **Streamline accounting workflows** by synchronizing financial data between Xero and your CRM, databases, or other business applications.
* **Reduce errors and save time** with automated data sync and real-time updates across platforms.

### Common Use Cases <a href="#common-use-cases" id="common-use-cases"></a>

* Sync Xero invoices to Salesforce opportunities.
* Import Xero contacts into CRM.
* Export payments from Xero to an external database.
* Real-time update of inventory items.

### Troubleshooting <a href="#troubleshooting" id="troubleshooting"></a>

| Issue                   | Possible Cause                | Solution                   |
| ----------------------- | ----------------------------- | -------------------------- |
| Authentication failed   | OAuth session expired         | Reconnect via OAuth        |
| Data not syncing        | Incorrect field mapping       | Check and update mappings  |
| Permission errors       | Insufficient Xero permissions | Update permissions in Xero |
| API rate limit exceeded | Too many requests             | Reduce sync frequency      |

### FAQs <a href="#faqs" id="faqs"></a>

**Q: Do I need to create a Xero app or manage API credentials?**\
A: No. Simply add the Xero Connector in DBSync and use the "Connect with OAuth" option to authenticate.

**Q: Can I sync custom fields?**\
A: Yes, custom field mapping is supported where available.

**Q: How do I handle duplicate records?**\
A: Xero doesn't allow duplicate records for most of its objects. DBSync will display an error message in the logs.

### Support <a href="#support" id="support"></a>

For further assistance, contact DBSync support or visit our community forums.
