ml-connector
Sage X3Twilio

Sage X3 and Twilio integration

Sage X3 tracks purchase orders, invoices, and payments across your supply chain. Twilio reaches customers and teams via SMS and voice. Connecting them lets you notify suppliers when purchase orders are ready, alert finance when invoices are due, and send payment confirmations without leaving Sage X3. Incoming SMS from suppliers or customers can be logged as notes in Sage X3 and attached to the transaction they reference. ml-connector handles the different authentication schemes and audit trails on both sides.

How Sage X3 works

Sage X3 is an on-premise and cloud ERP that covers finance, procurement, inventory, manufacturing, and project management. It exposes suppliers, customers, purchase orders, sales invoices, supplier invoices, products, GL accounts, and GL entries through REST (the legacy api1 endpoint authenticated with HTTP Basic Auth) or GraphQL (the Xtrem endpoint requiring OAuth2 client credentials and recommended for V12 and later). Sage X3 has no native webhook or event push system; all data changes must be detected by polling using the updatedDate or modifiedDateTime fields on records. Customer deployments are typically on-premise with server URL and port, though Sage-hosted cloud is available.

How Twilio works

Twilio is a cloud communications platform exposing SMS, MMS, voice calls, video, email, and identity verification through REST APIs served from multiple base URLs (core API, messaging services, verify, phone lookups, conversations, video, studio, taskrouter). Authentication uses HTTP Basic Auth with an Account SID and Auth Token, or with an API Key SID and API Secret (with scoped access options available). Twilio supports real-time webhooks for incoming messages, message status callbacks (queued, sending, sent, delivered, failed), incoming calls, call status callbacks, and other events. Request bodies use application/x-www-form-urlencoded format. Twilio is not an ERP system and contains no invoices, purchase orders, GL accounts, or financial records.

What moves between them

Data flows primarily from Sage X3 to Twilio. Purchase orders, payment records, and invoice events detected by polling Sage X3 are used to trigger outgoing SMS or email notifications sent through Twilio to suppliers, finance teams, or customers. The reverse flow is lighter: incoming SMS or voice messages received via Twilio webhooks can be logged back into Sage X3 as notes attached to customer or supplier records. There is no sync of customer or supplier master data; Twilio has no customer or vendor records to sync with Sage X3.

How ml-connector handles it

ml-connector accepts OAuth2 or HTTP Basic Auth credentials for Sage X3 depending on the endpoint chosen (GraphQL requires OAuth2; the legacy REST api1 uses Basic Auth). On the Twilio side it stores the Account SID and Auth Token or API Key credentials and presents them as HTTP Basic Auth on every request. Because Sage X3 is poll-only, ml-connector polls purchase orders, invoices, and payment GL entries on a fixed schedule (not tied to webhooks) and uses updatedDate and modifiedDateTime to detect changes since the last run. When a qualifying record is detected, a rule determines which Twilio message to send and to which phone number or email address. On the Twilio side, ml-connector can register a webhook URL to receive incoming messages and call status callbacks; those events are parsed, validated using Twilio's HMAC-SHA1 signature scheme, and logged as notes or custom fields in the Sage X3 customer or supplier record. Twilio requests use form-encoded bodies, not JSON. Because Twilio has no ERP concepts, the integration is notification- and logging-focused, not a full financial data sync.

A real-world example

A mid-market distribution company runs Sage X3 to manage purchase orders, supplier invoices, and payables. When a PO is approved, they want their supplier contacts to get a text notification with the order number and expected delivery date. When an invoice is due soon, the finance team gets an SMS reminder. When a supplier responds via SMS to confirm receipt, that message is automatically logged in Sage X3 under the supplier record as a note, timestamped and audited. Before the integration, purchase order notifications were sent by email in batches; some suppliers missed them, and SMS confirmations from the field were written down manually. With Sage X3 and Twilio connected, notifications go out immediately and consistently, and supplier responses are captured in the system without manual entry.

What you can do

  • Trigger Twilio SMS and email notifications when Sage X3 purchase orders are created, approved, or reach delivery dates.
  • Send payment due alerts via SMS to finance team members when Sage X3 invoices near their due dates.
  • Log incoming Twilio SMS and voice messages as timestamped notes in Sage X3 customer and supplier records for audit and reference.
  • Authenticate Sage X3 with OAuth2 (GraphQL) or HTTP Basic Auth (REST api1) and Twilio with API Key, polling Sage X3 on a schedule to detect changes.
  • Track every notification sent and every message received with full audit trails and error replay capability.

Questions

Does the integration sync Sage X3 customers and suppliers to Twilio?
No. Twilio has no customer or vendor master records. The integration is notification-focused: it detects changes to purchase orders, invoices, and payments in Sage X3 and uses Twilio to send SMS or email alerts to phone numbers and email addresses you configure. Incoming messages from Twilio are logged back into Sage X3 as notes on customer or supplier records.
How does ml-connector handle Sage X3 polling if X3 has no webhooks?
ml-connector polls Sage X3 on a fixed schedule (e.g., every 5 minutes or hourly, depending on your needs) and uses the updatedDate and modifiedDateTime fields on records to detect what has changed since the last poll. This means notifications are not instantaneous but are reliable and deterministic. You choose the polling cadence based on your tolerance for delay.
What happens if a Twilio message send fails or a Sage X3 poll times out?
ml-connector retries failed sends with exponential backoff and tracks the state of every attempt in its audit log. If a Twilio API call returns an error (e.g., invalid phone number, rate limit), the error is logged and can be reviewed. Polls of Sage X3 that time out are retried on the next scheduled run; no messages are lost.

Related integrations

Connect Sage X3 and Twilio

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

Get started