ml-connector
Sage 50TrueCommerce

Sage 50 and TrueCommerce integration

Sage 50 holds your vendors, purchase orders, and invoices on premise. TrueCommerce is your gateway to trading partners via EDI and SFTP file exchange. Connecting the two lets you send purchase orders directly to suppliers through TrueCommerce without leaving Sage 50, and receive supplier invoices and order confirmations back into Sage 50 without manual re-entry. ml-connector runs a Windows service that speaks both the Sage 50 local SDK and the TrueCommerce SFTP interface, moving structured procurement data on a schedule you control.

How Sage 50 works

Sage 50 is an on-premise accounting application available in US and UK editions. The US edition exposes purchase orders, vendor invoices, customers, vendors, accounts, and general journal entries through the Sage 50 .NET SDK or legacy COM/ODBC layer. The UK edition uses Sage Data Objects (SDO) COM/ActiveX DLLs. Both editions require Windows-local authentication (username and password against the Sage 50 user database) and direct file-system access to company data; there is no cloud REST API, no webhooks, and no event stream. Integration requires a Windows machine with Sage 50 installed and a dedicated integration user who does not log in interactively while the SDK session is open. Data is read by polling modified records using LastModifiedDate or TransactionDate, with a typical polling interval of 5 to 15 minutes for near-real-time sync or hourly for most ERP use cases.

How TrueCommerce works

TrueCommerce is a cloud-based EDI and supply chain integration platform that acts as a managed Value-Added Network connecting ERPs to trading partners via X12 and EDIFACT EDI, SFTP/FTP file exchange, and managed APIs. Credentials are provisioned by TrueCommerce during setup and vary by integration path: SFTP uses username and password against integrationftp.truecommerce.com port 22; the managed Exchange API uses an API key or bearer token; a local Windows Integration Service authenticates via TrueCommerce portal credentials. EDI documents (Purchase Orders in X12 850 format, invoices in 810, purchase order acknowledgments in 855, advance ship notices in 856, and others) are exchanged as flat files via SFTP or through the managed API. Data is typically pulled on a schedule (hourly to daily) with no published rate limits or public webhook registration API. File naming conventions and integration paths are customer-specific and confirmed during onboarding.

What moves between them

The main flow runs from Sage 50 outbound to trading partners. When a purchase order is created in Sage 50, ml-connector polls for new or modified POs, transforms them into EDI X12 850 format, and uploads them to the TrueCommerce SFTP gateway on a schedule (typically daily). Supplier invoices arrive at TrueCommerce as X12 810 EDI documents and are polled hourly or on demand; ml-connector transforms them back into Sage 50's vendor invoice format and creates or updates vendor invoice records. Purchase order acknowledgments (X12 855) and advance ship notices (X12 856) flow the same direction, enriching the Sage 50 PO record with supplier confirmation and shipment tracking. All records are keyed by the original Sage 50 purchase order number and vendor ID for reliable matching and deduplication.

How ml-connector handles it

ml-connector runs as a Windows service with direct access to Sage 50 company data files via the local SDK. Authentication to Sage 50 uses Windows-local credentials (ApplicationID, CompanyPath, Username, and Password for the US edition, or DataPath and credentials for the UK edition). On each polling cycle, it queries Sage 50 for modified purchase orders and invoices since the last run, using LastModifiedDate or TransactionDate as the cursor. Outbound POs are transformed into standard X12 850 EDI format and uploaded via SFTP to integrationftp.truecommerce.com using TrueCommerce-provisioned credentials. Inbound documents (supplier invoices, acknowledgments, ship notices) are downloaded from the TrueCommerce SFTP folder, validated against the original Sage 50 PO number and vendor, and inserted or updated as vendor invoices or PO records. EDI functional acknowledgments (X12 997) are generated by TrueCommerce and handled via ISA control number deduplication rather than application-level idempotency headers. Polling interval is configurable but typically hourly for inbound and daily for outbound. The service handles exclusive-access constraints (Sage 50's SDK requires no interactive user session while the integration user is active) by running on a dedicated Windows machine or with a dedicated local session. Every document transformation and record insert is logged with the source EDI control number, Sage 50 record ID, and transformation timestamp for full audit trail and replay on failure.

A real-world example

A regional machinery distributor maintains supplier relationships across North America and Europe via TrueCommerce EDI. The company runs Sage 50 on a Windows server for accounting and procurement. Before the integration, the procurement team exported purchase orders from Sage 50, manually formatted them as EDI X12, and uploaded them to TrueCommerce weekly. Supplier invoices arrived at TrueCommerce as EDI 810s and had to be downloaded, parsed, and re-entered into Sage 50 by hand, a task that took several hours each week and introduced typos and duplicate invoice records. With Sage 50 and TrueCommerce connected, each new purchase order is automatically transformed and sent to suppliers within minutes, and inbound invoices and acknowledgments flow directly into Sage 50 with full audit trail. The procurement team now focuses on supplier relationships and exception handling rather than data re-entry.

What you can do

  • Transform purchase orders from Sage 50 into EDI X12 850 format and upload them to TrueCommerce SFTP on a configurable schedule.
  • Receive supplier invoices as X12 810 EDI documents from TrueCommerce and create or update vendor invoice records in Sage 50 with full line-item mapping.
  • Match inbound documents to source purchase orders using order number and vendor ID, with deduplication via EDI ISA control number.
  • Bridge Sage 50 local SDK authentication and exclusive-access constraints to TrueCommerce cloud-based SFTP and managed APIs with reliable polling and retry logic.
  • Maintain a complete audit trail of every EDI transformation, SFTP upload and download, and Sage 50 record insert or update for compliance and troubleshooting.

Questions

How does ml-connector handle Sage 50's requirement that the integration user cannot be logged in interactively while the SDK session is active?
ml-connector runs as a Windows service on a dedicated machine or user session where the integration user is not logged in interactively. The Windows service account has direct access to the Sage 50 company data files via file-system path and SDK, and uses application-level credentials (ApplicationID and CompanyPath for US edition, or DataPath for UK edition) to open the company data, avoiding session conflicts. For on-site deployments, a separate integration user account is created with no interactive login rights.
Which direction does EDI data flow between Sage 50 and TrueCommerce, and what document types are supported?
Outbound (Sage 50 to trading partners via TrueCommerce): Purchase orders in X12 850 format are polled from Sage 50 and uploaded to TrueCommerce SFTP on a daily or custom schedule. Inbound (trading partners via TrueCommerce to Sage 50): Supplier invoices (X12 810), purchase order acknowledgments (X12 855), and advance ship notices (X12 856) are polled from TrueCommerce and inserted as vendor invoices or PO enhancements in Sage 50. The flow is one-directional per document type; invoices and acknowledgments do not flow back out to trading partners.
How are TrueCommerce credentials and file paths managed, and are there test or sandbox modes?
All TrueCommerce credentials (SFTP username and password, or API keys for the managed Exchange API) are provisioned by TrueCommerce during account setup and stored encrypted in ml-connector configuration. File naming conventions and integration paths are customer-specific and confirmed during onboarding with TrueCommerce. Test mode is available via the TrueCommerce Transaction Manager UI flag (ISA15 field set to T for test, P for production) rather than a separate sandbox FTP host. ml-connector respects this flag and applies test or production mode on each SFTP cycle.

Related integrations

Connect Sage 50 and TrueCommerce

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

Get started