ml-connector
SAP S/4HANAWalmart Marketplace

SAP S/4HANA and Walmart Marketplace integration

SAP S/4HANA runs procurement and finance for sellers with complex supply chains. Walmart Marketplace reaches millions of shoppers but operates on its own inventory and pricing. Connecting the two lets you list items once in SAP and publish them to Walmart with accurate stock levels, apply Walmart orders back into SAP for fulfillment and revenue recognition, and reconcile payouts and returns against your general ledger.

How SAP S/4HANA works

SAP S/4HANA exposes business partners, suppliers, customers, purchase orders, materials, inventory quantities, general ledger accounts, cost centers, and journal entries through OData V2 and OData V4 REST APIs. Cloud and on-premise deployments authenticate with OAuth 2.0 client credentials against a tenant-specific URL; token endpoints and scopes are defined per Communication Arrangement inside SAP. SAP has no native webhook system, so downstream polling uses LastChangeDateTime filters or delta tokens. GL Accounts and Cost Centers are read-only in the API and maintained in SAP only.

How Walmart Marketplace works

Walmart Marketplace exposes items (SKU, product name, price, images), inventory (quantities per ship node), orders (purchase order ID, order date, line statuses, shipping info), returns, pricing tiers, and settlement reports through REST APIs at https://marketplace.walmartapis.com. It uses OAuth 2.0 client credentials with a 15-minute token expiry and requires the WM_SEC.ACCESS_TOKEN header (not the Authorization header) on every call. It supports both webhooks for real-time order, inventory, and return events and polling for historical queries. Webhooks retry up to three times at five, fifteen, and forty-five-minute intervals before being dropped.

What moves between them

The main flow runs from SAP S/4HANA outbound to Walmart Marketplace. SAP materials and customers map to Walmart items and sellers, and inventory quantities flow from SAP stock levels to Walmart shipment nodes on a daily or weekly cadence. Walmart orders flow back into SAP as purchase orders or sales orders for fulfillment and revenue posting. Returns and refunds are tracked in both directions. Pricing updates flow from SAP general ledger and sales agreements into Walmart marketplace pricing, and settlement reports from Walmart are posted to SAP as journal entries for revenue reconciliation.

How ml-connector handles it

ml-connector stores SAP OAuth credentials and Walmart client ID and secret encrypted, and refreshes OAuth tokens before they expire to avoid outages. On the SAP side it polls the relevant OData services (A_Supplier, A_SupplierCompany, A_PurchaseOrder, A_GLAccountLineItem, A_CostCenter) using LastChangeDateTime filters to find new or modified records, and it maps SAP cost centers and GL accounts to matching Walmart dimensions during posting. On the Walmart side it exchanges client credentials for a bearer token, uses the WM_SEC.ACCESS_TOKEN header format (not Authorization) on every API call, and handles 15-minute token expiry by re-requesting before each batch of calls. It receives Walmart order events via registered webhooks where available, and falls back to polling the Orders endpoint for missed events. Inventory quantities are mapped from SAP storage locations to Walmart ship nodes based on your node-to-warehouse config. Returns from Walmart are read-only if they are Walmart Fulfillment Services managed, so ml-connector accepts Walmart's refund state and posts it back to SAP as a credit memo. Every record carries a job ID for deduplication and a full audit trail so failed orders or inventory adjustments can be replayed.

A real-world example

A mid-sized general merchandise wholesaler operates SAP S/4HANA for procurement, warehousing, and finance across three distribution centers. They sell through Walmart Marketplace to reach new channels but struggle to keep SKU data and inventory in sync across the two systems. Before the integration, inventory staff maintained a spreadsheet of SAP materials and posted quantity changes to Walmart by hand twice a week, leading to oversells, stockouts, and customer complaints when Walmart inventory did not match reality. When a Walmart order arrived, the fulfillment team manually created a SAP sales order and later re-entered invoice data for revenue posting, losing hours to duplicate data entry. With SAP S/4HANA and Walmart Marketplace connected, inventory updates flow from SAP to Walmart nightly, Walmart orders land in SAP automatically, and the finance team closes the month with Walmart settlement reports already imported as journal entries.

What you can do

  • Publish materials and pricing from SAP S/4HANA to Walmart Marketplace items and SKUs, mapped by your product master.
  • Sync inventory quantities from SAP storage locations to Walmart ship nodes on a schedule tied to your stock replenishment cycle.
  • Receive Walmart orders via webhooks or polling, create corresponding SAP purchase or sales orders, and track fulfillment status in both systems.
  • Handle OAuth 2.0 token refresh on both SAP and Walmart sides, including Walmart's 15-minute token expiry and non-standard WM_SEC.ACCESS_TOKEN header.
  • Post Walmart settlement reports, returns, and refunds back into SAP as journal entries and credit memos with full audit trail and replay on failure.

Questions

Which direction does data move between SAP S/4HANA and Walmart Marketplace?
The main flow is SAP outbound to Walmart for catalog and inventory, with Walmart orders and returns flowing back into SAP for fulfillment and financial posting. Pricing updates flow from SAP into Walmart, and settlement reports from Walmart are posted to SAP as journal entries. GL accounts and cost centers are maintained in SAP only and not pushed to Walmart.
How does ml-connector handle SAP's lack of native webhooks and Walmart's short token expiry?
SAP has no webhook system, so ml-connector polls the OData APIs using LastChangeDateTime filters to detect new or changed records on a cadence you define (daily, weekly, after each payroll run). For Walmart, ml-connector caches the OAuth token and refreshes it before the 15-minute expiry, and it prefers registered webhooks for order events but falls back to polling the Orders endpoint if webhooks are not available.
What happens when a Walmart order arrives or inventory needs to update?
Walmart orders arrive via webhook or are polled from the Orders endpoint and mapped to SAP purchase orders or sales orders based on your business process. Inventory updates flow from SAP storage locations to Walmart ship nodes nightly or on demand. Both flows include deduplication by job ID so retries do not create duplicates, and every record is logged in the audit trail for reconciliation.

Related integrations

Connect SAP S/4HANA and Walmart Marketplace

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

Get started