Short Answer
A seamless Make.com scenario that triggers upon A2X settlement posting, creates a manual journal in Xero, archives the source data to Google Drive, and sends a Slack notification if the amounts do not match the Xero bank statement lines.
The Problem
E-commerce sellers often struggle with manual reconciliation between A2X payouts and Xero bank feeds, leading to data entry errors and missing audit trails. Without automation, verifying that the A2X settlement matches the actual bank deposit requires tedious manual cross-referencing.
The Outcome
A seamless Make.com scenario that triggers upon A2X settlement posting, creates a manual journal in Xero, archives the source data to Google Drive, and sends a Slack notification if the amounts do not match the Xero bank statement lines.
Step-by-Step Guide
1. **Establish A2X Connection**: In Make, add the 'A2X' module (or Webhook) using the 'Watch Settlements' trigger. Connect your A2X account via API Key and Store ID.
2. **Configure Webhook/Trigger**: Set the trigger to fire when a settlement is 'Posted'. This ensures only finalized financial data enters Xero.
3. **Fetch Detail via HTTP**: Add an 'HTTP - Get a File' module. Map the 'Summary CSV URL' from the A2X bundle into the URL field. This retrieves the raw audit data.
4. **Archive to Google Drive**: Add the 'Google Drive - Upload a File' module. Map the data from the HTTP module to a dedicated 'Accounting/Audit' folder. Copy the 'Web View Link' for the next step.
5. **Xero Connection & Mapping**: Add the 'Xero - Create a Manual Journal' module. Connect your Xero organization via OAuth 2.0. Map 'Settlement Date' to 'Date' and use the Google Drive link in the 'Narration' field.
6. **Map Journal Lines (Iterator)**: Use a 'Flow Control - Iterator' if A2X sends an array of account lines. Map 'Total Amount' to 'Amount' and 'Account Code' from A2X to the corresponding field in Xero.
7. **Bank Recon Check**: Add 'Xero - List Bank Transactions'. Filter by the 'Reference' or 'Date' from the A2X bundle to find the corresponding bank statement line.
8. **Discrepancy Logic**: Add a 'Router' with two paths. Path A Filter: `abs(A2X_Total - Xero_Bank_Amount) > 0.01`. Path B Filter: `fallback`.
9. **Slack Notification**: On Path A, add 'Slack - Create a Message'. Use the mapping to alert: '⚠️ Discrepancy Found in Payout {{A2X_ID}}'.
10. **Error Handling**: Right-click the Xero module and select 'Add Error Handler (Break)'. This will pause the scenario and store the data for 7 days if Xero’s API is down or the Chart of Accounts is missing a code.
Data Mapping
| A2X Source Field | Xero Destination Field | Transformation/Formula | Requirement |
| :--- | :--- | :--- | :--- |
| `Settlement Id` | `Reference` | `{{1.id}}` | Required |
| `Settlement Date` | `Date` | `{{formatDate(1.date; "YYYY-MM-DD")}}` | Required |
| `Journal Lines[]` | `Journal Lines` | `Map via Iterator` | Required |
| `Account Code` | `Account Code` | `{{ifempty(1.code; "400")}}` | Required |
| `Gross Amount` | `Line Amount` | `{{parseNumber(1.amount)}}` | Required |
| `GDrive Link` | `Narration` | `Audit Docs: {{4.webViewLink}}` | Optional |
| `Currency` | `Currency Code` | `{{upper(1.currency)}}` | Required |
Gotchas & Failure Modes
• **Rate Limiting**: Xero limits API calls (60 per minute). If processing bulk historical settlements, use the 'Sleep' module or set the scenario 'Max number of cycles' to 1.
• **Data Types**: A2X often sends currency as a string (e.g., "1250.00"). Use the `parseNumber()` function in Make.com to ensure Xero accepts the value.
• **Draft vs. Posted**: Ensure the Xero 'Status' is set to 'DRAFT' during testing to avoid messing up your live books; switch to 'POSTED' only after verification.
• **Tax Rates**: If using Xero Tax Rates, ensure the A2X Account Mapping exactly matches the Xero Tax Type string (e.g., '20% (VAT on Income)').
Verification Checklist
- [ ] **Scenario Test Run**: Use the 'Run Once' button and select a single historical A2X settlement ID.
- [ ] **Account Code Validation**: Verify that the A2X Account Mapping exists in the Xero Chart of Accounts.
- [ ] **Bundle Inspection**: Check the 'Output' of the A2X module to ensure the JSON structure matches the expected Mapper input.
- [ ] **Manual Journal Check**: Open Xero and confirm the Manual Journal has both a Debit and Credit line that balance to zero.
- [ ] **Error Path Test**: Temporarily change a Xero account code to an invalid one to ensure the 'Break' error handler catches the failure.
Ready to Automate?
Build this automation with Make.com in minutes.