ml-connector
Sage 300SPS Commerce

Sage 300 and SPS Commerce integration

Sage 300 runs procurement, inventory, and order entry for mid-market businesses. SPS Commerce connects your supplier operations to retail trading partners like Walmart, Target, and Amazon through an EDI network. Linking the two keeps your purchase orders and receipts aligned with what your retail partners are asking for, eliminating manual file handling and reducing order fulfillment errors. ml-connector bridges the two different authentication schemes and moves purchase order data on a schedule you control.

How Sage 300 works

Sage 300 is an on-premise Windows IIS-hosted ERP exposing purchase orders, purchase order receipts, inventory items, vendors, and general ledger accounts through REST and OData endpoints. Every request requires HTTP Basic Authentication with base64-encoded uppercase username and password sent in the Authorization header. There are no webhooks or change-data-capture; all reads are pull-based, filtered by date ranges using OData query parameters like $filter and $skip. The API user must be created in Administrative Services with Web API security group assigned. Large polling volumes can trigger IIS AppPool timeouts depending on server configuration, so polling schedules should account for the number of documents being read.

How SPS Commerce works

SPS Commerce is a cloud EDI network that intermediates between supplier systems and retail trading partners. It exposes purchase orders, acknowledgments, invoices, and shipment notices through a REST API that wraps all documents in RSX 7.7.7 JSON envelope format. Authentication uses OAuth 2.0 client credentials flow against a separate token endpoint, returning a JWT bearer token. SPS defines a webhook framework but recommends scheduled polling as the primary pattern, with cursor-based pagination on list endpoints. Trading partner IDs must be provisioned during onboarding and are not discoverable via API. Rate limits are not publicly documented, so exponential backoff and jitter on HTTP 429 responses is required.

What moves between them

Purchase orders, purchase order acknowledgments, and invoices flow from SPS Commerce into Sage 300. ml-connector polls SPS Commerce on a configurable schedule (typically every 5 to 15 minutes), extracts purchase order and invoice documents, unwraps them from the RSX envelope, and posts them into Sage 300 as purchase order and invoice batches using Sage 300's batch endpoints. Receipt confirmations can also flow back from Sage 300 into SPS Commerce to acknowledge fulfillment to retail partners. Reference data such as vendor and item master records can be synchronized in both directions to keep Sage 300 aware of the trading partners connected through SPS.

How ml-connector handles it

ml-connector stores Sage 300 HTTP Basic Auth credentials (uppercase username and password) and SPS Commerce OAuth client credentials encrypted and issues them on each request. For Sage 300, it accepts the customer's full IIS server hostname and base path, validates the API user exists and has Web API security group assigned, and adjusts polling frequency based on IIS timeout constraints. For SPS Commerce, it obtains a bearer token from the separate token endpoint, includes it on all downstream API calls, and implements cursor-based pagination to walk through EDI documents. ml-connector unwraps RSX 7.7.7 envelopes to extract the underlying purchase order and invoice data, maps trading partner IDs from SPS to Sage 300 vendor records, transforms line items to match Sage 300 inventory item and GL account structures, and posts completed batches. Since there is no vendor-defined idempotency key, ml-connector tracks document identifiers (purchaseOrderNumber, invoiceNumber) per batch to deduplicate on retry. Every record carries a full audit trail and can be replayed if a downstream Sage 300 post fails.

A real-world example

A mid-sized apparel supplier runs Sage 300 for procurement and inventory control. Orders arrive constantly from Walmart, Target, Amazon, and other retail partners through SPS Commerce as EDI files wrapped in RSX format. Before integration, the procurement team logged into the SPS portal daily, downloaded purchase orders, imported them into Sage 300 manually, and then had to cross-check quantities and delivery dates with what retail partners were actually requesting. With Sage 300 and SPS Commerce connected, purchase orders flow automatically into Sage 300 every 15 minutes, mapped to the correct vendors and items. When orders are fulfilled, Sage 300 can push back acknowledgments and shipment notices through SPS to the retail partners. The procurement team spends less time on order entry and can focus on sourcing and logistics.

What you can do

  • Sync purchase orders from SPS Commerce into Sage 300 purchase order batches on a scheduled polling cadence.
  • Map SPS trading partner IDs to Sage 300 vendors and unwrap RSX-wrapped EDI documents into native Sage 300 line items.
  • Authenticate Sage 300 with HTTP Basic Auth against a customer-hosted IIS server and SPS Commerce with OAuth 2.0 bearer tokens.
  • Handle deduplication and retries with a full audit trail on every document, replaying failed posts without duplicating orders.
  • Push purchase order acknowledgments and receipts from Sage 300 back into SPS Commerce to notify retail partners of fulfillment status.

Questions

How does ml-connector handle the different auth schemes between Sage 300 and SPS Commerce?
Sage 300 uses HTTP Basic Authentication with uppercase username and password sent on every request, while SPS Commerce uses OAuth 2.0 bearer tokens obtained from a separate token endpoint. ml-connector stores both credential sets encrypted, issues them appropriately to each system, and obtains fresh bearer tokens before they expire.
What happens if polling encounters a large volume of purchase orders or an IIS AppPool timeout?
ml-connector monitors IIS response times and adjusts polling frequency to avoid triggering AppPool timeouts. If a timeout occurs, the batch is rolled back and retried with exponential backoff. The audit trail tracks each attempt, so no documents are lost or duplicated.
Can ml-connector send purchase order acknowledgments and shipment data back to SPS Commerce?
Yes. After purchase orders are posted into Sage 300 and processed, ml-connector can read acknowledgments and receipt confirmations from Sage 300 and post them back to SPS Commerce in RSX format so retail partners are notified of fulfillment status and expected delivery dates.

Related integrations

Connect Sage 300 and SPS Commerce

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

Get started