> For the complete documentation index, see [llms.txt](https://docs.anedot.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.anedot.com/integrations/ecommerce-financial-membership/quickbooks-online.md).

# QuickBooks Online

Connect Anedot to QuickBooks Online to send donations as Sales Receipts, map Funds to products or services, and review field mapping and payload data.

The **QuickBooks Online** integration sends donations from your Action Pages to your QuickBooks Online Company as Sales Receipts, with one line for each Fund allocation. You'll find it in **Settings > Integrations**, where you can connect your QuickBooks Company, manage your connection, map Funds to products or services, review data relays, find your data in QuickBooks Online, and review field mapping and payload data.

## Before You Begin

You need **Integrations: Edit permissions** to add, edit, push or delete a connection. Integrations: Edit permissions also require **Action Pages: View permissions** and **Integrations: View permissions**. See [Permission Sets](https://docs.anedot.com/settings/access/permission-sets.md).

You also need a QuickBooks Online login with access to the Company you want to connect. Each connection is to one Company.

{% hint style="success" %}
Map your Funds to QuickBooks products or services before you start taking donations, so each Sales Receipt line shows the product or service you expect. See [Map Funds to Products or Services](https://docs.anedot.com/integrations/ecommerce-financial-membership/quickbooks-online.md#map-funds-to-products-or-services).
{% endhint %}

## Connect Anedot to QuickBooks Online

QuickBooks Online connects through a secure login, so you'll start in Anedot and finish in QuickBooks Online.

### Step 1: Create the Connection in Anedot

To create the connection:

1. Go to **Settings > Integrations**.
2. Click **New integration**.
3. Choose **QuickBooks**. The card is in the Accounting category and is described as "Authorize QuickBooks Online for Action Page data."
4. Choose which Action Pages to include:
   * Leave **All Action Pages** checked to include all current and future pages. (Optional) In **Exclude Pages**, enter a comma separated list of Action Page IDs, with no spaces.
   * Uncheck **All Action Pages** and choose pages in **Selected pages** to include only the pages you pick.
5. Leave **Team** at **All teams**.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>The Team you choose on this screen isn't saved. After the connection is created, you can choose a Team in <strong>Edit</strong>.</p></div>
6. Click **Continue to provider**.

Anedot shows "Redirecting to provider." and opens QuickBooks Online.

### Step 2: Authorize QuickBooks Online

To authorize the connection:

1. Log in to QuickBooks Online.
2. Select the Company you want to connect when prompted.
3. Wait while Anedot shows "Connecting QuickBooks / Finishing OAuth setup..."

The connection appears in your list in **Settings > Integrations**. Nothing is sent to QuickBooks when the connection is created.

{% hint style="warning" %}
If setup doesn't finish, Anedot shows an "OAuth setup failed" card and the connection isn't ready to send donations.
{% endhint %}

## Manage Your Connection

After you connect, you can edit the connection, turn it off or on, push unsent donations, or delete it from **Settings > Integrations**.

### Edit A Connection

After you create the connection, the list shows **Integration** followed by a number, for example "Integration 42", until you enter a **Name** in **Edit**. **Name** is required to save the form.

To edit a connection:

1. Go to **Settings > Integrations**.
2. Click **Edit** on the QuickBooks connection.
3. (Optional) Change which Action Pages are included with **All Action Pages**, **Exclude Pages**, or **Selected pages**.
4. (Optional) Choose a **Team** to include only that team's pages.
5. Enter a **Name**.
6. (Optional) Check or uncheck **Enabled**.
7. Leave the **Credentials/details JSON** box as it is.
8. Click **Save integration**.

Anedot shows "Integration updated." and your changes apply to new sends and to Push.

The **Provider** field shows `quick_books` and can't be changed. The **Credentials/details JSON** box can show cached Item Ids and refresh timestamps. It doesn't show or change the connected Company. To connect a different Company, create a new QuickBooks connection.

{% hint style="info" %}
After you save a team in **Edit**, choosing **All teams** doesn't clear it.
{% endhint %}

If you uncheck **All Action Pages** without choosing any pages, Anedot shows "Select at least one Action Page, or choose All Action Pages."

### Turn A Connection Off or On

The **Enabled** checkbox controls whether Anedot sends donations to QuickBooks. When **Enabled** is off, Anedot doesn't send live donations or Push, and no Integration Requests row is created.

To turn a connection off or on:

1. Go to **Settings > Integrations**.
2. Click **Edit** on the QuickBooks connection.
3. Uncheck **Enabled** to stop new sends, or check **Enabled** to start sending again.
4. Enter a **Name** if it's blank.
5. Click **Save integration**.

Anedot shows "Integration updated." and the connection stops or starts sending.

Anedot turns **Enabled** off after five authorization failures in a row without a success in between. An authorization failure is an HTTP 401 when Anedot looks up the customer, or a token refresh that fails with "Invalid token." Other failures don't turn the connection off, and no email is sent when **Enabled** turns off.

To turn the connection back on, follow the steps above to check **Enabled** and save. Saving doesn't reset the authorization-failure count.

{% hint style="warning" %}
If **Enabled** turns off again after you save, create a new QuickBooks connection, then use **Push unsent** to send the donations you missed.
{% endhint %}

### Push Unsent Donations

**Push unsent** sends donation submissions and successful recurring charges in a date range that haven't already been sent successfully as a Sales Receipt to the same QuickBooks Company. This includes records that were never attempted, not only failures. Records that were already sent successfully aren't sent again.

To push unsent donations:

1. Go to **Settings > Integrations**.
2. Click **Push unsent** on the QuickBooks connection.
3. Choose a **Start date** and an **End date**.
4. Start the push.

Anedot shows "Push started." and sends the unsent donations in that range.

The date range can be up to 31 days, and the start date must be within the last 12 months. Wait about five minutes between pushes. Action Page scope, **Exclude Pages**, and **Team** (once set in **Edit**) apply to Push the same way they apply to live sends. Push doesn't send anything when **Enabled** is off. For more about Push, see [Push Unsent](https://docs.anedot.com/integrations/integration-automation-tools/webhooks.md#push-unsent).

### Delete A Connection

To delete a connection:

1. Go to **Settings > Integrations**.
2. Click **Delete** on the QuickBooks connection.
3. Confirm "Delete this integration?"

Anedot shows "Integration deleted." and stops sending donations to QuickBooks. Records already in QuickBooks aren't changed.

{% hint style="danger" %}
Deleting a connection can't be undone. To send donations to QuickBooks again, create a new connection.
{% endhint %}

If a request fails, Anedot shows the message from the server, or "The request failed. Try again."

## Map Funds to Products or Services

Fund mapping sets which QuickBooks product or service appears on each Sales Receipt line. It doesn't choose a deposit account. You map a Fund by entering the QuickBooks product or service's Item Id in the Fund's **Internal Identifier**.

To edit a Fund's **Internal Identifier**, you need **Funds: Edit permissions**. See [Funds](https://docs.anedot.com/settings/finance/funds.md).

### Step 1: Find the Product or Service in QuickBooks Online

To find the product or service:

1. Go to **All apps > Sales & Get Paid > Products & services** in QuickBooks Online.
2. (Optional) To add a new one, use the **New** menu and choose a type such as **Service**, then save it.
3. Find the product or service you want the Fund's donations to post against, and select **Edit** in the **Action** column.
4. Note the product or service's Item Id.

You'll enter this Item Id in Anedot in the next step.

### Step 2: Enter the Item Id in Anedot

To map the Fund:

1. Go to **Settings > Finance > Funds**.
2. Open the Fund.
3. Enter the Item Id in **Internal Identifier**. Enter only the Item Id, with no name, SKU, or spaces.
4. Click **Save**.
5. Make a small test donation to that Fund.
6. Confirm the Sales Receipt line in QuickBooks shows the expected product or service.

New Sales Receipt lines for that Fund show the mapped product or service.

{% hint style="info" %}
Use **Internal Identifier**, not **Fund ID**. Fund ID is Anedot's system ID for the Fund and isn't sent as the QuickBooks Item Id.
{% endhint %}

Anedot matches the Fund's **Internal Identifier** to an active QuickBooks Item Id. Anedot refreshes its list of active Item Ids about once a day, and it can refresh the list at most once every 30 minutes when a Fund's Internal Identifier isn't on the list yet. If the Internal Identifier doesn't match an active Item Id, Anedot still creates the Sales Receipt, but without a product or service on that line.

## Data Relays

QuickBooks is a direct send from Anedot to QuickBooks Online through your authorized connection.

### What Anedot Sends

Anedot sends a **Sales Receipt** (never an Invoice or a Payment) when:

* A Donation Page submission or a paid Event Page submission is captured.
* A successful recurring charge is completed. Each charge is its own Sales Receipt, not only the first donation of a commitment.

Anedot sends one Sales Receipt per submission or recurring charge, with one line per Fund allocation. Amounts are sent in dollars as a number, for example `25.0` for $25.00. The amount is the full amount charged, including any fee the donor chose to cover.

Before creating the Sales Receipt, Anedot looks for a matching customer in your QuickBooks account. When the donor has a primary email, Anedot searches your QuickBooks customers by that email. If there's more than one match, Anedot uses the customer with the most recent last updated time, then the highest Id. If none matches, Anedot creates a new customer.

If the donor's email is blank or missing, Anedot looks for an existing QuickBooks customer with the same name and phone. If it can't find one clear match, Anedot creates a new customer.

`ItemRef` is sent on a line only when the Fund's Internal Identifier matches an active Item Id. Anedot doesn't send a deposit account.

These details aren't sent: hidden fields, custom fields, payment method, product or ticket names, transfers, and fees as separate lines. For more about hidden fields, see [Hidden Fields](https://docs.anedot.com/action-pages/page-builder/hidden-fields.md).

### Records Anedot Skips

Anedot doesn't create a Sales Receipt for the following, and no Integration Requests row is created when a send is skipped:

* Lead Pages
* A free Event registration with no donation
* Refunds, voids, chargebacks, and settlement
* Abandoned Actions
* Later edits
* Commitment records themselves (later successful recurring charges are still sent)
* Donations on a connection with **Enabled** unchecked
* A submission or recurring charge already sent successfully as a Sales Receipt to the same QuickBooks Company
* Donations after the connection is deleted
* Hidden fields

### Delivery And Retries

Each send can create up to three rows in **Settings > Integration Requests**: find customer, create customer, and the Sales Receipt. The Sales Receipt is the final row. Request headers are stored as `{}`.

Each row shows one of these results:

* **Success:** QuickBooks returned HTTP 200.
* **Failure:** QuickBooks returned any other completed response, for example HTTP 400 on the Sales Receipt.
* **Error:** Anedot couldn't complete the request. These attempts can be tried again automatically. If a step fails before the Sales Receipt, the row can show error text that includes the company ID.

When a row shows Failure, Anedot emails users who have the **Integration sync failed** notification turned on in the Integrations section of their notification settings. This notification is off by default, and it isn't sent for Error rows. The subject is "Anedot" followed by the connection **Name** and "Integration Failed", or "Anedot QuickBooks Integration Failed" when the connection has no name. See [Notifications](https://docs.anedot.com/get-started/security/notifications.md).

For more about reading request rows, see [Integration Requests](https://docs.anedot.com/integrations/relay-data-troubleshooting/integration-requests.md).

## Find Your Data in QuickBooks Online

First confirm the send in **Settings > Integration Requests**. The Sales Receipt is the final row for that donation.

To find sales receipts:

1. Go to **All apps > Sales & Get Paid > Sales transactions** in QuickBooks Online.
2. Open the sales receipt in the list.

To find customers:

1. Go to **All apps > Customer Hub > Customers & leads** in QuickBooks Online.

Anedot doesn't choose a deposit account, so QuickBooks uses its own default. You can review the **Undeposited Funds** account (also called **Payments to Deposit**) in **All apps > Accounting > Chart of accounts**. In QuickBooks, this account holds sales receipts and payments you want to combine before a bank deposit.

## Field Mapping

### Create Customer

| Anedot Data                                                         | QuickBooks Field                  |
| ------------------------------------------------------------------- | --------------------------------- |
| Full name plus email (or full name plus phone if there is no email) | `DisplayName`                     |
| First name                                                          | `GivenName`                       |
| Middle name                                                         | `MiddleName`                      |
| Last name                                                           | `FamilyName`                      |
| Suffix                                                              | `Suffix`                          |
| Title                                                               | `Title`                           |
| Full name, including title and suffix when present                  | `PrintOnCheckName`                |
| Address line 1                                                      | `BillAddr.Line1`                  |
| Address line 2                                                      | `BillAddr.Line2`                  |
| City                                                                | `BillAddr.City`                   |
| Country (always `USA`)                                              | `BillAddr.Country`                |
| Postal code                                                         | `BillAddr.PostalCode`             |
| State                                                               | `BillAddr.CountrySubDivisionCode` |
| Email                                                               | `PrimaryEmailAddr.Address`        |
| Phone, sent as `+1` plus the number                                 | `PrimaryPhone.FreeFormNumber`     |

### Sales Receipt

| Anedot Data                                                      | QuickBooks Field                                       |
| ---------------------------------------------------------------- | ------------------------------------------------------ |
| QuickBooks Customer Id from the match or create step             | `CustomerRef.value`                                    |
| Allocation amount in dollars                                     | `Line[].Amount`                                        |
| `Anedot Donation` plus the donation uid                          | `Line[].Description`                                   |
| Always `SalesItemLineDetail`                                     | `Line[].DetailType`                                    |
| Record created date (`YYYY-MM-DD`) in the account time zone      | `Line[].SalesItemLineDetail.ServiceDate` and `TxnDate` |
| Fund Internal Identifier, only when it matches an active Item Id | `Line[].SalesItemLineDetail.ItemRef.value`             |

## Payload Data

These examples show the request bodies as stored in **Settings > Integration Requests** for a $25.00 one-time card donation from Annie Dot. Values in angle brackets are placeholders.

The find-customer request:

```json
{"query":"select * from Customer where PrimaryEmailAddr = 'annie.dot@example.com'"}
```

When the donor has no email, the stored request is a **queries** list. It holds the name and phone lookups that ran, in the order they ran. Only the lookups that ran are stored, so the list can be shorter than this example. Values in angle brackets are placeholders.

```json
{"queries": [
  "select * from Customer where DisplayName = '<Full Name> <phone>'",
  "select * from Customer where GivenName = '<First>' AND FamilyName = '<Last>'",
  "select * from Customer where DisplayName = '<Full Name>'"
]}
```

The create-customer request, sent only when no matching customer is found. Blank fields are `null`:

```json
{
  "DisplayName": "Annie Dot annie.dot@example.com",
  "GivenName": "Annie",
  "MiddleName": null,
  "FamilyName": "Dot",
  "Suffix": null,
  "Title": null,
  "PrintOnCheckName": "Annie Dot",
  "BillAddr": {
    "Line1": "<line 1>",
    "Line2": "<line 2>",
    "City": "<city>",
    "Country": "USA",
    "PostalCode": "<zip>",
    "CountrySubDivisionCode": "<state>"
  },
  "PrimaryEmailAddr": {
    "Address": "annie.dot@example.com"
  },
  "PrimaryPhone": {
    "FreeFormNumber": "+1<number>"
  }
}
```

The Sales Receipt request. `ItemRef` appears only when the Fund's Internal Identifier matches an active Item Id. If the Fund isn't mapped, the line has no `ItemRef`.

```json
{
  "CustomerRef": {
    "value": "<QuickBooks Customer Id>"
  },
  "Line": [
    {
      "Amount": 25.0,
      "Description": "Anedot Donation <donation uid>",
      "DetailType": "SalesItemLineDetail",
      "SalesItemLineDetail": {
        "ServiceDate": "<YYYY-MM-DD>",
        "ItemRef": {
          "value": "<Internal Identifier>"
        }
      }
    }
  ],
  "TxnDate": "<YYYY-MM-DD>"
}
```

## Troubleshooting

### A Sales Receipt Isn't in QuickBooks

Check the following:

* Review the rows for the donation in **Settings > Integration Requests**. There can be more than one row, and the Sales Receipt is the final row.
* Confirm **Enabled** is checked on the connection.
* Confirm the Action Page is included by **All Action Pages** or **Selected pages**, and isn't listed in **Exclude Pages**.
* If a **Team** is set on the connection, confirm the page belongs to that team.
* Confirm the submission was captured, or that it's a successful recurring charge.
* Lead Pages and free Event registrations with no donation aren't sent.

### The Sales Receipt Has No Product or Service on the Line

Confirm the Fund's **Internal Identifier** contains only the QuickBooks Item Id, with no name, SKU, or spaces. Anedot can take up to 30 minutes to refresh its list of Item Ids, or about a day for its regular refresh. After that, send another test donation to the Fund.

### A Row Shows Failure

Review the response on the row in **Settings > Integration Requests**. If **Enabled** turned off, follow [Turn A Connection Off or On](https://docs.anedot.com/integrations/ecommerce-financial-membership/quickbooks-online.md#turn-a-connection-off-or-on). Then use [Push unsent](https://docs.anedot.com/integrations/ecommerce-financial-membership/quickbooks-online.md#push-unsent-donations) to send the donations you missed.

### A Row Shows Error

Error attempts can be tried again automatically. If the Sales Receipt still isn't in QuickBooks, use [Push unsent](https://docs.anedot.com/integrations/ecommerce-financial-membership/quickbooks-online.md#push-unsent-donations).

### You Need a Different Company

The connected Company can't be changed on an existing connection. Create a new QuickBooks connection for the other Company, then use **Push unsent** if you need to send earlier donations.

If the issue continues, contact our Support team at <help@anedot.com>.

## Related Articles

* [Integrations](https://docs.anedot.com/integrations.md)
* [Integration Requests](https://docs.anedot.com/integrations/relay-data-troubleshooting/integration-requests.md)
* [Webhooks (API)](https://docs.anedot.com/integrations/integration-automation-tools/webhooks.md)
* [Permission Sets](https://docs.anedot.com/settings/access/permission-sets.md)
* [Teams](https://docs.anedot.com/settings/access/teams.md)
* [Commitments](https://docs.anedot.com/finance/management-and-reporting/commitments.md)
* [Funds](https://docs.anedot.com/settings/finance/funds.md)
* [Notifications](https://docs.anedot.com/get-started/security/notifications.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.anedot.com/integrations/ecommerce-financial-membership/quickbooks-online.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
