# QuickBooks Online integration This topic describes how to synchronize the data from your Rebilly account to [QuickBooks Online](https://quickbooks.intuit.com/). You can synchronize the following data types: - Customers - Invoices - Transactions - Refunds - Revenue recognition entries - Balance transaction entries ## Integrate QuickBooks Online Use this process to connect QuickBooks Online with your Rebilly account and to configure which data is synchronized. - To complete this tutorial, you must have an Intuit account with access to [QuickBooks Online](https://quickbooks.intuit.com/). - Optionally, for testing, it is useful to have a [QuickBooks Online sandbox company](https://developer.intuit.com/app/developer/qbo/docs/develop/sandboxes/manage-your-sandboxes) to connect to your [Rebilly sandbox environment](/docs/tutorials/environments#sandbox-environment). 1. Connect QuickBooks Online to Rebilly: 1. If you have not already done so, sign in to [Rebilly](https://app-sandbox.rebilly.com/). 2. In the left navigation bar, press , then press **QuickBooks Online**. 3. Press **Connect to QuickBooks Online**. 4. In the newly opened window, sign in to your Intuit account, if you have not already done so. 5. In the newly opened window, press **Connect**. 6. You are now redirected to the QuickBooks Online integration configuration in Rebilly. 2. Configure which data to synchronize: At a minimum, you must configure customers and invoices. If you do not, the other data types listed in this step will not work. Required: Synchronize customersWhen a customer is created in Rebilly, it is associated with the same customer in QuickBooks. If the customer is not found, a new customer is created in QuickBooks. In the **Customer** section: 1. Press the **Create customers** dropdown, and select when to synchronize customers: - To synchronize automatically when customers are created in Rebilly, select **Always**. - To synchronize manually, select **Manually**. If this setting is active you must manually synchronize data for each customer with QuickBooks. For more information, see [Manually synchronize customer data](#manually-synchronize-customer-data). 2. Press the **Customer display name** dropdown, and select how customers are displayed in QuickBooks Online. Required: Synchronize invoices and credit memosWhen an invoice is issued or updated in Rebilly it is updated in QuickBooks Online. In the **Billing** section: 1. Press the **Create invoices** dropdown, and select when to synchronize invoices and credit memos: - To synchronize automatically when invoices are issued or updated in Rebilly, select **Always**. - To synchronize when invoices are issued in Rebilly, select **When issued**. - To synchronize manually, select **Manually**. If this setting is active you must manually synchronize data for each invoice with QuickBooks. For more information, see [Manually synchronize invoice data](#manually-synchronize-invoice-data). 2. In the **Unearned revenue account** field, specify an account to use to hold revenue for each invoice. 3. Optionally, to specify an account to use to hold taxes, in **Taxes account** field enter the account. If no account is entered, taxes are added to the line items of the invoice as tax. If an account is entered, taxes are added to the invoice as separate line items. 4. Optionally, to specify the department the invoice is related to, in the **Department** field enter the department name. 5. Optionally, to specify the item name for the invoice, in the **Item name** field enter an invoice name. The template item name must match the item name in QuickBooks Online, if the item name is not found, it is created. 6. Optionally, to specify an item description, in the **Item description** field enter a description. This is not displayed on the invoice, but this is used when creating the item. 7. Optionally, to specify item SKU, in the **Item SKU** field, enter the SKU. This value is not displayed on the invoice. It is applied when creating the item. 8. Optionally, to specify an item line description, in the **Item line description** field, enter a description. 9. Optionally, to specify a tax name for the invoice, in the **Tax name** field enter a name. This value is only used when an account is added to **Taxes accounts** text field, and must match the item name of the tax in QuickBooks Online. If the tax item is not found, it is created. 10. Optionally, to specify tax descriptions, in the **Tax description** field enter a tex description. This value is only used when a **Taxes accounts** is filled. This value is not displayed on the invoice, it is used when creating the tax item. 11. Optionally, to specify tax SKU, in the **Tax SKU** enter a value. This value is only used when a **Taxes accounts** is filled, this value is applied when creating the tax item. 12. Optionally, to add a tax line description, in the **Tax line description** field enter a description. For more advanced configuration options, all fields support [liquid templates](https://shopify.github.io/liquid/). For more information, see [Advanced configuration](#liquid-templates). Optional: Synchronize transactions and refund receipts 1. In the **Payment** section, press the **Create payments** dropdown, and select when to synchronize payments: - To synchronize automatically when transactions are processed in Rebilly, select **Always**. - To synchronize manually, select **Manually**. If this setting is active you must manually synchronize data for each invoice with QuickBooks. For more information, see [Manually synchronize invoice data](#manually-synchronize-invoice-data). 2. Press the **Create refund receipts** dropdown, and select when to synchronize invoices: - To synchronize automatically when invoices are created or updated in Rebilly, select **Always**. - To synchronize manually, select **Manually**. If this setting is active you must manually synchronize data for each invoice with QuickBooks. For more information, see [Manually synchronize invoice data](#manually-synchronize-invoice-data). 3. Add the **Deposit account** for depositing payment funds and issuing refunds. 4. Add the **Department** for the payment or refund receipt. Only full refunds create a refund receipt in QuickBooks Online. Partial refunds are not synchronized. Optional: Synchronize revenue recognition and balance transactionsIn the **Journals** section, press the **Synchronize journal entries** dropdown, and select when to synchronize journal entries: - To synchronize automatically when journal entries are created or updated in Rebilly, select **Always**. - To synchronize manually, select **Manually**. If this setting is active you must manually synchronize data for each invoice with QuickBooks. For more information, see [Manually synchronize revenue recognition and balance transactions](#manually-synchronize-revenue-recognition-and-balance-transactions). 3. Save the configuration: At the top or bottom right of the page, press **Save settings**. ## Edit an integration configuration To edit a saved integration configuration: 1. In the left navigation bar, press , then press **QuickBooks Online**. 2. Edit the configuration. In the **Credentials** section at the top of the page, press the buttons to **Reconnect** or **Disconnect** your QuickBooks Online account. For more information, see Step 2 of [Configure QuickBooks Online integration](#integrate-quickbooks-online). 3. At the top or bottom right of the page, press **Save settings**. ## Manual data synchronization This section describes how to manually synchronize data with QuickBooks. This process is required when the QuickBooks integration is configured to not synchronize data automatically. For more information, see [Configure QuickBooks Online integration](#integrate-quickbooks-online). ### Manually synchronize customer data 1. In the left navigation bar, press , and then press **Customers**. 2. In the **Name** column, press a customer's name. 3. In the bottom right of the page, in the **External identifiers** section, press . If the customer data is not synchronized with QuickBooks, a red icon is displayed in this section. If the customer data is synchronized with QuickBooks, a green icon is displayed in this section. For more information, see [Manage customer information](/docs/data-tables/manage-customer-information). ### Manually synchronize invoice data 1. In the left navigation bar, press , and then press **Customers**. 2. In the **Name** column, press a customer's name for whom the invoice is issued. 3. On the right side of the page, choose an order that you want to synchronize by clicking and choose **View**. 4. On the right side of the page, in the **External identifiers** section, press . If the invoice data is not synchronized with QuickBooks, a red icon is displayed in this section. If the invoice data is synchronized with QuickBooks, a green icon is displayed in this section. For more information, see [Manage invoices](/docs/data-tables/manage-invoices). ### Manually synchronize revenue recognition and balance transactions 1. In the left navigation bar, press , press **Billing**, then press **Journal entries**. If data tables does not contain a journal entries segment, see [Create a journal segment](/docs/settings/journal-account#create-a-journal-segment). 2. In the **ID** column, press a journal entry. \ 3. Above the table, press **External identifiers**, then press . If the journal entry data is not synchronized with QuickBooks, a red icon is displayed in this section. If the journal entry data is synchronized with QuickBooks, a green icon is displayed in this section. For more information, see [Journals](/docs/settings/journal-account). ## Liquid templates This section describes how to use [Liquid templates](https://shopify.github.io/liquid/). Use liquid templates for more advanced configurations that use variables and control flow tags. - If the configuration dropdown options do not meet your requirements, use variables to manually adjust the configuration fields. - If a single configuration value is not enough, use control flow tags to change configuration values based on other data. All Liquid features are available, this documentation only covers the most common uses. To view all available features, see the [Liquid documentation](https://shopify.github.io/liquid/). ### Variables Use variables to configure settings that are different from the available options in the dropdown. Use variables by surrounding them with `{{` and `}}`. For example: `{{ invoice.customer.firstName }}`. Multiple variables can be used for one setting. For example: `{{ invoice.customer.firstName }} {{ invoice.customer.lastName }} - {{ invoice.customer.primaryAddress.organization }}` ### Control flow tags Use control structures to create conditional configurations that are based on the available variables. For example, use a different **Tax account** per line item, based on the `planId`. In the following example the account with ID 100 is used when the planId is `pro`. Otherwise, the account with ID 110 is used. ```liquid {% if item.planId == "pro" %} 100 {% else %} 110 {% endif } ``` When setting an account with Liquid, use the account ID instead of the account name. To find an account ID in QuickBooks Online: 1. In QuickBooks Online, press the **Gear** icon at the top. 2. Under **Your Company**, press **Chart of Accounts**. 3. Locate the account on which you want to obtain an ID, to the right of it, press **View register**. 4. In the address bar of your web browser, at the end of the address it reads **accountId=#**, take note of the number. This number is the ID of the account selected in the previous step.