An invoice when a deal closes
Applies to Invoice
What we will build#
| Card | Setting |
|---|---|
| Mapping | Opportunity → Invoice: customer from the Account name, dates, memo, addresses; one invoice line per Opportunity Product; the QB Invoice stored in a lookup on the Opportunity |
| Outbound | Created and Updated rules: Stage equals Closed Won |
Step 1: Map the invoice header#
- Create a lookup field QB Invoice on Opportunity, pointing to the QB Invoice object. It will hold the link to the invoice (see Sales sees who has paid).
- On QB Bridge Entities, pick Invoice, open Mapping and choose Opportunity. CustomerRef is added for you; click + Add Header Mapping Row for each other row:
| QBO Field | Salesforce Field |
|---|---|
| CustomerRef (required) | Account › Account Name: QB Bridge finds the synced customer by name |
| TxnDate | Close Date |
| DueDate | formula CloseDate + 30 |
| CustomerMemo.value | Opportunity Name |
| BillAddr.Line1, .City, .CountrySubDivisionCode, .PostalCode | Account billing street, city, state, postal code |
| ShipAddr.Line1 | formula IF(ISBLANK(Account.ShippingStreet), Account.BillingStreet, Account.ShippingStreet) (and the same for the city) |

The Invoice header. DueDate and the two ShipAddr rows are formulas.
Step 2: Map the lines#
- In 3. Line Item Detail Types, expand SalesItemLineDetail and choose Opportunity Product as Salesforce Object for this Line Type (Child Relationship Mapping).
- Map the line fields, pick QB Invoice under 4. QBO ID Storage, and save.
| QBO Field | Salesforce Field |
|---|---|
| Amount (required) | Total Price |
| ItemRef (required) | Product › Product Name |
| Qty | Quantity |
| UnitPrice | Sales Price |
| Description | Line Description |

The invoice lines: one line per Opportunity Product.
Step 3: Send at Closed Won#
- Build the Opportunity Flows for create and update.
- Click the Invoice Outbound to QuickBooks card. In Invoice Trigger Rules, switch On Salesforce Opportunity Record Create and … Record Update to Enabled; in each, add the row Stage Equals Closed Won with Logic Formula
1. Click Save Trigger.
Prove it#
| Check | Result |
|---|---|
| At Prospecting, nothing is sent | Nothing queued |
| Closed Won creates one invoice with three lines | QuickBooks invoice 1174 for Bluebird Dental: Standing Desk × 4 at 640, Ergo Chair × 4 at 320, Monitor Arm × 8 at 95; total 4,600 |
| Due 30 days after close | Close Date 2 Dec, Due Date 1 Jan |
| No shipping address → billing address | Ship-to city Denver: the billing address |
| The Opportunity links to the invoice | Its QB Invoice field points to the QB Invoice record INV-0013 (Payment Status Unpaid, Balance 4,600), with its lines |

Invoice 1174 as QuickBooks shows it: one line per Opportunity Product, the shipping address from the billing address, and the due date 30 days after the close date. The customer reads Bluebird Dental Group because finance renamed it in QuickBooks later (next page).
Video: Closed Won to invoice, start to finish.
Where to next#
- Sales sees who has paid: bring payments back