# Xero

### Snapshot

| Features                        | Details                                            |
| ------------------------------- | -------------------------------------------------- |
| Release Status                  | Released                                           |
| Source API Version              | v2                                                 |
| Table Selection                 | Yes                                                |
| Column Selection                | Yes                                                |
| Edit Integration                | Yes                                                |
| Replication Type Selection      | No                                                 |
| Authentication Parameters       | <p>Xero email<br>Xero password</p>                 |
| Replication Type                | <p>Full Replication <br> Key based Replication</p> |
| Replication Key                 | <p>NA <br> DATE</p>                                |
| Suggested Replication Frequency | 24 hrs                                             |

### Integrate Xero with Daton

1. Signin to Daton&#x20;
2. Select xero from Integrations page
3. Provide Integration Name Replication Frequency and History. Integration name would be used in creating tables for the integration and cannot be changed later&#x20;
4. Provide your xero account email and Password.
5. After providing the email and password it prompts for the company, select the company to authorize Daton to periodically extract data from xero.
6. Post successful authentication you will be prompted to choose from the list of available tables
7. Then select all required fields for each table
8. Submit the integration.

### Workflow

1. Integrations would be in Pending state initially and will be moved to Active state as soon as the first job loads data successfully on to the configured warehouse
2. Users would be able to edit/pause/re-activate/delete integration anytime
3. Users can view job status and process logs from the integration details page by clicking on the integration name from the active list

| Tables/Apis supported |             |
| --------------------- | ----------- |
| BankTransactions      | Accounts    |
| BankTransfers         | Invoices    |
| BatchPayments         | Contacts    |
| ContactGroups         | CreditNotes |
| Currencies            | Employees   |
| GetProjects           |             |

### Xero Data

**Accounts**

Purpose: Returns all the results of Accounts.

Source Api documentation  <https://developer.xero.com/documentation/api/accounts>

Replication: Key-Based Replication

Replication Key: lastRunDate

**Fields**

| Name                    | Target Datatype |
| ----------------------- | --------------- |
| AccountId               | STRING          |
| Name                    | STRING          |
| Code                    | STRING          |
| Type                    | STRING          |
| Taxtype                 | STRING          |
| EnablePaymentsTOAccount | BOOLEAN         |
| BankAccountNumber       | STRING          |
| BankAccountType         | STRING          |
| CurrencyCode            | STRING          |

**BankTransfers**

Purpose: Returns a list of all the bank transfers.

Source Api documentation  <https://developer.xero.com/documentation/api/bank-transfers>

Replication: Key-Based Replication

Replication Key: lastRunDate

**Fields**

| Name                  | Target Datatype |
| --------------------- | --------------- |
| BankTransferID        | STRING          |
| CreatedDateUTCString  | STRING          |
| CreatedDateUTC        | STRING          |
| DateString            | STRING          |
| Date                  | STRING          |
| FromBankAccount       | RECORD          |
| AccountID             | STRING          |
| Name                  | STRING          |
| ToBankAccount         | RECORD          |
| AccountID             | STRING          |
| Name                  | STRING          |
| Amount                | STRING          |
| FromBankTransactionID | STRING          |
| ToBankTransactionID   | STRING          |

**BankTransactions**

Purpose:Returns the results of all the bank transactions.

Source Api documentation  <https://developer.xero.com/documentation/api/banktransactions>

Replication: Key-Based Replication

Replication Key: lastRunDate

**Fields**

| Name              | Target Datatype |
| ----------------- | --------------- |
| Contact           | RECORD          |
| ContactID         | STRING          |
| Name              | STRING          |
| DateString        | STRING          |
| DATE              | STRING          |
| Status            | STRING          |
| LineAmountTypes   | STRING          |
| LineItems         | RECORD          |
| Description       | STRING          |
| UnitAmount        | STRING          |
| TaxType           | STRING          |
| TaxAmount         | STRING          |
| LineAmount        | STRING          |
| AccountCode       | STRING          |
| Quantity          | STRING          |
| LineItemID        | STRING          |
| SubTotal          | STRING          |
| TotalTax          | STRING          |
| Total             | STRING          |
| UpdatedDateUTC    | STRING          |
| CurrencyCode      | STRING          |
| BankTransactionID | STRING          |
| BankAccount       | RECORD          |
| AccountID         | STRING          |
| Code              | STRING          |
| Name              | STRING          |
| Type              | STRING          |
| Reference         | STRING          |
| IsReconciled      | STRING          |

**BatchPayments**

Purpose:Returns a result of all the batch payments.

Source Api documentation  <https://developer.xero.com/documentation/api/batch-payments>

Replication: Key-Based Replication

Replication Key: lastRunDate

**Fields**

| Name           | Target Datatype |
| -------------- | --------------- |
| Account        | RECORD          |
| AccountID      | STRING          |
| Reference      | STRING          |
| BatchPaymentID | STRING          |
| DateString     | STRING          |
| Date           | STRING          |
| Payments       | RECORD          |
| Invoice        | RECORD          |
| InvoiceID      | STRING          |
| Payments       | STRING          |
| CreditNotes    | STRING          |
| Prepayments    | STRING          |
| Overpayments   | STRING          |
| HasErrors      | BOOLEAN         |
| IsDiscounted   | BOOLEAN         |
| LineItems      | STRING          |
| PaymentID      | STRING          |
| Reference      | STRING          |
| Amount         | NUMERIC         |
| Type           | STRING          |
| Status         | STRING          |
| TotalAmount    | NUMERIC         |
| UpdatedDateUTC | STRING          |
| IsReconciled   | BOOLEAN         |

**Contacts**

Purpose:Returns a result of all the contacts.

Source Api documentation  <https://developer.xero.com/documentation/api/contacts>

Replication: Key-Based Replication

Replication Key: lastRunDate

**Fields**

| Name                      | Target Datatype |
| ------------------------- | --------------- |
| ContactID                 | STRING          |
| ContactStatus             | STRING          |
| Name                      | STRING          |
| FirstName                 | STRING          |
| LastName                  | STRING          |
| EmailAddress              | STRING          |
| SkypeUserName             | STRING          |
| BankAccountDetails        | STRING          |
| TaxNumber                 | STRING          |
| AccountsReceivableTaxType | STRING          |
| AccountsPayableTaxType    | STRING          |
| Addresses                 | RECORD          |
| AddressType               | STRING          |
| AddressLine               | STRING          |
| City                      | STRING          |
| PostalCode                | STRING          |
| AttentionTo               | STRING          |
| Phones                    | RECORD          |
| PhoneType                 | STRING          |
| PhoneNumber               | STRING          |
| PhoneAreaCode             | STRING          |
| PhoneCountryCode          | STRING          |
| UpdatedDateUTC            | STRING          |
| IsSupplier                | BOOLEAN         |
| IsCustomer                | BOOLEAN         |
| DefaultCurrency           | STRING          |

**ContactGroups**

Purpose: Returns a list of all the Contact groups.

Source Api documentation  <https://developer.xero.com/documentation/api/contactgroups>

Replication: Full Replication

Replication Key: NA

**Fields**

| Name           | Target Datatype |
| -------------- | --------------- |
| ContactGroupID | STRING          |
| NAME           | STRING          |
| Status         | STRING          |

**Employees**

Purpose: Returns a list of all the employees.

Source Api documentation  <https://developer.xero.com/documentation/api/employees>

Replication: Key-Based Replication

Replication Key: lastRunDate

**Fields**

| Name           | Target Datatype |
| -------------- | --------------- |
| EmployeeID     | STRING          |
| Status         | STRING          |
| FirstName      | STRING          |
| LastName       | STRING          |
| ExternalLink   | RECORD          |
| Url            | STRING          |
| Description    | STRING          |
| UpdatedDateUTC | STRING          |

**Invoices**

purpose:Returns a list of all the Invoices.

Source Api documentation: <https://developer.xero.com/documentation/api/invoices>

Replication: Key-Based Replication

Replication Key: lastRunDate

**Fields**

| Name               | Target Datatype |
| ------------------ | --------------- |
| Type               | STRING          |
| Contact            | RECORD          |
| ContactID          | STRING          |
| ContactStatus      | STRING          |
| Name               | STRING          |
| Addresses          | RECORD          |
| AddressType        | STRING          |
| Phones             | REOCRD          |
| PhoneType          | STRING          |
| UpdatedDateUTC     | STRING          |
| IsSupplier         | STRING          |
| IsCustomer         | STRING          |
| Date               | STRING          |
| DueDate            | STRING          |
| DateString         | STRING          |
| DueDateString      | STRING          |
| Status             | STRING          |
| LineAmountTypes    | STRING          |
| LineItems          | RECORD          |
| Description        | STRING          |
| Quantity           | STRING          |
| UnitAmount         | STRING          |
| TaxType            | STRING          |
| TaxAmount          | STRING          |
| LineAmount         | STRING          |
| AccountCode        | STRING          |
| Tracking           | RECORD          |
| TrackingCategoryID | STRING          |
| Name               | STRING          |
| Option             | STRING          |
| LineItemID         | STRING          |
| SubTotal           | STRING          |
| TotalTax           | STRING          |
| Total              | STRING          |
| UpdatedDateUT      | STRING          |
| CurrencyCode       | STRING          |
| InvoiceID          | STRING          |
| InvoiceNumber      | STRING          |
| Payments           | RECORD          |
| Date               | STRING          |
| Amount             | STRING          |
| PaymentID          | STRING          |
| AmountDue          | STRING          |
| AmountPaid         | STRING          |
| AmountCredited     | STRING          |

**GetProjects**

purpose:Returns the list of all the Projects.

Source Api documentation  <https://developer.xero.com/documentation/projects/projects#GET>

Replication: Full Replication

Replication Key: NA

**Fields**

| Name                      | Target Datatype |
| ------------------------- | --------------- |
| projectId                 | STRING          |
| contactId                 | STRING          |
| name                      | STRING          |
| currencyCode              | STRING          |
| minutesLogged             | NUMERIC         |
| totalTaskAmount           | RECORD          |
| currency                  | STRING          |
| value                     | NUMERIC         |
| totalExpenseAmount        | RECORD          |
| currency                  | STRING          |
| value                     | NUMERIC         |
| minutesToBeInvoiced       | NUMERIC         |
| taskAmountToBeInvoiced    | RECORD          |
| currency                  | STRING          |
| value                     | NUMERIC         |
| taskAmountInvoiced        | RECORD          |
| currency                  | STRING          |
| value                     | NUMERIC         |
| expenseAmountToBeInvoiced | RECORD          |
| currency                  | STRING          |
| value                     | NUMERIC         |
| expenseAmountInvoiced     | RECORD          |
| currency                  | STRING          |
| value                     | NUMERIC         |
| projectAmountInvoiced     | RECORD          |
| currency                  | STRING          |
| value                     | NUMERIC         |
| deposit                   | RECORD          |
| currency                  | STRING          |
| value                     | NUMERIC         |
| depositApplied            | RECORD          |
| currency                  | STRING          |
| value                     | NUMERIC         |
| creditNoteAmount          | RECORD          |
| deposit                   | RECORD          |
| currency                  | STRING          |
| deadlineUtc               | STRING          |
| totalInvoiced             | RECORD          |
| currency                  | STRING          |
| value                     | NUMERIC         |
| totalToBeInvoiced         | RECORD          |
| currency                  | STRING          |
| value                     | NUMERIC         |
| estimate                  | RECORD          |
| currency                  | STRING          |
| value                     | NUMERIC         |
| status                    | STRING          |

**Currencies**

purpose:Returns the list of all the currencies.

Source Api documentation  <https://developer.xero.com/documentation/api/currencies>

Replication: Full Replication

Replication Key: NA

**Fields**

| Name        | Target Datatype |
| ----------- | --------------- |
| Code        | STRING          |
| Description | STRING          |

**CreditNotes**

purpose:Returns the list of all the Credit notes.

Source Api documentation  <https://developer.xero.com/documentation/api/credit-notes>

Replication: Key-Based Replication

Replication Key: lastRunDate

**Fields**

| Name             | Target Datatype |
| ---------------- | --------------- |
| Contact          | RECORD          |
| ContactID        | STRING          |
| Name             | STRING          |
| DateString       | STRING          |
| Date             | STRING          |
| Status           | STRING          |
| LineAmountTypes  | STRING          |
| SubTotal         | NUMERIC         |
| TotalTax         | NUMERIC         |
| Total            | NUMERIC         |
| UpdatedDateUTC   | STRING          |
| CurrencyCode     | STRING          |
| FullyPaidOnDate  | STRING          |
| Type             | STRING          |
| CreditNoteID     | STRING          |
| CreditNoteNumber | STRING          |
| CurrencyRate     | NUMERIC         |
| RemainingCredit  | NUMERIC         |
| Allocations      | RECORD          |
| Amount           | NUMERIC         |
| Date             | STRING          |
| Invoice          | RECORD          |
| InvoiceID        | STRING          |
| InvoiceNumber    | STRING          |
