# Quickbooks

![Quickbooks_logo.svg](https://assets.relyanceuat.xyz/images/docs/12874616427149/12874456291725.svg)
QuickBooks is accounting software designed for individuals and organizations to keep track of income and expenses. It offers different accounting modules such as invoicing, accounting, payments, and more.

In order to integrate Quickbooks with Relyance AI you will need **Client ID** and **Client Secret** and follow an Oauth2 flow.

#### In Quickbooks:

1. Login to your Quickbooks account.
2. Go here to your developer account (sign up or sign in if need be): [https://developer.intuit.com/](https://developer.intuit.com/)
3. Select the **Dashboard** link on the toolbar right-side.
4. Click the **+ Create an app** button.
5. Select **QuickBooks Online and Payments**.
6. Fill out the resulting dialog with: **Name**: Provide a meaningful name (e.g. Relyance Scan) **Scope**: com.intuit.quickbooks.accounting
7. Click **Create app**.
8. This will bring you to the newly created app development page. Under **Development Settings** click **Keys & credentials** from the left-hand navigation menu. Since this app is not being published to the Quickbooks app store, we can use the development keys.
9. Copy the **Client ID** and **Client Secret** to be used in Relyance.
10. Scroll down on the page to **Redirect URIs** and update the link to be: [https://root.relyance.ai/api/oauth2](https://root.relyance.ai/api/oauth2)
11. Click the **Save** button.

![Quickbooks-3.png](https://assets.relyanceuat.xyz/images/docs/12874616427149/13172007702413.png)

![Quickbooks-4.png](https://assets.relyanceuat.xyz/images/docs/12874616427149/13172282941453.png)

![Quickbooks-5.png](https://assets.relyanceuat.xyz/images/docs/12874616427149/13172586636429.png)

#### In the Relyance AI application:

1. Login to your Relyance account.
2. Navigate to the **Settings** Menu in the bottom left-hand side.
3. Select **Integrations**.
4. Click on the **Vendor Integration** tab.
5. Find the **Quickbooks** integration card and click it to open its connections.
6. Under **Authentication Method**, choose **Oauth2 / App Token**.
8. Paste the **Client ID** and **Client Secret** into their respective fields.

![Quickbooks-1.png](https://assets.relyanceuat.xyz/images/docs/12874616427149/12874396289421.png)

9. Click **Authenticate** and follow the Oauth2 flow.
10. This will redirect you to Quickbooks. Choose the company you're connecting to in the dialog and click **Next**.

![Quickbooks-6.png](https://assets.relyanceuat.xyz/images/docs/12874616427149/13173249222157.png)

11. The next dialog will ask you to authorize your app. Click **Authenticate**.

![Quickbooks-7.png](https://assets.relyanceuat.xyz/images/docs/12874616427149/13173270940941.png)

12. At this point, you should see the following result on the **Vendor** Integrations page:

![Quickbooks-2.png](https://assets.relyanceuat.xyz/images/docs/12874616427149/12874396289165.png)

13. Congratulations, you are now connected to **Quickbooks**.

<!-- failure-modes:begin (generated from the integration catalog; do not hand-edit) -->

## If the connection reports Connected but returns nothing

These are the ways this integration comes back empty without reporting an error. Generated from the integration catalog, so it tracks what the connection actually asks for.

1. **Authorised, then empty.** The connection carries an authorisation, not a password: it stops returning data if the account that granted it loses access, its own permissions narrow, or the grant is revoked at the vendor. None of that reports an error here -- the connection keeps its last status until the next scan.
2. **A credential rotated at the vendor is not picked up here.** **Client Secret** is stored when you save the connection, so regenerating the value at the vendor breaks the next scan until it is re-pasted here. Recording the expiry on the connection means Relyance warns you before it lapses.

<!-- failure-modes:end -->

<!-- auth-methods:begin (generated from the integration catalog; do not hand-edit) -->

## Authentication methods and fields

Pick one of these under **Authentication Method** on the connection wizard's **Authentication** step. This table is generated from the integration catalog, so it always matches what the form actually asks for.

| Method | Required | Optional |
| --- | --- | --- |
| **Oauth2 / App Token (Dev Sandbox)** | `Client ID`, `Client Secret` (secret) | — |
| **Oauth2 / App Token** | `Client ID`, `Client Secret` (secret) | — |

<!-- auth-methods:end -->

<!-- terraform-examples:begin (generated from the integration catalog; do not hand-edit) -->

## Manage this integration with Terraform

Connections for this integration can be managed as code with the [Relyance Terraform provider](https://registry.terraform.io/providers/Relyance/relyance/latest). Non-secret fields go in `auth.params`; secret fields go in `auth.secrets_wo`, which is write-only — never stored in Terraform state. Rotate secrets by bumping `auth.secrets_wo_version`.

### OAuth (browser authorization) — Oauth2 / App Token (Dev Sandbox)

The **OAuth (browser authorization) — Oauth2 / App Token (Dev Sandbox)** method uses a browser authorization flow, so the connection is created in the Relyance app. Manage it in Terraform afterwards by importing it (`terraform import relyance_integration_connection.example quickbooks/<connection_id>`) or reading it with the `relyance_integration_connection` data source.

### OAuth (browser authorization) — Oauth2 / App Token

The **OAuth (browser authorization) — Oauth2 / App Token** method uses a browser authorization flow, so the connection is created in the Relyance app. Manage it in Terraform afterwards by importing it (`terraform import relyance_integration_connection.example quickbooks/<connection_id>`) or reading it with the `relyance_integration_connection` data source.

<!-- terraform-examples:end -->
