ml-connector
Sage 100SPS Commerce

Sage 100 and SPS Commerce integration

Sage 100 manages your inventory, purchase orders, and invoices on premises. SPS Commerce is your gateway to retail trading partners like Walmart, Target, and Amazon, converting your orders and shipments into the EDI formats those partners require. Connecting the two means every PO you create in Sage 100 reaches your retail partner network in real time, and every inbound order, invoice, or shipment acknowledgment from your partners flows straight back into Sage 100 without manual translation or re-entry.

How Sage 100 works

Sage 100 is an on-premises ERP that covers accounts receivable, accounts payable, general ledger, inventory, and purchasing. It does not expose a native REST API. Instead, access is through either SOAP eBusiness Web Services (which covers Sales Orders and Customers only) or the BOI COM layer wrapped by a local Windows agent running on the customer server. There are no webhooks or event streams; all data is retrieved by polling using DateLastUpdated or DateCreated fields. Authentication uses username and password passed with each call, no tokens. Company code, a three-character identifier, is required for every call. The system requires a local agent to bridge Sage 100 and cloud systems.

How SPS Commerce works

SPS Commerce is a cloud-based EDI network that bridges suppliers and retail trading partners. It receives documents like purchase orders (850), invoices (810), and advance ship notices (856) in legacy EDI formats (X12, EDIFACT) and exposes them via a REST API with JSON request and response bodies. Authentication is OAuth 2.0 client credentials; tokens are JWT and valid for a limited time. All documents are wrapped in the RSX 7.7.7 JSON envelope format. Data is retrieved by polling at configurable intervals; SPS Commerce has a webhook framework under development but polling is the primary and reliable pattern. Cursor-based pagination is mandatory for all list endpoints.

What moves between them

Outbound: Sage 100 purchase orders and invoices are polled every 15 minutes and mapped to the RSX 7.7.7 envelope, then posted to SPS Commerce for distribution to retail trading partners. Inbound: SPS Commerce purchase orders (850) and advance ship notices (856) are polled every 15 minutes, mapped back into Sage 100 purchase order acknowledgments (855) and goods receipt records. All data moves via the local Sage 100 agent, which ml-connector authenticates to with API credentials or mTLS.

How ml-connector handles it

ml-connector runs a scheduled poller that calls the Sage 100 Windows agent with company code and authenticated credentials to pull Purchase Orders and AP Invoices. It maps each record to the RSX 7.7.7 JSON envelope required by SPS Commerce, translating Sage 100 GL account multi-segment format (e.g. 4000-01-00) into retail partner line numbers. It then posts to SPS Commerce using OAuth 2.0 client credentials, obtaining and caching the JWT bearer token until near expiry. On the inbound side, ml-connector polls SPS Commerce purchase orders at the same cadence, extracts the trading partner and line item data, and pushes acknowledgments and receipt records back into Sage 100 through the agent. Because Sage 100 has no idempotency keys and the COM layer uses record-locking, ml-connector checks for duplicate records by number before creating, and implements exponential backoff with jitter when COM operations are locked. SPS Commerce rate limits are not public, so ml-connector backs off on 429 responses and tracks token expiry to prevent mid-cycle refreshes from failing.

A real-world example

A mid-sized apparel supplier manufactures and distributes products to Walmart, Target, and Amazon. Purchase orders arrive daily through the SPS Commerce network in X12 850 format. Before integration, the supply chain team received emailed EDI files from SPS, manually decoded the orders into text files, and re-entered them into Sage 100 by hand, creating a two-day processing lag and frequent transcription errors. With Sage 100 and SPS Commerce connected, each inbound order appears in Sage 100 within minutes as a validated PO acknowledgment. When the supplier creates a shipment in Sage 100, ml-connector publishes the advance ship notice (856) back through SPS Commerce, and each retailer receives the notification in their preferred format automatically. Month-end invoice batches post to Sage 100, sync to SPS, and reach the retailers' accounts payable systems without re-keying.

What you can do

  • Poll Sage 100 for purchase orders and invoices every 15 minutes and push them to SPS Commerce in RSX 7.7.7 format for retail partner distribution.
  • Receive inbound purchase orders (850) and advance ship notices (856) from SPS Commerce and map them back into Sage 100 PO acknowledgments and goods receipts.
  • Authenticate to the local Sage 100 agent with API credentials or mutual TLS, and handle concurrent COM record-locking with exponential backoff and retry.
  • Obtain and cache SPS Commerce OAuth 2.0 JWT tokens, refresh before expiry, and back off on rate-limit (429) responses.
  • Maintain a complete audit trail of every order, invoice, and shipment crossing the bridge, with replay capability for failed downstream operations.

Questions

Why does Sage 100 require a local Windows agent instead of connecting directly to the cloud?
Sage 100 is an on-premises system with no native cloud API. Access to AP invoices, purchase orders, GL accounts, and inventory data is only available through the BOI COM layer, which runs on the Windows server hosting Sage 100. ml-connector authenticates to that local agent over mTLS or API key, and the agent fetches records on your behalf.
How does ml-connector handle the RSX 7.7.7 JSON envelope that SPS Commerce requires?
SPS Commerce wraps all trading partner documents (orders, invoices, ASNs) in the RSX envelope format, version 7.7.7. ml-connector translates Sage 100 records into that structure, mapping GL account multi-segment codes to line-item designations and appending the trading partner identifier provisioned in SPS during onboarding. Inbound documents are unwrapped the same way.
What happens when the local Sage 100 server is locked or unavailable?
If the Sage 100 agent is unreachable or returns a record-lock error from the COM layer, ml-connector implements exponential backoff with jitter and retries the operation. If the outage persists beyond the retry window, the sync is marked as failed in the audit trail and an alert is raised so your team can investigate the server.

Related integrations

Connect Sage 100 and SPS Commerce

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

Get started