ml-connector
Sage X3Mailchimp

Sage X3 and Mailchimp integration

Sage X3 runs your operations. Mailchimp runs your customer communications. Connecting the two keeps your marketing audience aligned with your active customer and supplier base. Customer records from Sage X3 sync into Mailchimp lists and e-commerce customer records, so new customer creation in X3 immediately populates marketing segments without manual list entry. Supplier records can also sync to separate tracking lists if your operations team needs to stay in contact with vendors. ml-connector handles the different authentication schemes on each side and keeps both systems synchronized on a schedule that matches your business pace.

How Sage X3 works

Sage X3 exposes customers, suppliers, sales invoices, purchase orders, products, and GL accounts through REST api1 (HTTP Basic Auth, legacy) or GraphQL Xtrem (OAuth2 with JWT bearer token, recommended for V12+). The cloud product runs on a customer-specific server URL and port, with GraphQL supporting delta queries on updatedDate fields. Older on-premise deployments dominate, with Basic Auth requiring explicit activation by the customer admin. X3 has no native webhook or push notification system, so customer and supplier records are read by polling with delta detection on modifiedDateTime to capture only changed records since the last sync.

How Mailchimp works

Mailchimp exposes contact lists and audiences, list members, e-commerce customers, and orders through REST API v3.0 with HTTP Basic Auth (API key) or OAuth2 Authorization Code flow. The account data center prefix must be extracted from the API key or resolved via OAuth metadata. Marketing API webhooks push subscribe, unsubscribe, profile update, and campaign events to a registered endpoint using secret URLs rather than cryptographic signatures. Transactional API webhooks use HMAC-SHA1 signature verification. E-commerce orders are the closest financial analog, supporting transaction status and totals. OAuth tokens do not expire and have no refresh mechanism.

What moves between them

Customer records flow from Sage X3 into Mailchimp. On a schedule you define (daily, weekly, or after each transaction batch), ml-connector polls Sage X3 for customer and supplier records modified since the last run, then creates or updates matching Mailchimp list members and e-commerce customer records. New customers in X3 appear in Mailchimp within the polling interval. Supplier records follow the same pattern if mapped to a separate tracking list. E-commerce orders can optionally sync from Sage X3 sales invoices to Mailchimp e-commerce orders to track revenue per customer and drive segmentation campaigns. Mailchimp webhook events (subscribe, unsubscribe, email bounces, campaign engagement) are logged in the audit trail but do not drive changes back into Sage X3.

How ml-connector handles it

ml-connector stores Sage X3 credentials encrypted, resolving the customer-specific X3 server URL and choosing between REST api1 (Basic Auth) and GraphQL Xtrem (OAuth2) based on your X3 version and configuration. Mailchimp credentials are similarly encrypted, with the API key data center prefix extracted or resolved at first connection. On each polling cycle, ml-connector queries X3 for customers and suppliers with modifiedDateTime greater than the last successful poll timestamp, mapping X3 customer name and address fields to Mailchimp list member email and profile attributes. Sage X3 access tokens expire after 5 minutes under OAuth2, requiring refresh from a 30-day refresh token; ml-connector handles this automatically. Mailchimp's OAuth tokens do not expire, simplifying token refresh logic. Mailchimp list membership is idempotent--if a customer record already exists, the email is matched and the record updated rather than duplicated. The data center prefix {dc} in the Mailchimp endpoint URL is extracted once at connection and cached. Supplier records use the same polling and mapping logic, optionally mapped to a separate list for vendor communications. All records carry a full audit trail, and failed syncs include retry logic with exponential backoff.

A real-world example

A mid-sized promotional products distributor runs Sage X3 for procurement, manufacturing, and finance, and uses Mailchimp for customer email marketing. Before the integration, the marketing team manually exported customer lists from X3 every month, imported them into Mailchimp, and then manually cleaned up duplicates and removed inactive accounts. With X3 and Mailchimp connected, each new customer created in X3 automatically appears in the Mailchimp marketing audience within 24 hours. When a customer is marked inactive in X3, the integration flags them in Mailchimp's list, allowing the marketing team to pause campaigns without manual intervention. The manual data entry step is gone, and the audience is always fresh.

What you can do

  • Sync Sage X3 customer records into Mailchimp lists and e-commerce customer records on a regular schedule.
  • Detect and sync only changed customer and supplier records since the last poll, reducing API load and sync time.
  • Map Sage X3 customer names, addresses, and contact details to Mailchimp list member profile fields without re-keying.
  • Handle Sage X3 OAuth2 bearer token expiry and refresh automatically, and manage Mailchimp API key data center resolution.
  • Capture and audit all record changes, with retry and replay capability if a downstream update fails.

Questions

How does ml-connector handle Sage X3's different auth methods (REST api1 vs GraphQL Xtrem)?
ml-connector stores both credential types encrypted and lets you choose based on your X3 version and configuration. REST api1 uses HTTP Basic Auth (requiring customer admin enablement in nodelocal.js), while GraphQL Xtrem uses OAuth2 with JWT bearer tokens on X3 V12 and later. ml-connector manages token refresh automatically; X3 OAuth tokens expire in 5 minutes and are refreshed from a 30-day refresh token.
What happens if a customer is created in Mailchimp directly, not from Sage X3?
ml-connector is pull-based from Sage X3 into Mailchimp and does not write customer records back to X3. Customers created directly in Mailchimp stay in Mailchimp. The integration creates and updates Mailchimp records from X3 only; Mailchimp changes (unsubscribe, profile updates, bounce events) are logged in the audit trail but do not alter Sage X3.
Can supplier records sync the same way as customers?
Yes. Suppliers can be mapped to a separate Mailchimp list or the same customer list with a profile attribute flag. ml-connector polls Sage X3 supplier records with the same delta detection logic (modifiedDateTime since last sync), maps the name and address, and creates or updates Mailchimp list members. This is useful for vendor communications or supplier relationship management campaigns.

Related integrations

Connect Sage X3 and Mailchimp

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

Get started