Xero - common errors

The client SHOULD NOT delete the invoice in Xero if they find any mistakes in the amounts. They only need to re-export the Expedo invoice.

Deleting the invoice in Xero will cause an error during re-export and it will require the dev to resolve it in the backend.

  1. The contact name already exists. Please enter a different contact name

    1. Cause

      1. Host/Worker is linked to a Xero contact (XeroID = xero contact ID)

         

      2. The client creates a new contact in Xero (different XeroID)

      3. The client renames the Expedo company with the same name as the new contact (note: the company is still linked to the first contact)

      4. Error occurs when the client exports the invoice/rcti.

    2. Fix

      1. Fix is to set the client/employee table XeroID to null

      2. Permanent fix has been pushed to v3 in https://expedo.atlassian.net/browse/TTBP-595

  2. Invalid company info

    1. Cause

      1. User authenticated to a Xero account whose organization name does not match the Expedo company name

    2. Related tickets

      1. https://expedo.atlassian.net/browse/TTBP-434

    3. Fix

      1. Re-authenticate and select the correct Xero organization (if the user has multiple organizations)

      2. Edit the Expedo company name to match the Xero organization’s name
        Xero

        Expedo

         

  3. The contact with the specified contact details has been archived. The contact must be un-archived before creating new invoices or credit notes.

    1. Cause

      1. The Xero contact that the host is linked to has been archived

    2. Fix

      1. Have the client unarchive the contact before exporting the invoice

      2. Or create a new contact record in Xero

  4. Invoice # must be unique

    1. Cause

      1. There is an invoice in Xero with the same invoice # as the Expedo invoice the user is trying to export (created manually in Xero or exported from another invoice with the same number)

    2. Fix

      1. Either void the Expedo invoice and create a new one for export

      2. Or update the Xero invoice’s invoice number before exporting the invoice in Expedo

  5. Invoice not of valid status for modification

    1. Cause

      1. The invoice has either been archived, voided, awaiting payment or paid in Xero

      2. In this case, we cannot edit the Xero invoice anymore

    2. Fix

      1. Void the invoice in Expedo and create a new one for export (for archived, voided or paid invoices in Xero)

      2. For invoices that are confirmed exported to Xero with an awaiting payment status, just inform the client to manually update the invoice status to Exported in Expedo

  6. Error: unauthorized_client : Unknown client or client not enabled

    1. Cause

      1. Xero is not yet enabled for the client’s Expedo instance

    2. Related ticket

      1.  https://expedo.atlassian.net/browse/LS-1529

    3. Fix

      1. Devs must set up the client in the Xero Developer account first before they can use Xero.

  7. Xero API minute rate limit error calling GetContacts

     

    1. Cause

      1.  According to Xero’s documentation, there is a limit of 60 API calls per minute.
        https://developer.xero.com/documentation/guides/oauth2/limits/

    2. Related ticket

    3. Fix

      1. Ask the client to re-export the invoice after 1 minute when they get this error. This is a temporary fix while working on a permanent solution.

  8. The TaxType code ‘OUTPUT' cannot be used with the account code '<code>’.

    1. Cause

      1. The account code used is not the registered revenue/income code in their Xero settings. Possibly, it is for Expense only.

    2.  Fix

      1. Inform the client to use the account code registered as revenue/income in their Xero settings and not the expense code.

  9. Unable to export to Xero / Export invoice button is missing / Export status column shows “NONE”

    1. Cause

      1. Company profile has not been configured correctly

    2. Fix

      1. Ensure the desired accounting integration is enabled under the Integrations tab (Xero/MYOB/Quickbooks)

      2. Ensure the correct integration is selected under the “Export to” field under the Timesheet settings (Agency settings if exporting agency to host invoices and Admin settings if exporting admin to host invoices)



         

  10. An existing Invoice with the specified Type and InvoiceID could not be found

    1. Cause

      1. The RCTI/Invoice has already been exported, but the client deleted it in Xero and tried to re-export it.

    2. Related Ticket

    3. Fix

      1. Remove the value from ExternalID in the DB.

 

  1. Unable to export an invoice to Xero due to ValidationErrors:

    1. Cause

      1. There is a negative value in the Unit or Quantity column on the affected invoice.

    2. Fix

      1. Update the Unit or Quantity to a positive value, then update the rate to reflect the negative amount.