Xero For Bluetrait
Introduction
Xero For Bluetrait is a module which allows you to push invoices from Bluetrait to Xero.
This documentation assumes you already have a working Bluetrait installation.
Installation
Enable the Xero module in the Modules Settings page.
Configuration
In the Xero Settings page, enter the Consumer Key and RSA Private Key for your Xero application.
If you have not yet set up your Xero application, follow these instructions:
- Generate a public/private key pair using Open SSL by running the following commands:
openssl genrsa -out privatekey.pem 1024 openssl req -new -x509 -key privatekey.pem -out publickey.cer -days 1825
- For more information on how to do this, see Xero’s developer documentation.
- Copy the RSA Private Key from the PEM file which will have been created. Make sure to include
-----BEGIN RSA PRIVATE KEY-----
and-----END RSA PRIVATE KEY-----
- Add your private application in the Xero Developer portal. For more detailed instructions on how to do this, see Xero’s developer documentation.
- Upload to your Xero application the public certificate CER file you generated in step one.
Once you save your Xero application it will generate you a Consumer Key. Copy this into the Xero Settings page of Xero For Bluetrait.
If your Xero application has already been set up:
- Locate the private key PEM file you would have created to copy and paste your RSA Private Key, make sure to include
-----BEGIN RSA PRIVATE KEY-----
and-----END RSA PRIVATE KEY-----
- Log into the Xero Developer portal. Choose your application from the My Apps menu.
- Copy the Consumer Key into the Xero For Bluetrait Settings page.
Once you have saved your Keys, you can get your Xero organisation’s Short Code by clicking the Get Short Code button. This will allow Bluetrait to provide you with a hyperlink from your Bluetrait Invoice to your Xero invoice.
By default, invoices will be pushed to Xero with the line items as they appear in Bluetrait. To instead push invoices with the line items grouped by Account Group (and sub-grouped by Sales Tax), this can also be set in the Xero Settings page.
Setup
Before you can push invoices to Xero, you will have to set up your Bluetrait Companies, Sales Tax and Account Groups, and link these to your invoice line items.
Companies: on the CRM > Companies page, edit your Companies (or add new ones) so that each Company for which you want to push invoices to Xero has a Xero Contact as an External ID.
Sales Tax: On the Billing Settings page, edit your Sales Tax (or add new ones) so that each Sales Tax item has a Xero Tax Type as an External ID. Enter OUTPUT for GST, EXEMPTOUTPUT for no tax, and see Report Tax Types for other options.
Account Groups: On the Billing Settings page, edit your Account Groups (or add new ones) so that each Account Group has a Xero Account Code as an External ID. Account Codes can be found by going to the Accounting > Chart of Accounts page in your Xero application.
The setup to allow invoice line items to be linked to Account Groups is as follows:
- So that product line items can be pushed to Xero, on the Billing Settings page, edit your Product Groups (or add new ones) so that each Product Group has an Account Group as an External ID.
- So that project line items can be pushed to Xero, on the CRM Settings page, edit your Project Groups (or add new ones) so that each Project Group has an Account Group as an External ID.
- If you have the Timesheets module enabled, so that timesheet line items can be pushed to Xero, in the Timesheets Settings page edit Timesheets Categories (or add new ones) so that each Timesheet Category has an Account Group as an External ID.
Pushing Invoices
Invoices can be pushed if they have the status of paid, unpaid, or overdue.
Individual invoices: When viewing an individual invoice on Bluetrait, it can be pushed to Xero by clicking the Push to Xero button.
Bulk pushing: Multiple invoices can be pushed at once on the Billing Invoices page:
- Select the invoices you wish to push using the checkboxes
- From the Selected Invoices menu at the bottom of the page choose Push to Xero and click Do
- You will be shown a summary of the selected invoices and whether or not they can be pushed to Xero.
- If at least one of the selected invoices can be pushed to Xero, the Push button will be enabled.
- Clicking the Push button will push all invoices which can be pushed.
Re-Pushing: invoices which have already been pushed can be re-pushed to update them on Xero. Following the same instructions outlined above for pushing.
Once pushed, view an invoice on Bluetrait to see a link to that same invoice on Xero. (This will only be displayed if your Xero application’s Short Code has been correctly configured n the Xero for Bluetrait Settings page).