Sync Multi-Channel Ecommerce Orders to Xero Invoices (Make.com)
Automate revenue recognition and tax compliance by syncing multi-channel sales data directly into Xero using Make.com.
Tools: Multi-Channel → Xero
Platform: Make.com
Short Answer
A fully automated workflow in Make.com that detects new orders, matches or creates customers in Xero, generates itemized invoices with correct tax codes, and applies payments for instant bank reconciliation.
The Problem
Manual entry of high-volume sales from multiple marketplaces (Amazon, eBay, Shopify) into Xero is time-consuming and prone to human error. Without automation, managing diverse tax rates and reconciling payments across different gateways becomes an accounting nightmare.
The Outcome
A fully automated workflow in Make.com that detects new orders, matches or creates customers in Xero, generates itemized invoices with correct tax codes, and applies payments for instant bank reconciliation.
Step-by-Step Guide
1. **Create Scenario & Webhook**: In Make.com, create a new scenario and add the 'Webhooks' module. Select 'Custom Webhook' and copy the URL into your Multi-Channel Tool (Tool A) to trigger on 'Order Placed'.
2. **Initialize Connection**: Add the 'Xero' module. Click 'Add' to establish a connection via OAuth2, logging into your Xero account and selecting the correct Organization.
3. **Search for Contact**: Add a 'Xero: Get a Contact' module. Map the email address from Tool A to the 'Email' field in Xero to prevent duplicate records.
4. **Apply Routing Logic**: Place a 'Router' module. Create two paths using Filters: Path A if 'Contact ID' does not exist (Create Contact); Path B if it does (Update Contact).
5. **Configure Invoice Creation**: Add the 'Xero: Create an Invoice' module. Map 'Order ID' to 'Invoice Number' and use the `parseDate()` function to format the transaction date correctly for Xero.
6. **Map Line Items & Taxes**: Use the 'Map' toggle on Line Items. Ensure SKU, Quantity, and Unit Amount are linked. Use a `switch()` function in the Tax Type field to map Marketplace Tax Codes to Xero Account Tax Codes (e.g., `switch(TaxName; VAT; Output; Zero Rated)`).
7. **Add Payment Logic**: Add a 'Xero: Create a Payment' module. Map the 'Invoice ID' from the previous step and specify the 'Bank Account ID' where the funds are deposited (e.g., your Stripe or PayPal clearing account in Xero).
8. **Implement Error Handling**: Right-click the Xero Invoice module and select 'Add error handler'. Choose the 'Break' directive to automatically retry if Xero's API is temporarily down, ensuring no orders are missed.
Data Mapping
| Tool A Source Field | Make.com Transformation | Xero Destination Field | Requirement |
| :--- | :--- | :--- | :--- |
| Customer Email | `lower(email)` | Contact: Email Address | Required |
| Order ID | `Order-{{value}}` | Invoice: Invoice Number | Required (Unique) |
| Created Date | `formatDate(date; YYYY-MM-DD)` | Invoice: Date | Required |
| Line Item SKU | `{{item.sku}}` | Line Item: Item Code | Optional |
| Subtotal | `{{total / (1 + (tax_rate/100))}}` | Line Item: Unit Amount | Required |
| Shipping Country | `if(country='UK'; '20% (VAT)'; 'Exempt')` | Line Item: Tax Type | Required (Logic Based) |
| Payment Gateway | `switch(gw; 'Stripe'; '120'; 'PayPal'; '121')` | Payment: Bank Account | Required |
Gotchas & Failure Modes
• **Rate Limiting**: Xero has a limit of 60 calls per minute. For high-volume bursts, use the 'Sleep' module or set the scenario 'Max number of cycles' to 1 to process sequentially.
• **Draft vs. Authorised**: By default, invoices may be created as 'Draft'. You must set the Status to 'Authorised' if you intend to apply a Payment in the next step, as payments cannot be applied to drafts.
• **Zero-Value Invoices**: Xero may error out on $0.00 items. Use a Filter to exclude 100% discount line items if they don't impact your tax liability.
• **Rounding Discrepancies**: Modern ecommerce tools often round to 2 decimals, while Xero can hold more. Ensure your 'Tax Amount' mapping matches your Tool A's calculated total to avoid balance mismatches.
Verification Checklist
- [ ] **Webhook Check**: Trigger a test order in Tool A and verify the 'Custom Webhook' module receives a '1' in the bubble.
- [ ] **Mapping Check**: Open the Xero Invoice module in 'Run Once' mode and inspect the 'Input' to ensure dates and currencies are formatted correctly.
- [ ] **Contact Deduplication**: Run the scenario twice with the same email to confirm no duplicate contacts are created in Xero.
- [ ] **Status Verification**: Log into Xero and confirm the test invoice is marked as 'Paid' and reconciliation matches the gateway fee account.
- [ ] **Error Handler Test**: Temporarily disconnect Xero and confirm the 'Break' handler creates a record in the 'Incomplete Executions' tab.
Ready to Automate?
Build this automation with Make.com in minutes.