ml-connector
Sage X3Walmart Marketplace

Sage X3 and Walmart Marketplace integration

Retailers selling through Walmart Marketplace need their ERP to stay current with order fulfillment and inventory levels. Sage X3 holds the authoritative inventory and customer records, while Walmart Marketplace generates orders, returns, and inventory movements. Connecting them keeps your Sage X3 sales documents aligned with Walmart orders, your stock levels synchronized across both systems, and your returns processed in Sage X3 as they happen on Walmart. ml-connector automates the sync on your chosen cadence.

How Sage X3 works

Sage X3 exposes items, inventory balances, customers, sales invoices, and purchase orders through REST (api1 legacy endpoint at http(s)://<server>:<port>/api1) and GraphQL (Xtrem at http(s)://<server>:<port>/xtrem/api), both requiring OAuth2 client credentials (JWT bearer) or HTTP Basic authentication. Access tokens expire in 5 minutes, with refresh tokens valid 30 days. The server URL, port, and X3 folder are customer-specific; no central tenant registry exists. Sage X3 does not support outbound webhooks, so changes are detected via polling using the updatedDate and modifiedDateTime fields on records. REST api1 pages default to 20 records; GraphQL is recommended for V12 and later.

How Walmart Marketplace works

Walmart Marketplace exposes items, inventory across multiple ship nodes, orders (maximum 10,000 from the last 180 days), returns, pricing, and reconciliation reports through REST APIs at https://marketplace.walmartapis.com (production) with OAuth2 client credentials. Access tokens expire after 15 minutes and must be re-requested frequently. Walmart Marketplace supports both webhooks (with 3 retries at 5, 15, and 45 minute intervals before events are dropped) and polling. All API requests require WM_SVC.NAME set to Walmart Marketplace, WM_QOS.CORRELATION_ID headers, and Accept/Content-Type headers. Single-item price updates are throttled at 100 per hour; bulk feeds are required for larger operations. WFS (Walmart Fulfillment Services) returns are read-only.

What moves between them

Walmart Marketplace orders flow into Sage X3 as sales documents tied to a mapped Walmart customer record, with order lines linked to Sage X3 items by SKU. Inventory movements from Sage X3 are pushed to Walmart Marketplace to keep seller inventory levels current, reflecting shipments, returns, and stock adjustments. Returns initiated on Walmart Marketplace flow back to Sage X3 as return documents linked to the original sales invoice, allowing your credit memo process to proceed. The sync runs on a schedule you define, typically daily after fulfillment operations close out.

How ml-connector handles it

ml-connector stores both credential sets encrypted and refreshes the Walmart OAuth2 bearer token every 15 minutes proactively to avoid expired-token errors mid-request. On the Sage X3 side, it accepts the customer-specific server URL and port, validates items and customers against the X3 metadata, and maps incoming Walmart orders to sales documents using the order shipNode to select the correct Sage X3 warehouse. Walmart order numbers are stored in the Sage X3 sales document reference field to prevent duplicate imports. Because neither system supports real-time webhooks in both directions, ml-connector polls Walmart for new orders and returns on your schedule, and polls Sage X3 for inventory changes to push upward. Walmart's 15-minute token expiry and 100-per-hour single-price-update throttle are handled by refreshing ahead of the window and batching price updates into bulk feeds. Every record carries a full audit trail, including the Walmart order ID, Sage X3 sales document number, and sync timestamp, so a failed downstream posting can be replayed.

A real-world example

A mid-sized retail distributor operates Sage X3 to manage inventory, purchasing, and finance across three warehouses, and sells a portion of their stock directly to consumers through Walmart Marketplace. Before the integration, the operations team exported orders from Walmart twice daily, manually entered each line into Sage X3 as a sales order, and relied on email alerts from warehouse staff to detect returns. Inventory in Sage X3 and Walmart often diverged, leading to oversells on Walmart and customer cancellations. With Sage X3 and Walmart Marketplace connected, each Walmart order flows directly into Sage X3 as a sales document, mapped to the correct warehouse, and inventory reductions post back to Walmart automatically as items ship from Sage X3. Returns process in Sage X3 as credit memos, and the financial reconciliation is clean because every Walmart transaction carries its origin ID.

What you can do

  • Import Walmart Marketplace orders directly into Sage X3 as sales documents, with order lines mapped to the correct warehouse ship nodes and customers.
  • Synchronize inventory levels from Sage X3 to Walmart Marketplace to prevent oversells and keep stock counts consistent across both systems.
  • Process Walmart Marketplace returns as return documents in Sage X3, allowing your credit memo workflow to run automatically.
  • Handle Walmart OAuth2 token refresh (15-minute expiry) and Sage X3 token rotation (5-minute expiry) transparently across all requests.
  • Track every order, inventory movement, and return with a full audit trail including the source ID, timestamp, and sync status for replay and reconciliation.

Questions

How does ml-connector handle the different authentication timelines between Walmart (15 minutes) and Sage X3 (5 minutes)?
ml-connector refreshes Walmart OAuth2 tokens proactively every 15 minutes before expiry and Sage X3 tokens every 5 minutes, well ahead of the actual deadline. Both token refresh cycles run in the background, so API calls always present valid credentials. If a call fails due to token expiry despite proactive refresh, ml-connector retries with a fresh token.
How are Walmart orders mapped to the correct Sage X3 warehouse and customer?
Walmart provides a shipNode field on each order indicating the warehouse location. ml-connector maps shipNodes to the corresponding Sage X3 warehouse or branch code, configured at setup time. Walmart orders reference a customer, which ml-connector maps to a Sage X3 customer record by email or account number, ensuring the sales document lands in the correct branch.
Can ml-connector handle Walmart's order history limit and price update throttle?
Walmart returns a maximum of 10,000 orders from the last 180 days per query, and ml-connector respects that window by polling with a cutoff date tied to your sync schedule. Single-item price updates are throttled at 100 per hour, so ml-connector batches price changes into bulk feed operations instead of individual updates, which have no throttle limit.

Related integrations

Connect Sage X3 and Walmart Marketplace

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

Get started