# QuickBooks

*QuickBooks* is an accounting software package developed and marketed by [Intuit](https://en.wikipedia.org/wiki/Intuit). QuickBooks can be used to manage sales and expenses and keep track of daily business transactions.

You can use it to invoice customers, pay bills, generate reports for planning and tax filing, and more.

If you are unfamiliar with QuickBooks, the following QuickBooks resources are recommended to get you started:

* [Get Started Guide](https://developer.intuit.com/app/developer/qbo/docs/get-started)
* [API features](https://developer.intuit.com/app/developer/qbo/docs/develop/rest-api-features)
* [Guides](https://developer.intuit.com/app/developer/qbo/docs/develop/tutorials)

### Get Started with QuickBooks <a href="#get-started-with-quickbooks" id="get-started-with-quickbooks"></a>

#### Integrating QuickBooks and Linx <a href="#integrating-quickbooks-and-linx" id="integrating-quickbooks-and-linx"></a>

When integrating Linx and QuickBooks, do the following:

**1. Create a QuickBooks developer account**

* Go to [QuickBooks](https://developer.intuit.com/app/developer/homepage).

**2. Create an App on QuickBooks**

The following notes serve as a guide to help make the overall integration process easier. Please refer to Intuit's QuickBooks documentation for specific details on process and usage:

* Sign in on QuickBooks
* Click on **My Apps**
* Create your *QuickBooks App*
* Click on the **Keys** tab
* Copy your *ClientID*, *Client Secret* and the *Base URL* (for later use in Linx)

  Note:

  For use in Linx, prepend the Base URL with *https\://* if it is not included already.
* Click **View Sandbox** to manage your sandbox company's settings
* Click the **Settings** icon (gear) on the toolbar
* Click **Company Settings**
* Click the **Sales** tab
* Enable *Deposit*

**3. Get an OAuth 2.0 access token**

The following notes serve as a guide to help make the overall integration process easier. Please refer to Intuit's QuickBooks and OAuth documentation for specific details on process and usage:

* Go to the [OAuth playground](https://developer.intuit.com/app/developer/playground)
* In the *Get authorization code* section, select the relevant *scopes* (All except for Payments)
* Click the **Get Authorisation Code** button
* Click the **Connect** button
* On the next page, in the *Get OAuth 2.0 token from auth code* section, click the **Get tokens** button
* In the *Response* section (on the right), copy the **Refresh Token** and the **Access Token** (for later use in Linx)

**4. Create a Linx Solution**

**Steps:**

1. Create a Solution
2. Add the *QuickBooks* plugin to your Solution
3. From the QuickBooks plugin, drag a Function or Type onto the design canvas
4. Set the relevant Properties:

* *CBO Credentials* to make the connection to QuickBooks:

  | Property       | Where to get the value from                                                                                                                                                                                                                                                                                                                        |
  | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | *AccessToken*  | <p>OAuth 2.0 Playground - see step 3 above</p><p>Note:<br>An Access Token has a limited lifespan and may have to be re-generated when expired. (This is especially the case when the token has not been initiated yet by your Linx solution with a first call to QuickBooks. After the first call Linx will refresh your token automatically.)</p> |
  | *RefreshToken* | OAuth 2.0 Playground                                                                                                                                                                                                                                                                                                                               |
  | *RealmID*      | OAuth 2.0 Playground                                                                                                                                                                                                                                                                                                                               |
  | *BaseURL*      | QuickBooks app (Sandbox) - see step 2 above                                                                                                                                                                                                                                                                                                        |
  | *ClientID*     | QuickBooks app                                                                                                                                                                                                                                                                                                                                     |
  | *ClientSecret* | QuickBooks app                                                                                                                                                                                                                                                                                                                                     |
  | *DiscoveryURL* | <p>Use the following value when testing on the QuickBooks sandbox:<br><https://developer.api.intuit.com/.well-known/openid_sandbox_configuration> Use the following value for your live production environment:<br><https://developer.api.intuit.com/.well-known/openid_configuration></p>                                                         |

  \\
* Properties specific to the Function or Type

### Functions and Types <a href="#functions-and-types" id="functions-and-types"></a>

The Linx *QuickBooks* plugin contains numerous functions and types that support working with the QuickBooks Accounting API. These functions and types can be categorised as follows:

* Accounts
* Attachables
* BillPayments
* Bills
* Budget
* Classes
* Common
* CompanyInfo
* CreditMemos
* Customers
* Departments
* Deposits
* Employees
* Estimates
* Invoices
* Items
* JournalCodes
* JournalEntries
* PaymentMethods
* Payments
* Pdfs
* Preferences
* PurchaseOrders
* Purchases
* Query
* RefundReceipts
* Reports
* SalesReceipts
* TaxAgencies
* TaxCodes
* TaxRates
* TaxServices
* Terms
* TimeActivities
* Transactions
* Transfers
* VendorCredits
* Vendors

### Links <a href="#links" id="links"></a>

[QuickBooks License](https://docs.linx.software/reference/plugins/quickbooks/license)
