ml-connector
MYOBMicrosoft Dynamics 365 Sales

MYOB and Microsoft Dynamics 365 Sales integration

MYOB runs your books in Australia and New Zealand. Dynamics 365 Sales runs your sales pipeline. When the two are connected, every customer and invoice in MYOB appears in Dynamics 365 Sales within hours, so your sales team sees real invoice history, payment status, and customer GL codes in the context of every deal. When a sales order closes in Dynamics 365 Sales, ml-connector creates the matching SO and payment tracking in MYOB without manual entry, and your accounting team sees the revenue pipeline in the books where it belongs.

How MYOB works

MYOB exposes customers, suppliers, contacts, purchase and sales invoices, sales orders, payments, and GL accounts through the AccountRight Live REST API, documented in the MYOB Developer Portal. Cloud customers authenticate with OAuth2 and must also supply their company file username and password in every request via three headers: Bearer token, x-myobapi-key, and x-myobapi-cftoken. Access tokens expire every 20 minutes; refresh tokens last one week. MYOB has no webhook system, so all reads are by polling using OData filters on LastModified timestamps. API rate limit is 8 requests per second and 1,000,000 requests per day per API key.

How Microsoft Dynamics 365 Sales works

Microsoft Dynamics 365 Sales exposes accounts, contacts, leads, opportunities, sales orders, invoices, and quotes through the Dataverse Web API over OData v4. Authentication is OAuth 2.0 via Microsoft Entra ID using client credentials. Dynamics 365 Sales can push Create, Update, Delete, and custom action events to a registered webhook endpoint with a 60-second timeout and one automatic retry for transient errors. Tokens expire in approximately 60 minutes. Payloads are limited to 256 KB, and webhook registration requires API access through the Plugin Registration Tool or Dataverse Web API.

What moves between them

Customer and supplier contacts flow from MYOB to Dynamics 365 Sales. Sales invoices from MYOB become opportunities in Dynamics 365 Sales, tagged with the MYOB GL account and job code, so sales context stays in sync with AR. When a sales order is updated in Dynamics 365 Sales, ml-connector creates the matching sales order in MYOB and registers a payment tracking record. The sync is pull-driven from MYOB (polling on a schedule you set) and push-driven from Dynamics 365 Sales (via webhook when an order is modified or closed).

How ml-connector handles it

ml-connector stores both credential sets encrypted and presents the MYOB company file credentials (username and password Base64-encoded) as the x-myobapi-cftoken header on every MYOB call. It obtains and caches the OAuth2 bearer token for MYOB and refreshes it when the 20-minute expiry approaches or when a call returns 401. It polls MYOB on a schedule you define, filtering for contacts and invoices modified since the last poll using the OData $filter on LastModified. For Dynamics 365 Sales, ml-connector registers a webhook endpoint to receive updates when opportunities and orders are created or changed. Because MYOB has no native concept of job codes in Dynamics 365 Sales fields, ml-connector uses a custom field mapping to store the MYOB job code. GL accounts are matched by name or account number. The Dynamics 365 Sales webhook payload is validated and an order confirmation is returned within 60 seconds. If Dynamics 365 Sales rejects a payload, ml-connector retries the post to MYOB with exponential backoff.

A real-world example

A regional accounting and consulting firm in Sydney runs MYOB for client accounting, and their sales team uses Dynamics 365 Sales to track service opportunities and project scopes. Before integration, the sales team tracked their own spreadsheet of client invoice totals and payment status, updated weekly by email from accounting, and when a new project scope was sold, the finance team manually created the corresponding SO in MYOB and set up AR tracking. Now every MYOB client appears in Dynamics 365 Sales with their invoice history and outstanding balance, so the sales team sees immediately whether a client is in good standing before quoting a new engagement. When an opportunity closes, the sales order and AR tracking appear in MYOB automatically, and the accounting team starts with the revenue already recorded in the right GL account.

What you can do

  • Sync MYOB customer and supplier contacts to Dynamics 365 Sales accounts, with invoice history and payment status visible on every account record.
  • Create Dynamics 365 Sales opportunities from MYOB sales invoices, tagged with GL account and MYOB job codes for downstream traceability.
  • Receive Dynamics 365 Sales order updates via webhook and create matching sales orders in MYOB without manual re-entry.
  • Manage MYOB OAuth2 20-minute token refresh and company file credentials, refreshing both proactively and on 401 response.
  • Poll MYOB on a schedule you control using OData LastModified filters, with audit tracking and error replay on every record.

Questions

How does ml-connector handle MYOB's requirement for both OAuth2 and company file credentials?
ml-connector stores the OAuth2 client credentials and the company file username and password encrypted. On every MYOB call, it constructs the x-myobapi-cftoken header by Base64-encoding the company file credentials, and it adds the Authorization Bearer header with the current OAuth2 token. When the token expires after 20 minutes, ml-connector refreshes it using the stored client credentials before the next request.
What happens when ml-connector receives a sales order change from Dynamics 365 Sales?
Dynamics 365 Sales pushes the order update to ml-connector's webhook endpoint. ml-connector extracts the order details, maps the Dynamics account to the MYOB customer using a stored cross-reference, and creates a sales order in MYOB with the correct GL account and job code. If MYOB rejects the order due to an invalid account or contact, ml-connector logs the error and retries within 24 hours.
Can ml-connector sync MYOB invoices back to Dynamics 365 Sales if a sale is invoiced?
Yes. ml-connector polls MYOB on a schedule for new and modified sales invoices. When a new invoice is found, ml-connector creates an opportunity record in Dynamics 365 Sales linked to the same account, with the invoice amount, due date, and MYOB GL account recorded as custom fields so your sales team can see if a customer is carrying open AR.

Related integrations

Connect MYOB and Microsoft Dynamics 365 Sales

Free to use. Add your credentials, ping your real systems, and see if we fit.

Get started