# QuickBooks Online Integration

Connect your BuyerKiosk account to QuickBooks Online to automatically sync your daily sales data, eliminating manual data entry and keeping your books accurate.

![QuickBooks Connected Overview](/images/support/articles/quickbooks_connected_overview.png)

*The QuickBooks integration setup page showing a connected account with account mappings*

---

## What This Integration Does

The QuickBooks integration automatically creates **journal entries** in your QuickBooks Online account from your daily close data. This includes:

| Data Type | What Gets Synced |
|-----------|------------------|
| **Payment Methods** | Cash, credit cards, checks, gift cards, store credits |
| **Sales & Returns** | New merchandise sales, used merchandise sales, returns |
| **Cost of Goods Sold** | COGS for new items, used items, and returns |
| **Inventory Purchases** | Buy transactions (cash, check, trade-in, store credit) |
| **Cash Management** | Cash over/short, paid in, paid out |

Each field from your daily close report maps to a specific account in your QuickBooks chart of accounts, ensuring transactions are recorded exactly where they belong.

---

## Getting Started

### Requirements

Before connecting, make sure you have:

- ✅ A QuickBooks Online account (Simple Start, Essentials, Plus, or Advanced)
- ✅ Admin access to your BuyerKiosk store
- ✅ Your QuickBooks chart of accounts set up with the accounts you'll need

### Accessing the Integration

1. Log into your BuyerKiosk admin panel
2. Click **Integrations** in the left sidebar
3. Select **QuickBooks**

![Navigation to QuickBooks](/images/support/articles/quickbooks_sidebar_navigation.png)

*Find QuickBooks under Integrations in the sidebar menu*

---

## Connecting to QuickBooks

### Step 1: Start the Connection

When you first visit the QuickBooks setup page, you'll see the "Not Connected" status. Click the `Connect to QuickBooks` button to begin.

![Not Connected State](/images/support/articles/quickbooks_not_connected.png)

*The QuickBooks page before connecting*

### Step 2: Sign In to Intuit

A popup window will open to Intuit's secure login page. Sign in with your QuickBooks Online credentials.

### Step 3: Select Your Company

If you have multiple QuickBooks companies, select the one you want to connect to BuyerKiosk.

![Company Selection](/images/support/articles/quickbooks_oauth_company_select.png)

*Select which QuickBooks company to connect*

### Step 4: Authorize Access

Review the permissions BuyerKiosk is requesting and click **Connect** to authorize. BuyerKiosk requests permission to:
- Read your chart of accounts
- Create journal entries
- View company information

Once authorized, the popup will close and your BuyerKiosk page will refresh to show the connected status.

---

## Configuring Account Mappings

After connecting, you need to map each BuyerKiosk field to the appropriate QuickBooks account. This is the most important step - proper mappings ensure your books are accurate.

![Account Mappings Overview](/images/support/articles/quickbooks_account_mappings_overview.png)

*The account mappings section with all categories*

### Understanding the Interface

Each mapping row shows:

| Element | Description |
|---------|-------------|
| **Field Name** | The data field from your daily close (e.g., "Cash Tendered") |
| **Field ID** | The technical identifier (e.g., `cashTendered`) |
| **DR/CR Badge** | Whether this creates a debit or credit entry |
| **Account Dropdown** | Select the QuickBooks account to map to |

### Selecting Accounts

Click any dropdown to see your available QuickBooks accounts, organized by account type:

![Account Selection Dropdown](/images/support/articles/quickbooks_account_dropdown.png)

*The dropdown shows all your QuickBooks accounts organized by type*

> **Tip:** Accounts are grouped by type (Bank, Accounts Payable, Cost of Goods Sold, etc.) to help you find the right one quickly.

### Mapping Categories

Fields are organized into categories to make setup easier:

#### Payment Methods (Debits to Asset Accounts)
These track where your money comes from:
- American Express, Visa, MasterCard, Discover → Credit Card in Transit
- Cash Tendered → Cash Drawer
- Check Payments → Checking Account
- Gift Cards Redeemed → Gift Cards Payable

#### Sales & Returns (Credits to Revenue Accounts)
- New Merchandise Sales → Sales - New
- Used Merchandise Sales → Sales - Used
- Returns → Returns accounts

#### Cost of Goods Sold (Debits to COGS Accounts)
- Cost of New Goods Sold → COGS - New
- Cost of Used Goods Sold → COGS - Used

#### Inventory Purchases - Buys (Inventory/Cash Accounts)
- Buys Paid - Cash → Cash Drawer
- Buys Paid - Check → Checking Account
- Buys Paid - Store Credit → Store Credits
- Buys Paid - Trade-ins → Trade Credits

#### Cash Management
- Cash Over/Short → Cash Over/Short
- Cash Paid In/Out → Cash Drawer

### Saving Your Mappings

After configuring all mappings, click `Save All Mappings` in the bottom right. You'll see a confirmation when saved successfully.

> **Warning:** Make sure all important fields are mapped before your first sync. Unmapped fields with values will be skipped, which could create unbalanced entries.

---

## Syncing Data

### Automatic Daily Sync

Once connected and configured, BuyerKiosk automatically syncs your daily close data to QuickBooks. This happens:

- After you complete your daily close in BuyerKiosk
- Via a background job that runs overnight

### Manual Sync

Need to sync data for a specific date? Use the Manual Sync feature:

1. In the **Manual Sync** section, select a date using the date picker
2. Click `Sync Now`
3. Wait for the sync to complete

![Manual Sync Section](/images/support/articles/quickbooks_connected_account.png)

*The Manual Sync section lets you sync any historical date*

> **Note:** Manual sync is useful for re-syncing a date if there was an error, or for syncing historical data when you first set up the integration.

### Viewing Sync History

The **Recent Sync History** section shows your last 10 sync attempts with status indicators:

| Status | Meaning |
|--------|---------|
| 🟢 Green border | Sync completed successfully |
| 🔴 Red border | Sync failed (hover for error message) |
| 🟡 Yellow border | Sync pending or in progress |

---

## Managing Your Connection

### Viewing Connection Status

The **Connected Account** section shows:
- **Company**: Your QuickBooks company name
- **Realm ID**: QuickBooks' internal identifier
- **Last Sync**: When data was last synced successfully

### Disconnecting QuickBooks

If you need to disconnect:

1. Click the red `Disconnect` button
2. Confirm when prompted

> **Warning:** Disconnecting will stop all automatic syncing. Your historical data in QuickBooks is not affected.

After disconnecting, you can reconnect at any time by clicking "Connect to QuickBooks" again.

---

## Troubleshooting

### Sync Failed - "No daily close data found"

**Cause:** The date you're trying to sync doesn't have completed daily close data.

**Solution:** Make sure your daily close is complete for that date before syncing.

### Sync Failed - "Journal entry unbalanced"

**Cause:** The total debits don't equal total credits (within rounding tolerance).

**Solution:** Review your account mappings. Make sure all fields with values are mapped to appropriate accounts.

### "Connection expired" Message

**Cause:** Your QuickBooks authorization has expired (tokens last about 180 days).

**Solution:** Click "Connect to QuickBooks" to re-authorize. Your mappings will be preserved.

### Can't See Some QuickBooks Accounts

**Cause:** Only active accounts appear in the dropdowns.

**Solution:** In QuickBooks, make sure the accounts you need are marked as active (not hidden or inactive).

---

## Best Practices

1. **Set up your QuickBooks chart of accounts first** - Create all the accounts you'll need before connecting
2. **Map all fields** - Even if you don't use certain payment methods, map them in case they're used later
3. **Review your first few syncs** - Check the journal entries in QuickBooks to make sure they look correct
4. **Keep the same mappings** - Changing mappings mid-year can create inconsistencies in your reports

---

## Related Articles

- [Daily Close Process](/support/articles/daily-close-process)
- [Understanding Your Sales Reports](/support/articles/sales-reports)
- [Managing Payment Methods](/support/articles/payment-methods)
