Short Answer
A robust Make.com scenario that captures A2X settlement data, validates account mappings in real-time, pushes multi-line Journal Entries to QuickBooks, and triggers an error handler if the 'Clearing Account' doesn't balance to zero.
The Problem
Native integrations often lack the granular control needed to catch mapping errors or automate complex inventory adjustments. Businesses struggle with 'silent failures' where settlements post with incorrect accounts or missing COGS data, leading to skewed Balance Sheets.
The Outcome
A robust Make.com scenario that captures A2X settlement data, validates account mappings in real-time, pushes multi-line Journal Entries to QuickBooks, and triggers an error handler if the 'Clearing Account' doesn't balance to zero.
Step-by-Step Guide
1. **Create Webhook**: In Make.com, add a 'Custom Webhook' module. Copy the URL and paste it into A2X Settings > Notifications > Webhook URL to trigger on 'Settlement Finalized'.
2. **Initialize Connection**: Add a 'QuickBooks Online' module. Use the 'Make an API Call' or 'Create a Journal Entry' module. Authorize your QBO company through the OAuth2 popup.
3. **Parse A2X Payload**: Use the 'JSON Parser' if the webhook body is stringified. Ensure you can see the array of line items (Sales, Fees, Tax).
4. **Set Up Iterator**: Add an 'Iterator' module to deconstruct the A2X `line_items` array. This allows Make to process each accounting category individually.
5. **Aggregate for QBO**: Add an 'Array Aggregator' after the Iterator. Map the fields into the structure required by the QBO 'Create a Journal Entry' module (Debit/Credit lines).
6. **Apply Data Filters**: Add a 'Filter' between the Aggregator and QBO to ensure the `Total Amount` is not zero, preventing empty journal entries.
7. **Map Journal Fields**: In the QBO module, map its `DocNumber` to the A2X `Settlement ID`. Use the `formatDate()` function to convert the A2X payout date to `YYYY-MM-DD` format.
8. **Implement Error Handling**: Right-click the QBO module and select 'Add error handler'. Choose the 'Break' directive to automatically retry on transient API timeouts (429 or 503 errors).
9. **Duplicate Prevention**: Add a 'QuickBooks Online: Search for Journal Entries' module at the start. Use a filter: `Continue only if Total Number of Bundles is 0` to prevent double-posting settlements.
Data Mapping
| A2X Field | QBO Field | Make.com Transformation/Function | Requirement |
| :--- | :--- | :--- | :--- |
| `settlement_id` | `DocNumber` | `toString(settlement_id)` | Required |
| `payout_date` | `TxnDate` | `formatDate(payout_date; "YYYY-MM-DD")` | Required |
| `total_sales` | `Line: Credit` | `formatNumber(total_sales; 2; "."; "")` | Required |
| `total_fees` | `Line: Debit` | `if(value < 0; abs(value); value)` | Required |
| `currency` | `CurrencyRef` | `upper(currency)` | Optional |
| `account_name` | `AccountRef/Name` | `lookup(mapping_table; account_name)` | Required |
Gotchas & Failure Modes
• **Rate Limiting**: QuickBooks API has a limit of 500 requests per minute. Use Make's 'Sleep' module if processing high-frequency Amazon settlements.
• **Zero-Value Lines**: QBO will reject Journal Entries with 0.00 value lines. Use an 'Iterator' filter to strip these out before the 'Aggregator' step.
• **Mapping Mismatches**: A2X account names must match QBO Chart of Accounts exactly. Use a 'Get an Account' module in Make to verify the `Account ID` exists before attempting the POST.
• **Bundle Size**: Large settlements can exceed 200 lines. Use Make's settings to increase 'Max number of cycles' for the scenario to prevent timeouts.
Verification Checklist
- [ ] Run A2X 'Test Webhook' and verify the 'Custom Webhook' module receives a JSON payload.
- [ ] Check the 'Search Journal Entries' step successfully skips an existing ID in 'Run Once' mode.
- [ ] Verify that Debit and Credit totals in the QBO Journal Entry module output are exactly equal.
- [ ] Trigger an intentional error (map to a non-existent account) to ensure the 'Error Handler' notification fires.
- [ ] Confirm the 'Settlement ID' appears in the QBO 'Private Note' for easy cross-referencing.
Ready to Automate?
Build this automation with Make.com in minutes.