ml-connector
OdooSPS Commerce

Odoo and SPS Commerce integration

Odoo runs your internal ERP for purchasing, inventory, and accounting. SPS Commerce connects you to major retail partners through EDI standards. Connecting the two ensures purchase orders flow from Odoo to your retail partners without manual file drops, inbound orders from partners land in Odoo accounts payable on schedule, and acknowledgments and ASNs stay synchronized so your inventory and vendor records match reality. ml-connector handles the very different APIs on each side and moves the data on a schedule you control.

How Odoo works

Odoo exposes purchase orders, invoices, partners, products, accounts, and employee records through XML-RPC over HTTP POST (all versions) and JSON-2 over HTTP POST (Odoo 19+). Authentication uses an API key paired with username, obtained by calling authenticate() to retrieve a session user ID for XML-RPC, or passed as a Bearer token for JSON-2. Odoo recommended polling over its built-in Automated Actions webhooks, which require Enterprise edition and Studio. Records are filtered by write_date timestamp for high-water-mark polling.

How SPS Commerce works

SPS Commerce exposes purchase orders, invoices, ASNs, warehouse receipts, and POS data through REST APIs at https://api.spscommerce.com, wrapped in RSX 7.7.7 JSON envelope format. Authentication uses OAuth2 client credentials, with the token endpoint at https://api.spscommerce.net/authorization/v1/token returning a JWT Bearer token. All documents are wrapped in the RSX envelope; cursor-based pagination is mandatory. SPS is primarily a pass-through network intermediary, so documents reflect trading partner requirements, not SPS-defined schemas.

What moves between them

Purchase orders created in Odoo flow outbound to SPS Commerce, which routes them to the appropriate retail partner in EDI format. Inbound purchase orders from trading partners arrive at SPS, are unwrapped from the RSX envelope, and are pulled into Odoo as purchase requisitions with partner and product details mapped. Invoices created in Odoo for goods received from partners are sent to SPS in EDI format. Advance ship notices and warehouse receipts from partners flow back into Odoo inventory. Polling on both sides runs on a schedule you define, typically every 5-15 minutes for inbound, and immediately on outbound document creation.

How ml-connector handles it

ml-connector stores both credential sets encrypted. On the Odoo side, it calls search_read() with the api_key header and filters on write_date to pull only new or modified records since the last poll. On the SPS side, it authenticates once per session with OAuth2 client credentials, stores the JWT Bearer token, and polls the /fulfillment/v1/purchaseorders and /inventory endpoints with cursor-based pagination. When a new purchase order arrives from a trading partner at SPS, ml-connector unwraps it from the RSX 7.7.7 envelope, maps the trading partner ID to an Odoo partner record (pre-configured during setup), and creates a purchase order in Odoo with line items. Outbound documents from Odoo are wrapped in the RSX envelope and posted to SPS, which routes them based on trading partner configuration. SPS returns HTTP 429 on rate limit; ml-connector backs off and retries with exponential jitter. Both systems store copies of every record for audit and replay on failure.

A real-world example

A mid-market consumer goods distributor uses Odoo for purchasing, inventory, and accounting across four warehouses, and serves major retail chains through SPS Commerce. Before the integration, the procurement team manually downloaded EDI files from SPS, parsed purchase orders in a spreadsheet, and re-entered them into Odoo by hand every morning, then uploaded invoices and ASNs as fixed-format EDI files back to SPS. With Odoo and SPS Commerce connected, inbound orders land in Odoo automatically every 15 minutes, keyed to the correct supplier and product, and invoices and shipment confirmations flow back to SPS without re-keying. The procurement backlog dropped by 70%, and trading partner exceptions surface immediately in the audit log instead of days later.

What you can do

  • Poll purchase orders from SPS Commerce and create them as requisitions in Odoo, mapped to the correct suppliers and products.
  • Send purchase orders and invoices from Odoo to SPS Commerce in EDI format, wrapped in the RSX 7.7.7 envelope for retail partner compliance.
  • Receive advance ship notices and warehouse receipts from trading partners via SPS and post them to Odoo inventory.
  • Authenticate with Odoo API keys and SPS OAuth2, manage token refresh, handle rate limit retries, and track pagination state.
  • Maintain a full audit trail of every EDI document sent and received, with replay and error recovery on failure.

Questions

Which direction does data move between Odoo and SPS Commerce?
Both directions. Purchase orders from Odoo suppliers flow outbound to SPS as EDI documents routed to retail partners. Inbound orders from trading partners arrive at SPS, are unwrapped from the RSX envelope, and are pulled into Odoo as purchase orders keyed to the correct vendor. Invoices and shipment confirmations follow the same pattern. Reference data such as partners and products must be pre-configured in Odoo before ml-connector can match inbound documents.
How does ml-connector handle the RSX 7.7.7 envelope and trading partner IDs?
SPS Commerce requires all documents to be wrapped in RSX 7.7.7 JSON format, and trading partner IDs are fixed during onboarding and not discoverable via API. ml-connector wraps outbound documents from Odoo before posting to SPS, and unwraps inbound documents before importing into Odoo. Trading partner mappings to Odoo vendors are configured once during setup and reused for every transaction.
What polling schedule and retry behavior should I use?
ml-connector recommends polling SPS every 5-15 minutes for inbound orders and inventory updates, synchronized with your business cycle and order volume. SPS does not publish rate limits publicly; implement exponential backoff with jitter when receiving HTTP 429 responses. Outbound documents from Odoo are sent immediately when created or modified. Every failed transaction is logged and can be replayed once the downstream system recovers.

Related integrations

Connect Odoo and SPS Commerce

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

Get started