Documentation

Drupal 7/8 QuickBooks Online Integration

Table of Contents

  1. Introduction
  2. Roadmap
  3. Implementation
  4. Known Issues

1. Introduction

The Drupal QuickBooks module (JI QuickBooks) is aimed at being easy to install and use.  Its developed to use existing systems and come fully loaded to have no major external dependencies or long and complicated installs.  Ubercart and Commerce compatible, syncing data to QuickBooks Online after a customer checkouts sucessfully. A Drupal 8 version is released and stable! As development continues, additional features will be addded. Contact us if you have any features you want implemented.
 
We hope this module saves time and money for each user. Please feel free to contact us with any questions. Please note this isn't for the QuickBooks Desktop version.

 

2. Roadmap

Current status on development and future plans.
  1. 7.x-1.0-rc16
    1. Drupal synchronization to QuickBooks for Ubercart and Commerce:
      1. Taxes
      2. Products/Services
      3. Payment data
      4. Invoice data
      5. Customer data
    2. Cron which automatically reattempts failed transactions
    3. A basic reports module to display any sync issues
    4. Automatic renewal of access tokens
    5. Uses OpenID to connect your Drupal store to your QuickBooks accounts much quicker
    6. If using Commerce Stripe, refunds are possible
    7. In progess: Inventory handling
    8. In progress: Meeting Drupal coding standards and completing the review process
  2. 8.x-1.0-rc1
    1. Works with Commerce module
    2. Syncs customer, order, invoice and tax information
    3. Automatic cron reattempts for failed sync transactions
    4. OpenID
    5. Auto regeneration of tokens
    6. In progress: Meeting Drupal coding standards and completing the review process

 

 

3. Implementation

Downloading the Correct SDK


Drupal 7
You'll need to download the QuickBooks SDK from our GitHub.com account and place within the libraries directory. We've made changes to the QuickBooks SDK and also don't want you to download a version (as of this writing, we're using the newest QBO SDK) that QuickBooks may release which could break functionality.

Drupal 8
With Drupal 8 a new feature is now available. Use Composer to install JI QuickBooks and the QBO SDK with one command. You can still use the old method. Here's how.
 
Using Composer
Execute:
composer require drupal/ji_quickbooks

Old method

 

 

Creating a QuickBooks Development Account (Needs updating)

Navigate to https://developer.intuit.com/ and create an account unless you already have one. If you already have a QBO account then this process will be much easier since you can use that account to tie into a developer account. Once logged in, follow the instructions below to enable test companies so you won't have to worry about touching live data.
 
  • Click on My Apps.
  • On the Create new app page, click Select APIs.
  • On the Select API page, check Accounting and click Create app.
  • On the DEVELOPMENT Dashboard page under Get your app ready for submission, choose Test with OAuth Playground.
  • On the OAuth Playground page you'll be given your Consumer Key and Consumer Secret. Put these keys in the /sites/all/libraries/qbosdk3260/App.config file. Now choose an Access Token Duration that's about 5 months in seconds or 12960000. Note: You'll have to refresh the keys before your duration runs out or your website will stop communicating with QuickBooks. Future releases of JI QuickBooks will implement automatic token refresh features so you only have to set this once. Press the CONNECT TO QuickBooks button.
  • A popup window displays stating Authorize the Sharing of Your Data Between Untitled and Intuit, click the Authorize button.
  • It now displays a page where your Access Token, Access Token Secret, and RealmId values are given.  Copy these to your App.config file.
  • Congratulations! You now have a working Drupal website that connects to QuickBooks Online!
You can now create different sandbox accounts which will allow you to test QuickBooks data. You can do so by returning to https://developer.intuit.com/ and near the search area on the top right, choose the Hello YOURUSERNAME drop down menu and press Sandbox. On the Sandbox page, notice the Company ID located under the COMPANY NAME, this is also called your RealmId.

 

WARNING: Clicking on "Go to company" below connects you to the last logged in QuickBooks Online company. To switch company in QuickBooks Online, please click the Gear icon > Switch Company.

Moving to Production (Needs updating)

How exciting!  You're ready to connect JI QuickBooks to a live QuickBooks account.  This process is similar to what you went through when setting up your development account so let's start:

  • Navigate to https://developer.intuit.com/.
  • Once logged in, choose My Apps.
  • Choose the app that represents your live account.
  • Next page, choose PRODUCTION and then Keys.
  • Copy and paste OAuth Consumer Key and OAuth Consumer Secret to the /sites/all/libraries/qbosdk3260/App.config file.  Note: OAuth Consumer Key goes to ConsumerKey and OAuth Consumer Secret goes to ConsumerSecret.
  • Return to DEVELOPMENT and choose Test with OAuth Playground.
  • On the OAuth Playground page, paste the OAuth Consumer Key and the OAuth Consumer Secret where Consumer Key and Consumer Secret are. Choose your Access Token Duration of 12960000 and choose CONNECT TO QuickBooks.
  • Once you complete the process QuickBooks will give you new AccessToken and AccessTokenSecret which you'll copy and paste to the /sites/all/libraries/qbosdk3260/App.config file.
  • Last but very important:

 

Common Issues
When testing and connecting your Drupal website to QuickBooks Online you may run into issues where your access token's aren't set correctly or an important step was missed. Please review the steps above and use warning messages that will display during setup within Drupal.
 

 

4. Known Issues

Drupal 7

Make sure to set JQuery at 1.10 or higher in order to correctly work with taxes when using JI Commerce Taxes.