QuickBooks Online Integration (au.com.agileware.civiquickbooks)¶
This is a CiviCRM extension which integrates CiviCRM with QuickBooks Online. CiviCRM Contacts and Contributions are pushed to your QuickBooks Online account, QuickBooks Invoices are pulled into CiviCRM, updating the Contribution status. Synchronise all things!
Integration of the two systems saves you time by not having to do repetitive data entry in your accounting system and CiviCRM. This extension does the work for you!
QuickBooks Online provides different Tax APIs for US and non-US countries. This extension has been developed and tested with:
- QuickBooks Online, Australia (AU)
- QuickBooks Online, United States (USA)
- QuickBooks Online, United Kingdom (UK)
- QuickBooks Online, Canada (CA)
CiviQuickBooks will only synchronise contacts to Quickbooks Online from your CiviCRM when a Contribution is added to them, either through online payments or administrator action.
CiviQuickBooks version 2 implements the OAuth 2.0 protocol for QuickBooks Online - if you are upgrading from a previous version you will need to generate new keys. See the Configuration section below.
The extension is licensed under the terms in LICENSE.txt.
Requirements¶
- CiviCRM 6.11+
- The Account Sync extension,
declared as a dependency in
info.xmland required for CiviQuickBooks to function
Installation¶
- Ensure the CiviContribute component is enabled
- Download the latest version of this extension
- Unzip in the CiviCRM extension directory, as defined in
System Settings / Directories. - Download the CiviCRM extension, Account Sync.
- In CiviCRM, go to
System Settings / Extensionsand enable both extensions, Account Sync and QuickBooks Online Integration. QuickBookswill now be available in theAdministermenu.- Click on the
QuickBooksmenu to display theQuickBooks Online Settingspage. - Update the CiviQuickBooks Online configuration as detailed below.
Configuration¶
To use this extension, you need to generate a QuickBooks Online consumer key and secret.¶
- You will need an Intuit Developer Account, sign up at
(https://developer.intuit.com/). This account must be added as a user of
Adminuser type to the QuickBooks Online company being integrated. - Once your developer account is created and linked, Go to the
My Appssection and selectCreate new app. - Use the
Select APIsbutton in theJust start codingcard, then select the Accounting API. - From the App dashboard, select the
OAuth 2.0 keys - In the
Production Keyssection, copy theClient IDandClient Secretkeys. - Paste these values into the CiviQuickBooks Online Settings page and submit.
- Copy the Redirect URI that is present into the
Production Keyssection of your App in the Intuit Developer site.
CiviQuickBooks Online Settings page is shown below.

Note: changing the Client ID or Client Secret on this page clears any stored access/refresh tokens, so you will need to re-authorise (see below) after doing so.
Authorise CiviQuickBooks access to your QuickBooks Online account.¶
- Click the
Authorizelink as shown below theAccess Token Expiry Datefield. - The QuickBooks Online Authentication page will now be displayed.
- Follow the instructions and to complete the authentication process.
- After authentication, you will be redirected back to CiviCRM.
- Open the
QuickBooks Online Settingspage. - To confirm QuickBooks Online authentication a date will be shown in the
Access Token Expiry Datefield. If no date is shown then authentication has failed. Repeat the process.
Once authorised, the extension records which QuickBooks Online company country (AU, US, UK, CA, etc.) your connected company uses; this is detected automatically from QuickBooks and is not a setting you configure yourself.
Map your QuickBooks product/service to CiviCRM Financial account codes¶
Each QuickBooks Product/Service has a unique name. This is used in the CiviCRM Financial Account codes to correctly code each Invoice in QuickBooks Online.
- Open the QuickBooks Company, go to product/service settings page (https://sandbox.qbo.intuit.com/app/items).
- Identify each QuickBooks Product/Service that you want to sync with CiviCRM.
- Open the CiviCRM Financial Account setting page
(civicrm/admin/financial/financialAccount) and update the
Acctg Codeof corresponding Financial account to be the same as each QuickBooks Product/Service name:
- When setting up Contributions in CiviCRM, ensure that the Financial Type for the Contribution is set to use the correct Financial Account as the Income Account.
- During sync, the Contribution line item will be set to the corresponding QuickBooks Product/Service.
- When a CiviCRM
Acctg Codedoes not match any QuickBooks Product/Service name, which means that no product/service in QuickBooks has the same name, that particular line item will NOT be pushed through the invoice.
Map your QuickBooks tax account name to corresponding CiviCRM financial types Sales Tax Accounts acctg code.¶
When the extension pushes an invoice to QuickBooks Online, it requires every item to have a specified Tax account.
For AU Companies:¶
- Go to
GST>Rates&Settings. There are many tax accounts listed there, with names in columnTax name, copy the tax name you want and paste it into theAcctg codefield of corresponding Tax financial account. - Open the CiviCRM Financial Account setting page
(civicrm/admin/financial/financialAccount) and update the
Acctg Codeof corresponding Financial account to be the same as each QuickBooks tax account name. - If a financial type does not contain any GST, a financial account also needs
to be created with the corresponding Tax account name in QuickBooks filled
out. For example, create a new financial account called
NO GSTwith GST rate as0,acctg codeasGST free(a tax account name which has GST rate as0also). And assign that financial account as corresponding line itemsSales Tax account`. - When setting up Contributions in CiviCRM, ensure that the Financial Type for
the Contribution/line item is set to use the correct Financial Account as the
Sales Tax Account. - During sync, the Contribution line item will be assigned with corresponding Tax account.
- When a CiviCRM
Acctg Codedoes not match any QuickBooks Tax account name, which means that the there is no tax account in QuickBooks has the same name, that particular line item will NOT be pushed through the invoice.
For US Companies:¶
If none of your Contributions are taxable, you can skip this section entirely -
whenever a financial type has no sales tax financial account configured, the
extension automatically sends a NON (non-taxable) tax code for that line item,
which already satisfies QuickBooks Online's requirement that every item have a
tax code.
- For US companies, each line item or product/service in an invoice can only be
marked with
NON(for non-taxable) orTAX(taxable), and the entire invoice will have a single tax rate selected as a state tax or a combination tax rate. - Users need to make sure that:
- In CiviCRM:
- The financial type of each line item in the contribution is associated
with a
sales tax financial account - All those associated financial accounts need to have
TAXorNONas theacctg codefield. - All those associated financial accounts need to have the name of the
desired QuickBooks
TaxCode(not to be confused with aTax Rate) as theaccount type codefield in CiviCRM. e.g.California. For US companies using QuickBooks Online's Automated Sales Tax, this is usually the name of the state, and is generated automatically by QuickBooks rather than being listed anywhere for you to copy from - the QuickBooks API can be queried to confirm the exact name. - Make sure that all the financial types of line items have the same value
of
account type codein thesales tax financial account. The extension will pick the first line item that is taxable and with aaccount type code. And use that name to get the ID oftax accountfrom QuickBooks Online.
- The financial type of each line item in the contribution is associated
with a
- In QuickBooks Online:
- Make sure there are matched products/services that have the name that is
same with the values of the
acctg codeof allIncome financial accountof allfinancial typesused in the contributions. - Make sure all used
tax accountshave been created and have names recored in theaccount type codeof thesales tax financial accountof matchedfinancial type.
- Make sure there are matched products/services that have the name that is
same with the values of the
Are you using a QuickBooks Online Production or Development account?¶
This extension currently assumes that it will be connected to a QuickBooks Online, Production account.
If instead, you wish to connect this to a QuickBooks Online Development account then open the QuickBooks Online Settings page and change the Environment option from Production to Development.
When you have finished testing in the Development account, then change the Environment option back to Production.
For more details on the QuickBooks Online environments, see: * https://developer.intuit.com/app/developer/qbo/docs/develop/sandboxes * https://developer.intuit.com/app/developer/qbo/docs/develop/sdks-and-samples-collections/php/configuration
Other settings¶
The QuickBooks Online Settings page also provides the following options:
- Send Email for new Invoices - whether QuickBooks Online should email the customer when a new
Invoice is created:
Never,Only if the invoice is unpaid(the default), orAlways. - Where should Invoice Numbers be generated? -
CiviCRM(the default; the Invoice'sDocNumberis set from the Contribution ID using the Invoice Prefix below) orQuickBooks(QuickBooks Online assigns the number automatically). - Invoice Prefix - the
sprintf()format used to generate the InvoiceDocNumberwhen Invoice Numbers are generated by CiviCRM, e.g. the defaultCivi-%07dproducesCivi-0001234for Contribution ID 1234. - Allow Online Credit Card Payment / Allow ACH Payment - whether the pushed Invoice permits the customer to pay online via credit card / ACH from within QuickBooks Online.
- Customer Memo Override - optional text to use as the Invoice's Customer Memo instead of the Contribution's Source.
- Activate QBO logging? - enables additional logging of QuickBooks Online API activity, for troubleshooting.
Usage¶
Scheduled Jobs¶
This extension registers four Scheduled Jobs, active by default once installed:
- Civiquickbooks Contact Push Job - pushes CiviCRM contacts flagged as needing an update to QuickBooks Online as Customers.
- Civiquickbooks Contact Pull Job - pulls Customers updated in QuickBooks Online since the previous day into CiviCRM, matching or creating Account Sync records for later review.
- Civiquickbooks Invoice Push Job - pushes Contributions flagged as needing an update to QuickBooks Online as Invoices, including associated Payments.
- Civiquickbooks Invoice Pull Job - pulls the current status of previously-pushed Invoices from QuickBooks Online, updating the matching Contribution's status (e.g. marking it Completed when the Invoice is paid in full, or Cancelled when the Invoice is voided).
These jobs only run if CiviCRM's own Scheduled Jobs / cron is configured on
your site. You can review each job's configuration and run history under
Administer > System Settings > Scheduled Jobs.
Sync status on the Contact page¶
A Contact who has been synchronised, or is queued to be synchronised, with QuickBooks Online shows a "QuickBooks Sync Status" summary on their Contact Summary page, along with a link to manually queue the Contact to be re-synchronised. If the Contact or any of their Contributions have a sync error, a "Contact Sync Errors" and/or "Invoice Sync Errors" indicator is also shown; clicking it shows the underlying error message(s) reported by QuickBooks Online.
Contacts whose push to QuickBooks Online fails are tagged with a reserved "Quickbooks Sync Error"
tag, which is automatically removed once the Contact syncs successfully. A Contact that fails to
push more than 3 times in a row is automatically marked as excluded from future syncing (do not
sync) until an administrator investigates and re-queues it.
System-wide status check¶
A CiviCRM System Status message is shown (Administer > System Settings > System Status,
also visible on the CiviCRM home/dashboard) when the stored QuickBooks Online refresh token has
expired, prompting an administrator to re-authorise the connection via the QuickBooks Online
Settings page.
QuickBooks Online API rate limits¶
If QuickBooks Online reports that its API rate limit has been exceeded, the extension records the time this occurred and blocks further CiviQuickBooks Push/Pull API calls for up to an hour, to avoid repeatedly hitting the limit. Invoice pushes are also throttled to roughly one request per second to reduce the likelihood of hitting QuickBooks Online's rate limits in the first place.
Special Notes:¶
- A line item whose Financial Type has no matching QuickBooks Product/Service
name (via
Acctg Code, see above) is excluded from the invoice, so an invoice can be pushed with fewer line items than the Contribution actually has. If every line item is excluded this way, the invoice will not be pushed at all, and the Financial Type(s)/Accounting Code(s) that failed to match are recorded as a sync error against that Contribution, viewable on the Contact's summary page. - A line item whose Financial Type has no matching QuickBooks Sales Tax
Account name (non-US companies only, see above) is still pushed, but
without a Tax Code applied - there is currently no notification for this
case, so review your Financial Account
Acctg Codemappings carefully to avoid un-taxed invoice lines in QuickBooks.
Funding for this CiviCRM extension¶
Development and support for this Extension is funded solely by Agileware and CiviCRM community contributions. Agileware does not receive any funding at all for this Extension from the CiviCRM Partner program or CiviCRM LLC. Agileware welcome any funding to help continue paying Agileware staff to continue contributing to the CiviCRM community and Extensions.
:heart: Donate to Agileware to tell us how much you appreciate Agileware's CiviCRM open source work and community contributions.
About the Authors¶
This CiviCRM extension was developed by the team at Agileware.
Agileware provide a range of CiviCRM services including:
- CiviCRM migration
- CiviCRM integration
- CiviCRM extension development
- CiviCRM support
- CiviCRM hosting
- CiviCRM remote training services
Support your Australian CiviCRM developers, contact Agileware today!
