Skip to content
Pages · Configure an entity

Outbound: the Sync to QuickBooks action

Applies to CustomerVendorInvoiceBill

Step 1: Create the action#

  1. In Setup, open Object Manager, your mapped object, Buttons, Links, and Actions.
  2. Click New Action.
  3. Action Type: Lightning Web Component.
  4. Lightning Web Component: pick dbt:qboSendToQB.
  5. Label: Sync to QuickBooks. This is the button text; you may change it.
  6. Name: Sync_to_QuickBooks. Use exactly this: the status on the Entities tab recognises the action only by this name; an action with another Name shows as Not created.
  7. Save. Leave the other fields as they are.

New Action on Opportunity: 3 Action Type, 4 the component dbt:qboSendToQB, 5 Label, 6 Name Sync_to_QuickBooks, 7 Save. The numbers match the steps above.

Step 2: Add it to the page layout#

  1. In Object Manager, open Page Layouts and click Edit on the layout your users see.
  2. In the palette, select Mobile & Lightning Actions.
  3. Drag Sync to QuickBooks into Salesforce Mobile and Lightning Experience Actions. If that section still shows the predefined actions, click override the predefined actions first.
  4. Save. Repeat for every layout in use.

Step 3: Send a record#

  1. Open a record of the mapped object and click Sync to QuickBooks. The Sync with QuickBooks window opens.
  2. If the object is mapped to more than one entity, choose under Select an entity to sync, for example Sync Customer.
  3. Check Mapped Values to Send (and Line Items for invoices and bills): every mapped value, with formulas already worked out.
  4. Click Sync Now. A message confirms "Successfully synced Customer to QuickBooks (QBO ID: …)".

The Sync with QuickBooks window: 3 the values it will send; 4 Sync Now.

Video: a new customer sent with Sync to QuickBooks, then found in QuickBooks.

After the send: the QuickBooks data component shows the customer as Synced, with its QuickBooks details. If you store the QuickBooks ID in a field, that field is filled too.

The same customer in QuickBooks, created by QB Bridge.

The QuickBooks data component on a record page has the same Sync to QuickBooks button in its header, for QB Operators and Administrators; it opens the same window (Inbound: changes from QuickBooks).

A record that is already in QuickBooks

The window says "This record is already synced to QuickBooks as a …", shows its QuickBooks ID, and the button reads Update Sync?. The window lists every mapped value, but the update sends only the fields ticked under Mapped QuickBooks Fields to Update (all mapped fields if none are ticked), and of those only the ones that changed since the last send. If nothing changed, nothing is sent: "Nothing mapped has changed since the last sync; nothing was sent to QuickBooks."

A record already in QuickBooks: the window names its QuickBooks ID, lists the values and line items, and the button reads Update Sync?

When a product, account or term is not found

If a name in the record does not match the reference data, the window says ""…" (ItemRef) is not in the QuickBooks reference data. Create it in QuickBooks, then fetch reference data." An administrator sees Fetch reference data now: click it, wait a few minutes, then sync again. Anyone else sees "Ask a QB Bridge administrator to fetch reference data." See Mapping: references and line items.

For the people who use it#

The window saysWhat to do
"Are you sure you want to sync this record to QuickBooks as a …?"Check the values, then Sync Now.
"No mapped fields found for this record."Nothing to send for this record. Ask your administrator.
"No QuickBooks mapping configured for object …"This kind of record is not set up for QuickBooks.
"You do not have permission to sync records to QuickBooks. Ask an administrator for the QB Operator permission set group."You need QB Operator or higher.
"Preview unavailable: one or more mapped fields could not be read on this record. Either a field does not exist on this object or you do not have read access to it." and "Ask your admin to open the … mapping on the QB Bridge Entities tab and save it again, then check that every mapped field exists on this object."The mapping names a field this record's object does not have (often: the action is on a different object than the mapping), or you cannot read a mapped field. Ask your administrator.
"Error: "…" is N characters (…), but QuickBooks accepts at most M. Shorten it in Salesforce or change the mapping."Shorten that value on the record, then sync again.
"Error: …"QuickBooks or QB Bridge refused the record. The message says why; see Messages and error codes.

How the action differs from automatic sync#

The action runs straight away, while you wait, once, and ignores the rule conditions: you decided to send this record. If it fails, you see why and can try again yourself. Automatic sync runs in the background moments after a save, only when the rules allow it, and is retried if it fails. Both build the same request from the same mapping, update the QB record, and appear in the record's sync history.

Where to next#