# QuickBooks Online

URL: https://docs.sparklayer.io/help/integrations/accountancy/quickbooks
Applies to: Shopify

Connect QuickBooks Online to SparkLayer on Shopify to create invoices, sales receipts and customers from B2B orders, and set tax codes and income accounts.

> **Quick summary**
>
> - The QuickBooks Online integration creates an invoice in QuickBooks for each B2B order paid by invoice or on account. It can create the QuickBooks customer too.
> - Invoices are created shortly after the order reaches **processing** (or, if you choose, as each shipment is fulfilled). Data goes one way: changes you make to an invoice in QuickBooks don't come back to SparkLayer.
> - Connect it in the SparkLayer Dashboard at **Integrations > Partners** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/configuration/integrations/partners)), or **SparkLayer Wholesale > Integrations > Partners** in the Shopify app, under **Accountancy**: turn on the switch and sign in to QuickBooks. Needs the Pro or Enterprise plan, a Shopify store and QuickBooks **Online** (not the desktop version).
> - Customers can view and download their invoices from **My Account** on your store.

## What it does

[QuickBooks Online](https://quickbooks.intuit.com/) is online accounting software for managing finances, invoices, inventory and customer records.

SparkLayer has a direct integration with QuickBooks Online. Your B2B orders sync to QuickBooks as invoices and contacts, so there's less manual data entry and no need for another app to keep the systems in sync.

How a B2B order becomes a QuickBooks invoice:

1. **B2B order**: Paid by invoice or on account, and processing or shipped
2. **Contact**: Matched by account number or email, or created
3. **QuickBooks invoice**: Created in the background through the API
4. **My Account**: View & Download Invoice button on the order

### Let customers view invoices

When an invoice is ready, a **View & Download Invoice** button appears on the order in **My Account** on your store. It opens the public invoice page generated by QuickBooks. If the button doesn't appear, see [Troubleshooting](#troubleshooting).

## What syncs and in which direction

Data goes one way, from SparkLayer into QuickBooks.

| Data | Direction | Details |
| --- | --- | --- |
| Invoices | SparkLayer to QuickBooks | One invoice for each eligible B2B order, or for each shipment if you choose. Changes you make to an invoice in QuickBooks, such as to line items or customer details, aren't reflected back in SparkLayer or your platform. |
| Customers | SparkLayer to QuickBooks | Each invoice is linked to a matching QuickBooks customer. If there's no match, SparkLayer can create one. Details are copied once, when the customer is created. |
| Sales receipts | SparkLayer to QuickBooks | For orders paid upfront, if you turn on **Enable Sales Receipts**. |

### How invoices are created

SparkLayer creates the invoice in QuickBooks as soon as an eligible order arrives from your platform. This happens in the background so checkout stays fast, so the invoice can take a short while to appear in QuickBooks.

#### Which orders get an invoice

An order gets an invoice when both of these are true:

- **Fulfilment status is `processing` or `shipped`.** Orders that haven't reached `processing` yet, such as Shopify draft orders you haven't completed, don't get an invoice.
- **Paid with Payment by Invoice or Payment on Account.** Payment by Invoice orders are invoiced as soon as they reach `processing`. Pay on Account orders follow the **Payment on account - Invoice creation trigger** setting. See [Payment methods](https://docs.sparklayer.io/help/ordering/payment-methods.md) to set these methods up.

The integration only covers B2B orders placed through SparkLayer. Retail (D2C) orders aren't sent to QuickBooks.

#### Pay on Account orders and split shipments

| Setting | When invoices are created |
| --- | --- |
| **On order** | One invoice for the whole order, when it reaches `processing`. |
| **On shipment** | One invoice each time a fulfilment is completed, containing only the items in that fulfilment. This handles split shipments. |

Customers can download every invoice for an order from **My Account**. With split shipments, the order's shipping is always added to the invoice for the **first** shipment.

If you switch from **On shipment** to **On order**, partly fulfilled orders won't get invoices for their remaining shipments. Complete any partly fulfilled orders before you change the setting.

#### What's on the invoice

| Field | Where it comes from |
| --- | --- |
| **Contact** | The QuickBooks customer matched (or created) from the order's customer. See [Contact matching and creation](#contact-matching-and-creation). |
| **Billing address** | The order's billing address. |
| **Due date (Payment by Invoice)** | The order date. |
| **Due date (Payment on Account)** | Worked out in this order: 1) the customer's [net terms](https://docs.sparklayer.io/help/ordering/credit-net-terms-and-invoicing.md) in SparkLayer, added to the order date; 2) the customer's payment terms in QuickBooks; 3) your global payment terms in QuickBooks; 4) otherwise, the order date. |
| **Line description** | The item's SKU. |
| **Quantity** | The quantity on the SparkLayer order. |
| **Unit amount and line amount** | Calculated by SparkLayer and passed to QuickBooks. |
| **Tax amount** | Calculated by QuickBooks, using the tax rates set in QuickBooks. |
| **Shipping** | If shipping is turned on in QuickBooks, it's set on the invoice, with the shipping method named after the service chosen and the price in the totals. If it's off, shipping is added as a line item. The shipping line uses the **Shipping Tax Code**. |

### Contact matching and creation

Every invoice needs a QuickBooks customer. SparkLayer matches an existing one or, if you allow it, creates one.

#### How contacts are matched

When it creates an invoice, SparkLayer looks for the right QuickBooks customer in this order:

1. **Account number (recommended):** a QuickBooks customer whose ID matches the accounting ID [metafield](https://docs.sparklayer.io/help/customers/account-and-addresses.md#advanced-account-settings) on the SparkLayer customer.
2. **Email:** a QuickBooks customer with the same email address.

If either matches, the invoice is linked to that customer. If neither does, **Automatic Contact Creation** decides whether a new one is created.

#### Several contacts with one email

In SparkLayer, each email address belongs to one customer. In QuickBooks, several customers can share an email address. If more than one active QuickBooks customer has the email, and the invoice currency matches, the invoice goes to the oldest one. If your organisation has several contacts with the same email, give each a unique account number so matching is reliable.

#### Data synced when a contact is created

These details are copied once, when SparkLayer creates the QuickBooks customer. Later changes in SparkLayer aren't synced.

- First and last name
- Email address
- Billing and shipping address, from the order being invoiced
- Currency, set to the currency of the invoice

## Set up QuickBooks

Check the requirements, connect your QuickBooks company, then choose your settings.

### Requirements

- **The Pro or Enterprise plan.** See [Plans and features](https://docs.sparklayer.io/help/plans-and-features.md).
- **A Shopify store** connected to SparkLayer. See [Shopify](https://docs.sparklayer.io/help/platforms/shopify.md).
- **A QuickBooks Online account.** The desktop version isn't supported.
- **Your B2B products in QuickBooks**, each with a SKU that matches Shopify and the right tax rate.
- **Shipping turned on in QuickBooks**, if you want shipping added at invoice level. If it's off, shipping is added as a line item instead.

### Connect QuickBooks

1. In the SparkLayer Dashboard, go to **Integrations > Partners** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/configuration/integrations/partners)), or **SparkLayer Wholesale > Integrations > Partners** in the Shopify app.
2. Under **Accountancy**, turn on the switch next to **QuickBooks**.
3. Sign in to QuickBooks when it opens. QuickBooks shows the data SparkLayer needs access to (see the [FAQs](#faqs)).
4. If your QuickBooks account has several companies, choose the one to connect. You can connect one company per SparkLayer team.
5. Back in **Integrations > Partners** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/configuration/integrations/partners)), or **SparkLayer Wholesale > Integrations > Partners** in the Shopify app, open QuickBooks and complete the settings below.

When the integration is installed, SparkLayer creates a product called **SparkLayer Custom Product** in QuickBooks. It's used when a custom item is added to an order in SparkLayer. Before you use it, set its tax rate in QuickBooks, the same way as your other products. Otherwise invoices with custom items can't be created.

### Configure the integration

| Setting | What it does |
| --- | --- |
| **Automatic Contact Creation** | Not set when you install the integration: set it before you use the integration. Each invoice needs a QuickBooks customer. If SparkLayer can't [match an existing one](#how-contacts-are-matched), this decides what happens. **Enabled**: SparkLayer creates a new QuickBooks customer from the customer data it holds, the same way as the [Xero integration](https://docs.sparklayer.io/help/integrations/accountancy/xero.md). **Disabled**: SparkLayer doesn't create customers, because you create them in another system or manage them by hand in QuickBooks. If no match is found, no invoice is created. |
| **Payment on account - Invoice creation trigger** | Default: **On order**. When to create invoices for Pay on Account orders. **On order** creates one invoice for the whole order when it reaches `processing`. **On shipment** creates an invoice for each shipment, when it's fulfilled. See [Pay on Account orders and split shipments](#pay-on-account-orders-and-split-shipments). |
| **Enable Sales Receipts** | Creates sales receipts in QuickBooks for orders paid upfront. |
| **Shipping Tax Code** | The name of the QuickBooks tax code for the shipping line. You must set this for invoices to sync. |
| **Tax Exemption Tax Code** | The name of the QuickBooks tax code for invoice lines of tax-exempt customers. |
| **Income Account** | The name of the QuickBooks account to use as the income account for new products. It's used when SparkLayer creates the **SparkLayer Custom Product**. |

### Turn off the integration

1. In the SparkLayer Dashboard, go to **Integrations > Partners** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/configuration/integrations/partners)), or **SparkLayer Wholesale > Integrations > Partners** in the Shopify app.
2. Under **Accountancy**, turn off the switch next to **QuickBooks**.

When the integration is off:

- No invoices are created for orders placed while it's off.
- Customers can no longer open QuickBooks invoices created through SparkLayer from **My Account**.

## Limitations

- Products must exist in QuickBooks, with a SKU that matches Shopify and the correct tax rate.
- Invoice creation is one way. Changes to invoices in QuickBooks aren't reflected in SparkLayer or your platform.
- Apportioned tax rates on the shipping line aren't supported.
- Multi-currency isn't supported where a customer already has an invoice in another currency.

## FAQs

**How do I disconnect from QuickBooks?**

Turn the integration off in **Integrations > Partners** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/configuration/integrations/partners)), or **SparkLayer Wholesale > Integrations > Partners** in the Shopify app, under **Accountancy**. This removes the connection to your QuickBooks organisation. See [Turn off the integration](#turn-off-the-integration) for what happens next. It works the same way as the [Xero integration](https://docs.sparklayer.io/help/integrations/accountancy/xero.md).

**Does the integration work for D2C orders?**

No. It only covers B2B orders created through your platform's connection with SparkLayer. Direct-to-consumer (D2C) orders aren't sent to QuickBooks as invoices.

**What access does the integration need in QuickBooks?**

When you connect, QuickBooks lists the exact permissions SparkLayer asks for. We only ask for the minimum needed:

- **View & manage contacts**: to match invoices to existing contacts, and create new ones if your settings allow.
- **View & manage business transactions**: to create invoices for SparkLayer B2B orders and, in future, to view payments made on invoices.
- **View organisation settings**: to read settings such as global payment terms when working out due dates.

## Troubleshooting

If your issue isn't listed, or it continues after these steps, [contact support](https://docs.sparklayer.io/help/support.md).

**Customers can't see their invoice in My Account**

Check that:

- **The integration is turned on** in **Integrations > Partners** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/configuration/integrations/partners)), or **SparkLayer Wholesale > Integrations > Partners** in the Shopify app, under **Accountancy**.
- **The order is `processing` or `shipped`.** Orders that haven't reached `processing` yet, such as Shopify draft orders you haven't completed, don't get an invoice.
- **An invoice exists in QuickBooks** for the order. It can take a little while to sync. If there's a long delay, or no invoice was created, contact support with the customer and order ID.

If invoice links are missing for **all** your customers, contact support.
