Mapping: references and line items
Fields that point to other records#
| Field | On | Points to |
|---|---|---|
| VendorRef (required) | Bill | A QuickBooks vendor |
| CustomerRef (required) | Invoice; optional on Bill lines | A QuickBooks customer |
| ItemRef | Invoice lines and Bill item lines (required on both) | A product or service |
| AccountRef | Bill account lines (required there) | An account in the chart of accounts |
| ClassRef | Invoice, lines | A class |
| TaxCodeRef | Lines | A tax code |
| SalesTermRef (TermRef on Vendor) | Customer, Vendor, Invoice, Bill | A payment term, such as Net 30 |
| DepartmentRef | Invoice, Bill | A department (location) |
| PaymentMethodRef | Customer | A payment method |
| APAccountRef | Bill | The accounts payable account |
| DepositToAccountRef | Invoice | The account a payment is deposited to |
| DiscountAccountRef | Invoice discount lines | The account a discount posts to |
How QB Bridge finds the ID#
- A number is treated as the QuickBooks ID and sent as it is.
- A vendor or customer name (VendorRef, CustomerRef) is looked up in the vendors and customers QB Bridge has already synced, leaving out deleted ones. If there is none, the record stops with "Vendor "…" has no QuickBooks ID yet. Sync that Vendor to QuickBooks first, or map a field that holds its QuickBooks ID."
- Any other name (a product, an account, a term) is looked up in the reference data: the QuickBooks lists cached on the QB Bridge Settings tab (Settings and background jobs). Only active QuickBooks records of the connected company count.
flowchart TD
S["The value mapped to a Ref field"] --> N{"A number?"}
N -- "Yes" --> ID["Sent as the QuickBooks ID"]
N -- "No" --> K{"VendorRef or CustomerRef?"}
K -- "Yes" --> SY["Looked up in the vendors or customers already synced"]
K -- "No" --> RD["Looked up in the reference data: full name, then name, then ID"]
SY --> C{"How many matches?"}
RD --> C
C -- "One" --> OK["Its QuickBooks ID is sent"]
C -- "None" --> E1["The record stops: no QuickBooks ID yet, or MISSING_REF_DATA"]
C -- "Two or more" --> E2["The record stops: map the full name or the ID"]When a name is not found, or found twice#
| Situation | What happens | What to do |
|---|---|---|
| Not found | The record stops with MISSING_REF_DATA::<type>::<name>, for example MISSING_REF_DATA::ItemRef::Desk. | Check the spelling against QuickBooks. Make sure the type is selected in Select Reference Types to Sync and has been fetched (or the customer or vendor has been synced). In the Sync to QuickBooks window, an administrator can click Fetch reference data now. |
| Several products, accounts or terms match | The record stops: ""Desk" matches several ItemRef entries in QuickBooks (…). Map the full name instead, e.g. "…"." | Map the full name QuickBooks shows, such as Furniture:Desk, or the ID. |
| Several customers or vendors match | The record stops: ""Acme" matches 2 Customer records in QuickBooks. Map the QuickBooks Id instead of the name." | Map a field that holds the QuickBooks ID. |
The exact lookup order
For reference data, QB Bridge looks for active records of that type, of the connected company, in this order: the full name (for sub-items, Parent:Child), then the short name, then the QuickBooks ID. The first level with a match decides; two matches at that level are an error rather than a guess, because a guessed product or account would post to the wrong place.
Line items#
QuickBooks will not accept an invoice or bill without lines. Each line has a detail type; configure the types you use in 3. Line Item Detail Types of the mapping window.

An Invoice mapped from Opportunity: the header rows, then 1 the line detail types under 3. Line Item Detail Types. Expand one to map its lines.
| Detail type | For | Required |
|---|---|---|
| SalesItemLineDetail | A product or service sold | Amount, ItemRef |
| DescriptionOnly | A text-only line | Amount |
| DiscountLineDetail | A discount on the invoice | Amount |
| Detail type | For | Required |
|---|---|---|
| AccountBasedExpenseLineDetail | An expense posted to an account | Amount, AccountRef |
| ItemBasedExpenseLineDetail | A product or service bought | Amount, ItemRef |
BillableStatus cannot be mapped on bill lines (QuickBooks does not accept it from outside); QB Bridge still copies it from QuickBooks to the QB Bill Line.
- Expand a detail type and choose Salesforce Object for this Line Type.
- Pick a child object (for example Opportunity Product) for one QuickBooks line per child record. The window shows Child Relationship Mapping.
- Or pick the mapped object itself for fixed lines filled from the header record. The window shows Flat Mapping Mode, with blocks you add with Add Line Item Block.
- Fill the required rows, add more with + Add <DetailType> Mapping Row (for example + Add SalesItemLineDetail Mapping Row; + Add Field Mapping in a fixed line), then save.

Invoice lines: SalesItemLineDetail from Opportunity Products, in Child Relationship Mapping.
Example: invoice lines from Opportunity Products
| QBO Field | Salesforce Field |
|---|---|
| Amount | Total Price |
| ItemRef | Product › Product Name (must match a QuickBooks product) |
| Qty | Quantity |
| UnitPrice | Sales Price |
| Description | Line Description |
How lines stay matched
QB Bridge remembers which QuickBooks line belongs to which child record, so an update changes the existing lines in place. A child record you delete removes its line from the next update. Amounts are rounded to 2 decimals, as QuickBooks keeps them.
A header saved before its lines
If an invoice or bill is sent before it has any lines, QuickBooks would refuse it, so QB Bridge skips it with "Child line items are not available yet, so the <Entity> was not created in QuickBooks. It will be created once its line items exist." It is created at the next send after the first line is added, for example by the Updated rule.
Where to next#
- Formulas and LOOKUP: calculate values and look IDs up yourself
- Outbound: the Sync to QuickBooks action: send your first record