Xero and Microsoft Dynamics 365 Sales integration
Xero handles your accounting and invoicing. Dynamics 365 Sales manages your customer relationships and pipeline. Connecting them keeps your customer records and payment data synchronized, so your sales team has visibility into each customer's financial standing without switching between systems. New customers in Xero appear in Dynamics 365 Sales, and outstanding invoices and payment status flow into the CRM alongside opportunity data.
What moves between them
The main flow is Xero to Dynamics 365 Sales. Contact records (customers, vendors, and leads) flow from Xero into Dynamics 365 Sales as accounts and contacts, along with invoice and payment data so the sales team can see customer financial standing. Dynamics 365 Sales acts as read-mostly for the contact data; the system of record remains Xero. ml-connector pulls on webhook notification when Xero publishes a contact or invoice change, or on a schedule you define if you prefer polling. Contact enrichment (address, phone, tax ID) syncs in both directions to keep the CRM record complete.
How ml-connector handles it
ml-connector stores both OAuth2 credential sets encrypted and manages token refresh for both Xero and Dynamics 365 Sales. When a Xero webhook fires for a contact CREATE or UPDATE, ml-connector fetches the full contact record from Xero using the resource ID from the webhook, maps contact fields to Dynamics 365 Sales account and contact tables (name, email, phone, address, tax ID), and upserts into Dataverse. For invoices, ml-connector reads Xero invoices on the sync schedule you set and writes invoice records to Dynamics 365 Sales so the sales team can see customer balance and payment status. ml-connector validates the Xero-tenant-id header on every request and handles Xero's 60-per-minute rate limit by backing off and retrying. On the Dynamics 365 Sales side, ml-connector presents both credential sets (client credentials OAuth2 and Entra ID tenant configuration) and respects the 256 KB webhook payload limit by splitting large contact records if needed. Contact creation in Dynamics 365 Sales (for example, from the sales team discovering a new prospect in the CRM) does not flow back to Xero, so Xero remains the source. All records carry full audit trail and can be replayed if a Dataverse call fails.
A real-world example
A mid-market B2B consulting firm uses Xero for accounting and invoicing across multiple offices, and Dynamics 365 Sales to track opportunities and customer relationships. Before the integration, when a sales rep was preparing a proposal or managing an opportunity, they had to open Xero in another tab to check whether the customer was current on their invoices or had outstanding balances from prior projects. With Xero and Dynamics 365 Sales connected, each customer's account record in the CRM shows their Xero contact details, outstanding invoice total, and payment status. Reps see this before a call or proposal, and the finance team can see which customers are heavy in the pipeline without leaving Xero.
What you can do
- Sync Xero customers into Dynamics 365 Sales accounts and contacts, so sales teams see customer data from your accounting system.
- Display invoice and payment status in Dynamics 365 Sales so reps know customer financial standing before proposals or negotiations.
- Map Xero contact fields (name, email, phone, address, tax ID) to Dynamics 365 Sales account and contact entities automatically.
- Authenticate Xero via OAuth2 with Xero-tenant-id header routing, and Dynamics 365 Sales via Entra ID OAuth2 client credentials.
- Handle Xero webhooks for contact and invoice changes, with polling fallback if webhooks are disabled.
Questions
- Which direction does data flow between Xero and Dynamics 365 Sales?
- The main flow is Xero to Dynamics 365 Sales. Customer contact records, invoices, and payment status sync from Xero into the CRM so sales teams have visibility into customer financial standing. Contact enrichment such as address and phone updates can flow in both directions to keep both systems current. Xero remains the source of truth for accounting data.
- How does ml-connector handle Xero's webhook metadata-only payloads?
- Xero webhooks include only the resource ID and event type, not the full record. When ml-connector receives a webhook notification, it uses the resource ID to fetch the complete contact or invoice record from Xero via a follow-up GET request, then maps it to Dynamics 365 Sales. This ensures the CRM always receives the latest full record, and it handles cases where Xero contact data has changed since the webhook was fired.
- Does ml-connector sync invoices as separate records or as linked data on the account?
- ml-connector reads Xero invoices and can write them as separate invoice records in Dynamics 365 Sales linked to the corresponding customer account, or it can aggregate invoice status (outstanding balance, days past due) and display it on the account record itself. Your configuration determines which approach fits your sales workflow best.
Related integrations
More Xero integrations
Other systems that connect to Microsoft Dynamics 365 Sales
Connect Xero and Microsoft Dynamics 365 Sales
Free to use. Add your credentials, ping your real systems, and see if we fit.
Get started