Short Answer
A fully automated Make.com scenario that detects closed-won deals, performs a duplicate check in QuickBooks, creates or updates customers as needed, and generates a formatted invoice with multiple line items, ensuring 100% data integrity and faster payment cycles.
The Problem
Manual entry of sales data from a CRM into QuickBooks is labor-intensive and prone to human error, often leading to billing delays, duplicate records, and inconsistent financial reporting. Businesses struggle to keep customer contact information and transaction history synchronized across sales and accounting departments.
The Outcome
A fully automated Make.com scenario that detects closed-won deals, performs a duplicate check in QuickBooks, creates or updates customers as needed, and generates a formatted invoice with multiple line items, ensuring 100% data integrity and faster payment cycles.
Step-by-Step Guide
1. **Create Scenario & Webhook**: In Make.com, create a new scenario. Add the 'Webhooks' module with a 'Custom Webhook' trigger. Copy the URL and paste it into your CRM's webhook settings for the 'Deal Updated' event.
2. **Run Once & Map**: Click 'Run Once' in Make, then move a deal to 'Closed-Won' in your CRM to capture the data structure (JSON bundle).
3. **Identify Deal Status**: Add a 'Filter' after the webhook. Set the condition to only continue if the `status` or `stage` field equals 'Closed-Won'.
4. **Search QuickBooks Customer**: Add the 'QuickBooks Online > Search for Customers' module. Map the CRM 'Company Name' to the QBO `Query` field using the syntax: `Name = '{{1.company_name}}'`.
5. **Route Based on Presence**: Add a 'Router' module.
- **Path A (New)**: Set filter to `Total number of bundles` equal to 0. Add 'QuickBooks Online > Create a Customer'.
- **Path B (Existing)**: Set filter to `Total number of bundles` greater than 0. Add 'QuickBooks Online > Update a Customer'. Use the `ID` and `SyncToken` returned from the search step.
6. **Iterate Line Items**: If your CRM sends products as an array, add an 'Iterator' module to split the products into individual bundles.
7. **Transform Data**: Use an 'Array Aggregator' after the Iterator to group these items back into the specific format QuickBooks requires for invoices (mapping Item Ref, Amount, and Description).
8. **Create Invoice**: Add the 'QuickBooks Online > Create an Invoice' module. Map the Customer ID from the Router paths and the Line Items from the Aggregator output.
9. **Update CRM Reference**: Add an 'Update Record' module for your CRM. Map the QuickBooks Invoice ID back to a custom field in your CRM to link the two objects.
10. **Error Handling**: Right-click the QuickBooks Create Invoice module and select 'Add error handler'. Use the 'Break' directive to automatically retry on temporary API timeouts or 'Ignore' for specific validation errors.
Data Mapping
| CRM Source Field | QuickBooks Destination | Transformation / Function | Requirement |
| :--- | :--- | :--- | :--- |
| `deal_name` | `DocNumber` | `substring(deal_name; 0; 21)` | Optional |
| `company_name` | `DisplayName` | `trim(company_name)` | **Required** |
| `customer_email` | `PrimaryEmailAddr` | `lower(customer_email)` | Optional |
| `products[]` | `Line.SalesItemLineDetail` | `map()` via Array Aggregator | **Required** |
| `currency_code` | `CurrencyRef` | `ifempty(currency; 'USD')` | **Required** |
| `deal_id` | `PrivateNote` | `"CRM ID: " + deal_id` | Optional |
Gotchas & Failure Modes
• **Unique Display Name**: QuickBooks requires the `DisplayName` to be unique across Customers, Vendors, and Employees. If the sync fails, use the Make.com `{{uuid}}` or the CRM ID to append a unique string to the name.
• **SyncToken Mismatch**: When updating a Customer, you MUST provide the latest `SyncToken`. If you don't fetch it immediately before the update, Make will return a '400: Object Not Found' or 'Stale Object' error.
• **Operation Quotas**: Make.com counts every module execution as an operation. Use a 'Search' module effectively to avoid creating duplicate 'Create' operations, and always use Filters as early as possible in the scenario to save operations.
• **Tax Calculation**: QuickBooks requires specific `TaxCodeRef` IDs. If your CRM sends a percentage, use a 'Switch' or 'Lookup Table' function in Make to map '10%' to the specific QBO Tax ID (e.g., '14').
Verification Checklist
- [ ] **Trigger Capture**: Run the scenario manually and verify the Webhook captures the CRM bundle correctly.
- [ ] **Filter Logic**: Ensure a 'Lost' deal does not trigger the QuickBooks modules.
- [ ] **Search Verification**: Check 'Execution History' to see if the Search module correctly identifies existing customers vs. new ones.
- [ ] **Line Item Mapping**: Open the QuickBooks Invoice after a test run to ensure 'Qty', 'Rate', and 'Total' match the CRM data.
- [ ] **Link-back Check**: Verify the CRM record is updated with the QuickBooks Invoice ID/URL for easy cross-referencing.
Ready to Automate?
Build this automation with Make.com in minutes.