Skip to content
Pages · Configure an entity

Mapping: references and line items

Fields that point to other records#

FieldOnPoints to
VendorRef (required)BillA QuickBooks vendor
CustomerRef (required)Invoice; optional on Bill linesA QuickBooks customer
ItemRefInvoice lines and Bill item lines (required on both)A product or service
AccountRefBill account lines (required there)An account in the chart of accounts
ClassRefInvoice, linesA class
TaxCodeRefLinesA tax code
SalesTermRef (TermRef on Vendor)Customer, Vendor, Invoice, BillA payment term, such as Net 30
DepartmentRefInvoice, BillA department (location)
PaymentMethodRefCustomerA payment method
APAccountRefBillThe accounts payable account
DepositToAccountRefInvoiceThe account a payment is deposited to
DiscountAccountRefInvoice discount linesThe 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#

SituationWhat happensWhat to do
Not foundThe 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 matchThe 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 matchThe 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#

Applies to InvoiceBill

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.

Invoice
Detail typeForRequired
SalesItemLineDetailA product or service soldAmount, ItemRef
DescriptionOnlyA text-only lineAmount
DiscountLineDetailA discount on the invoiceAmount
Bill
Detail typeForRequired
AccountBasedExpenseLineDetailAn expense posted to an accountAmount, AccountRef
ItemBasedExpenseLineDetailA product or service boughtAmount, 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.

  1. Expand a detail type and choose Salesforce Object for this Line Type.
  2. Pick a child object (for example Opportunity Product) for one QuickBooks line per child record. The window shows Child Relationship Mapping.
  3. 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.
  4. 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 FieldSalesforce Field
AmountTotal Price
ItemRefProduct › Product Name (must match a QuickBooks product)
QtyQuantity
UnitPriceSales Price
DescriptionLine 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#