Search

Index

Revindex Storefront

Xero

Last updated on 2021-03-29 3 mins. to read

Xero is an online accounting and bookkeeping software that helps small businesses keep track of their invoices and payments. The following fields are required.

The Storefront supports exporting invoices suitable for importing into Xero manually. In addition, a sync software is available at extra charge to automatically sync invoices periodically on a scheduled basis.

Export invoices

To export invoices, simply go to the Sales > Orders screen. Xero recommends importing 500 invoices at a time. Therefore, it's a good practice to export out a subset of of your invoices regularly instead of accumulating for the entire year.

  1. Select the date range to export for the desired period.
  2. Choose the appropriate Order status. Typically, you want the "Ordered" or "Completed" orders.
  3. Once you have set your filter, click Search to list the qualified orders.


     
  4. Click Export view.
  5. In the Export dropdown, select "Xero invoice".
  6. Click the Export button to download the CSV file.
  7. Login to Xero and go to Business > Invoices.
  8. Click on Import.
  9. Browse the previously exported file.
  10. Select "No, ignore all address details" for the Would you like to update contact address details? question.
  11. Select "Tax Exclusive" for the Is the UnitAmount field tax inclusive or exclusive? question.
  12. Click Import to begin the import process.

Automatic sync

The automatic sync requires the use of a Task Scheduler (sold separately) to automatically schedule the synchronization of invoices to Xero on a periodic basis.

Please read below for information on how to obtain the certificate file and register your application with Xero first.

  1. Consumer Key - the consumer key from Xero API.
  2. Consumer Secret - the consumer secret from Xero API.
  3. Certificate file - Enter the full physical path to the pfx certificate file on your system. The file path should be readable by the calling application (e.g. C:\Temp\public_privatekey.pfx file).

Generate private/public key pair

  1. Download and install free OpenSSL utility.
  2. From the command prompt, go to the OpenSSL \bin folder where you installed or extracted the software.
  3. Run the following command to set your OpenSSL configuration path:

    set OPENSSL_CONF=c:\<OpenSSL folder path>\bin\openssl.cfg
  4. Run the following command to generate the private key:

    openssl genrsa -out privatekey.pem 1024
  5. Run the following command to generate the public key using the previously generated private key. Enter a large number of days if you want to avoid changing keys frequently:

    openssl req -newkey rsa:1024 -x509 -key privatekey.pem -out publickey.cer -days 3650
  6. Run the following command to export your public and private key into a single pfx file. Leave the password field blank when prompted.

    openssl pkcs12 -export -out public_privatekey.pfx -inkey privatekey.pem -in publickey.cer

Set up a private application in Xero

  1. ​Login to Xero API
  2. Under My Applications tab, add a new application.
  3. Select "Private". Give your application a name.
  4. Paste the content of your public key that you generated earlier (publickey.cer file).
  5. Agree to the terms and Save.
  6. Copy the Consumer Key and Consumer Secret tokens.

Chart of Account

Like most accounting software, Xero allows you to create different accounts to track various activities. Orders and payments sent to Xero need to be associated with accounts in your Xero's Chart of Accounts. It's very important that the tax rate associated with the Xero account needs to match the tax rate setup in the Storefront unless you allow the sync to override the tax.

  • Handling account - Used to track handling amount
  • Payment account - Used to track payments made to an order
  • Sales account - Used to track sales order details
  • Shipping account - Used to track shipping amount

Limitations

  • Xero API is limited to 60 requests/sec and a maximum of 1000 requests/day.
  • One-way sync of Completed orders from Storefront to Xero.
  • After initial sync, changes made to an order will not be synced to Xero. Only order cancellations will be updated once to Xero. You cannot undo a cancellation.
  • Xero base currency should match primary currency in Storefront.
  • If OverrideTax is false, the tax rate set per account must accurately match the tax calculation in the Storefront.
  • No product inventory sync.
 

 

Comments


Powered by Revindex Wiki