ml-connector
Sage X3ServiceNow

Sage X3 and ServiceNow integration

Sage X3 runs procurement, inventory, and finance across manufacturing and distribution operations. ServiceNow's Source-to-Pay suite manages accounts payable, procurement approvals, and supplier lifecycle in the cloud. Connecting the two keeps your purchase data aligned, eliminates manual re-keying between systems, and gives your procurement and AP teams a single source of truth. Supplier invoices from Sage X3 flow into ServiceNow's AP staging for approval and posting, while purchase orders stay synchronized to avoid duplicate processing. Cost allocation rules are enforced so every invoice line references a valid cost center.

How Sage X3 works

Sage X3 is an on-premise and cloud ERP that serves mid-market manufacturers, distributors, and services companies, covering finance, procurement, inventory, manufacturing, and project management. It exposes data through three transport options: REST (api1) with HTTP Basic Auth, GraphQL (Xtrem) with OAuth2 client credentials, or SOAP. Access tokens expire in 5 minutes and must be refreshed from a 30-day refresh token. Data changes are detected by polling the updatedDate or modifiedDateTime fields on entities; Sage X3 does not support native webhooks or event push notifications. Key entities include suppliers, purchase orders, supplier invoices, sales invoices, GL accounts, and GL entries, though the server URL, port, and X3 folder name are all customer-specific with no central registry.

How ServiceNow works

ServiceNow is a cloud enterprise platform extended through its Source-to-Pay Operations suite to cover accounts payable, procurement, sourcing, and supplier lifecycle management. It exposes records via REST API on a customer-specific instance subdomain (https://{instance}.service-now.com) and authenticates with OAuth2 Client Credentials (recommended for integrations), OAuth2 Authorization Code (user-delegated), or Basic Auth. The default OAuth2 token lifespan is 30 minutes. ServiceNow provides polling-only integration; there is no native outbound webhook system, though Business Rules and Outbound REST Messages can be manually configured for push scenarios. Source-to-Pay modules including AP and procurement tables are licensed add-ons and must be verified on the customer instance. Every customer runs an isolated instance with no shared multi-tenant endpoint.

What moves between them

The main flow is from Sage X3 into ServiceNow. Purchase orders and supplier invoices are polled from Sage X3 on a daily or weekly schedule (configurable per your procurement cycle) and staged into ServiceNow's procurement and accounts payable tables. Supplier master data (name, address, contact, payment terms) is synchronized bidirectionally so that new suppliers registered in Sage X3 are available for procurement in ServiceNow, and supplier updates in ServiceNow can flow back to Sage X3 if needed. GL account and cost center data is pulled from both systems and mapped so that every invoice line references a valid Sage X3 GL account and ServiceNow cost center. Supplier invoices are never written back to Sage X3; they are read-only on the Sage X3 side and staged in ServiceNow for the AP team to approve and post.

How ml-connector handles it

ml-connector stores the Sage X3 server URL, port, and folder name for each customer, along with OAuth2 client credentials or Basic Auth username and password. On the ServiceNow side it stores the instance subdomain and OAuth2 client credentials. At each poll cycle, it refreshes both Sage X3 (5-minute token expiry, holding the refresh token valid for 30 days) and ServiceNow OAuth2 tokens (30-minute lifespan), and queries Sage X3 via REST api1 or GraphQL for purchase orders and invoices updated since the last run using the updatedDate field. Page size defaults to 20 records in api1; ml-connector requests larger batches to reduce API calls. Supplier and GL account data is mapped first, establishing the valid cost centers and GL accounts that procurement lines can reference. Invoices are then staged into ServiceNow's sn_apo_invoice and related tables, with each line assigned the matching GL account and cost center from the mapping. If a poll encounters an HTTP 429 or temporary failure, ml-connector backs off and retries on the next scheduled run. Every record carries a full audit trail, and failed records can be reviewed and replayed without loss of data.

A real-world example

A mid-sized manufacturing distributor runs Sage X3 on-premise for ERP and uses ServiceNow for IT Service Management and procurement. Accounts payable staff receive invoices from suppliers, check them against Sage X3 purchase orders and contracts in Excel or email, and manually post them into ServiceNow for approval. The process is error-prone: invoices are sometimes posted against the wrong PO, cost allocations are inconsistent, and reconciliation at month-end takes days. After connecting Sage X3 and ServiceNow, every supplier invoice is automatically staged into ServiceNow with the correct PO reference and cost center already attached. Accounts payable staff now approve from the staging table instead of re-keying, and month-end reconciliation is nearly automatic because GL posting is driven by the same invoice data that triggered the procurement transaction.

What you can do

  • Poll purchase orders and supplier invoices from Sage X3 and stage them into ServiceNow's procurement and accounts payable tables on your schedule.
  • Keep supplier master records synchronized in both directions, so new suppliers in Sage X3 are available immediately in ServiceNow procurement.
  • Map Sage X3 GL accounts and cost centers to ServiceNow cost centers, ensuring every invoice line allocates to a valid account.
  • Handle Sage X3's 5-minute token expiry and refresh-token lifecycle, and ServiceNow's 30-minute OAuth2 tokens, automatically.
  • Run daily or weekly polls with full audit trail, retry logic for transient failures, and error replay capability.

Questions

What records move from Sage X3 to ServiceNow?
Purchase orders, supplier invoices, and supplier master data move from Sage X3 into ServiceNow's procurement and accounts payable staging tables. GL accounts and cost centers are synchronized from both systems so that invoice lines allocate to valid accounts. Supplier invoices are read-only on the Sage X3 side; ml-connector does not write invoice updates back to Sage X3.
How does ml-connector handle Sage X3's short token expiry and customer-specific server URLs?
ml-connector stores the Sage X3 server URL, port, and folder name per customer and uses OAuth2 refresh tokens (valid 30 days) or HTTP Basic Auth to manage the 5-minute access token expiry transparently. Every poll cycle refreshes both tokens before querying, so token expiry does not interrupt data flow. The customer-specific server URL is treated as a required configuration variable, not assumed from a shared registry.
Does ServiceNow's Source-to-Pay suite need to be licensed separately?
Yes. ServiceNow's accounts payable and procurement tables are part of the Source-to-Pay Operations suite, which is a licensed add-on to the base ITSM instance. Before deploying the integration, verify that your ServiceNow instance has the sn_apo_invoice, proc_po, and proc_po_item tables enabled and that your service account has the appropriate module roles (sn_apay.apo_user for AP, procurement_user for procurement).

Related integrations

Connect Sage X3 and ServiceNow

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

Get started