ml-connector
Sage 50ServiceNow

Sage 50 and ServiceNow integration

Sage 50 runs accounting on-premise, while ServiceNow manages procurement and AP in the cloud. Connecting them keeps your vendor master, purchase orders, and invoices aligned across both systems. New vendors and POs entered in Sage 50 flow to ServiceNow's procurement module, and invoice data lands in the Accounts Payable staging tables for approval and posting. ml-connector handles Sage 50's local Windows SDK, bridges to ServiceNow's cloud REST API, and maintains a full audit trail of every sync.

How Sage 50 works

Sage 50 is a desktop-installed on-premise accounting application sold in two regional editions: US (Sage 50 US, formerly Peachtree Accounting) and UK (Sage 50 Accounts, formerly Sage Line 50). It exposes vendors, customers, purchase invoices, sales invoices, purchase orders, sales orders, payments, GL accounts, employees, and inventory through a local Windows SDK: the US edition uses a .NET SDK or legacy COM/ODBC layer, while the UK edition uses Sage Data Objects (SDO) COM ActiveX DLLs. Integration requires a Windows process with direct access to company data files on the same machine or LAN. Authentication is Windows-local: username and password against the Sage 50 user database, with an ApplicationID and company path on the US side or a data path on the UK side. Sage 50 has no webhooks or event stream, so polling by LastModifiedDate or TransactionDate is the only sync method. The integration user must not be logged into Sage 50 interactively while the SDK session is open, as the SDK requires exclusive access to the company files.

How ServiceNow works

ServiceNow is a cloud-based enterprise platform originally built for IT Service Management but extended to finance and procurement through the Source-to-Pay (S2P) Operations suite, which covers Accounts Payable, Procurement, Sourcing, and Supplier Lifecycle Management. It exposes core company records, purchase orders, invoice staging, GL accounts, cost centers, and users through a REST API at a customer-supplied subdomain (https://{instance}.service-now.com). Authentication uses OAuth 2.0 Client Credentials for machine-to-machine integration, with a token lifespan of 1800 seconds (30 minutes). All API operations require appropriate module roles such as sn_apay.apo_user for Accounts Payable Operations or procurement_user for Procurement. Source-to-Pay staging tables are module-licensed add-ons; the base ITSM instance does not include them. ServiceNow has no outbound webhooks but supports inbound queries with sysparm_query parameters, so polling is the standard pattern.

What moves between them

Vendors, purchase orders, and purchase invoices flow from Sage 50 into ServiceNow on a schedule you define, typically hourly or every four hours. Vendor records are upserted into ServiceNow's core company table, purchase orders into the procurement PO table, and invoices into the Accounts Payable Optimization staging table (sn_apo_invoice). Sage 50's GL accounts and cost codes map to ServiceNow cost centers where available, so AP approvals land on valid dimensions. The sync is one-way from Sage 50 to ServiceNow; ServiceNow does not write back to Sage 50. GL postings in ServiceNow reference the invoice staged from Sage 50, with a full reference trail for reconciliation.

How ml-connector handles it

ml-connector runs a Windows process that holds an exclusive SDK session to Sage 50 using the regional edition's authentication (ApplicationID and company path for US, data path for UK). It polls for modified records by LastModifiedDate or TransactionDate at your chosen interval, extracts the vendor, PO, and invoice data, and stages it in an intermediate format. Before publishing to ServiceNow, ml-connector authenticates using OAuth 2.0 Client Credentials to obtain a 30-minute bearer token, then posts or updates records in the ServiceNow APO and procurement staging tables. Sage 50 invoices often arrive without approved amounts; ml-connector flags those in the staging record so ServiceNow can route them for approval without hard validation failures. If a poll finds records that were already synced, ml-connector checks the staging log to avoid re-posting duplicates. ServiceNow token refresh is automatic when a call returns a 401. Every sync run logs the record counts, any validation mismatches, and the time taken, and can be replayed if a downstream approval fails. The integration user account in Sage 50 must have read access to the modules being polled and must not be logged in interactively while the integration is running.

A real-world example

A mid-sized manufacturing company uses Sage 50 US Edition on-premise for accounting and inventory, and recently migrated AP and procurement to ServiceNow to improve spend visibility and approval workflows. Before the integration, the procurement team manually entered POs and invoices from Sage 50 into ServiceNow each week, creating lag between order placement and AP visibility. Invoice reconciliation required cross-checking Sage 50 amounts against ServiceNow records by hand. With Sage 50 and ServiceNow connected, each PO and vendor master change in Sage 50 flows to ServiceNow within the hour, and invoices are staged for approval as soon as they are recorded in accounting. The procurement team now sees real-time spend across both systems, and month-end close starts with Sage 50 and ServiceNow AP records already aligned.

What you can do

  • Sync vendors, purchase orders, and purchase invoices from Sage 50 to ServiceNow on your defined schedule.
  • Map Sage 50 GL accounts and project codes to ServiceNow cost centers for AP approval routing.
  • Poll Sage 50 using its regional SDK (US .NET or UK Sage Data Objects), with exclusive session management.
  • Authenticate Sage 50 with Windows-local credentials and ServiceNow with OAuth 2.0 Client Credentials.
  • Stage invoices in ServiceNow APO tables with full audit history and replay capability on sync failure.

Questions

Does ml-connector require Sage 50 to be installed on the same machine as the ml-connector polling process?
Yes. ml-connector uses Sage 50's local Windows SDK (either the .NET SDK for US Edition or Sage Data Objects COM DLLs for UK Edition), so it must run on a Windows machine with Sage 50 installed and configured. The integration user account must have read access to the Sage 50 modules being polled and must not be logged into Sage 50 interactively while the integration is running, as the SDK requires exclusive access to the company files.
Which records from Sage 50 flow into ServiceNow and in which direction?
Vendors, purchase orders, and purchase invoices flow one-way from Sage 50 into ServiceNow on a polling schedule you define. Vendor records are upserted to the company table, purchase orders to the procurement module, and invoices to the Accounts Payable Optimization staging tables. GL accounts and project codes from Sage 50 are mapped to ServiceNow cost centers so AP approvals land on valid dimensions. ServiceNow does not write back to Sage 50.
How does ml-connector handle ServiceNow's OAuth token expiry and the Sage 50 SDK's exclusive access requirement?
ml-connector stores both credential sets encrypted and automatically refreshes ServiceNow's OAuth token when an API call returns 401, without interrupting the sync. It manages the Sage 50 SDK session exclusively, ensuring the integration user is not logged in interactively. Token refresh happens transparently, and every sync run logs the records processed and any validation mismatches for audit and replay.

Related integrations

Connect Sage 50 and ServiceNow

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

Get started