ml-connector
MYOBTwilio

MYOB and Twilio integration

MYOB holds your invoices, customer records, and payment schedules. Twilio sends SMS and email notifications at scale. Connecting the two lets you notify customers of invoices as they are created, remind them when payments are due, confirm receipts, and send shipping updates without leaving MYOB. ml-connector handles the different authentication models on each side and maps MYOB customers to Twilio phone numbers and email addresses so messages reach the right people on the right channel.

How MYOB works

MYOB AccountRight exposes contacts (suppliers, customers, employees), invoices, purchase orders, payments, general ledger accounts, and journal entries through the MYOB Business API, a REST interface with OAuth2 Authorization Code flow and required company file credentials (username and password passed in headers). Access tokens expire in 20 minutes and refresh tokens last one week. MYOB has no webhooks, so new invoices, payments, and contact changes are detected by polling with OData v3 $filter on LastModified timestamps. The API rate limit is 8 requests per second and 1,000,000 requests per day per API key.

How Twilio works

Twilio exposes SMS, voice, email, and identity verification through REST APIs across multiple endpoints. Authentication uses HTTP Basic Auth with Account SID and Auth Token, or API Key SID and API Secret; API keys can be scoped to Standard (most resources) or Restricted (fine-grained access). Twilio delivers real-time status callbacks via webhooks for message events (sent, delivered, failed, read), call events, and verification changes. The platform does not include invoicing, purchase orders, or general ledger objects; it is a messaging and communications platform.

What moves between them

Invoices, payment reminders, and customer contact details flow from MYOB into Twilio. When a sale invoice is created or changes status in MYOB, ml-connector polls the MYOB API and reads the invoice and customer contact details. It maps the MYOB customer contact to a phone number and email address stored in MYOB or a supplementary mapping table. ml-connector then sends an SMS or email via Twilio with the invoice number, amount due, and due date. Twilio returns status callbacks as messages are sent, delivered, or fail, and ml-connector stores those status updates in an audit log. The flow is one-way from MYOB to Twilio; payments are not written back to Twilio.

How ml-connector handles it

ml-connector stores MYOB OAuth credentials and company file username/password encrypted, along with Twilio Account SID and Auth Token. On each poll of MYOB, it refreshes the OAuth token when it expires (every 20 minutes) and includes the company file credentials in the x-myobapi-cftoken header to authenticate both the API call and the company file. It polls MYOB's Sale/Invoice endpoint with OData $filter on LastModified to detect new and changed invoices since the last run. For each invoice, ml-connector looks up the customer contact in MYOB and maps the IsIndividual flag and phone/email fields to Twilio phone numbers and email addresses. It then calls Twilio's Messages endpoint with the customer phone or email and a templated message body containing the invoice number and due date. Twilio returns a webhook callback when the SMS is sent, delivered, or fails, and ml-connector stores the callback payload in the audit log to track which invoices were notified. Because MYOB does not support webhooks and Twilio delivers status callbacks that may arrive out of order, ml-connector runs on a schedule (typically daily or after each invoice creation in MYOB) and tracks Twilio message SIDs to handle duplicate status callbacks without re-sending.

A real-world example

A mid-sized Australian accounting firm runs MYOB AccountRight for client bookkeeping and invoicing. The firm sends hundreds of invoices per month and spends time manually sending payment reminder emails and SMS to clients who are late. Before the integration, invoice reminders were a manual process: accountants exported overdue invoices from MYOB and pasted them into Twilio or a separate email tool, then tracked replies and confirmations in a spreadsheet. With MYOB and Twilio connected, each new invoice is automatically sent to the customer's phone or email address as an SMS or email notification within minutes of invoice creation. Overdue reminders run on a nightly schedule, alerting customers before the firm sends a formal dunning notice. The accountants are freed from routine notification work and can focus on reconciliation and tax compliance.

What you can do

  • Send MYOB invoices to customers as SMS or email via Twilio immediately upon invoice creation.
  • Map MYOB customer contacts to Twilio phone numbers and email addresses to ensure notifications reach the correct recipient.
  • Track SMS and email delivery status through Twilio webhooks and store confirmation in an audit log.
  • Poll MYOB for new and changed invoices on a configurable schedule using OAuth2 and company file authentication.
  • Send payment reminders and dunning notices when invoices in MYOB become overdue or near their due date.

Questions

Does ml-connector sync customer payment data back to MYOB from Twilio?
No, the data flow is one-way from MYOB to Twilio. ml-connector reads invoices and customer details from MYOB and sends notifications via Twilio, but does not write payments or customer data back to MYOB. Payments must be entered in MYOB manually or through a separate MYOB integration with your payment processor.
How does ml-connector handle MYOB's two-factor authentication requirement (OAuth2 plus company file credentials)?
ml-connector stores both credential sets encrypted: the OAuth2 access token and refresh token (which ml-connector refreshes automatically when they expire), and the company file username and password, which are included in the x-myobapi-cftoken header on every MYOB API call. The company file token is Base64-encoded and required; without it, MYOB returns 401.
How often does ml-connector check MYOB for new invoices and send notifications?
ml-connector polls MYOB on a schedule you configure, typically once per day or in real-time after each invoice is created in MYOB (if your accounting workflow allows a webhook into ml-connector from MYOB's desktop or web client). Each poll reads invoices with LastModified dates since the last run, so only changed records are fetched. Twilio webhooks deliver status callbacks in real-time as messages are sent and delivered.

Related integrations

Connect MYOB and Twilio

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

Get started