← Volver al Tech Radar

WooCommerce ERP / wholesaler API sync

Anillo: AdoptCuadrante: Técnicas

Mi veredicto

Sincroniza WooCommerce con APIs de ERP y mayoristas mediante tareas programadas e idempotentes: mapeo declarativo de campos (EAN/índice), reglas de margen al escribir y protección de stock que oculta artículos no disponibles. Trata la tienda como una caché; el proveedor es la fuente de la verdad.

Brief de profesional

Why we adopted it

Stores that resell a distributor's catalog do not own their inventory truth - the supplier does. We shipped this pattern for an automotive-parts store wired to a wholesaler REST API with tens of thousands of indexes: the store is a cache with a checkout, the wholesaler is the source of record. Once that inversion is accepted, catalog, stock, and price maintain themselves and the two expensive failure modes (selling what the supplier does not have, selling below a moved cost price) disappear.

The mechanics that matter

Declarative field mapping keyed on EAN and supplier index (attributes, media, HTML description blobs map to WooCommerce products and variations without duplicate creation on re-runs). Stock protection is deliberately dumb: supplier says unavailable, product becomes unpurchasable, no cleverness. Price is cost plus margin rules computed at write time, so the owner steers profitability by editing rules, not thousands of prices.

Production scars

Cadence must be split - frequent light polling for stock and price, rare heavy refresh for full catalog and media - or you melt shared hosting. Do not drive it from page-load WP-Cron; use real scheduled tasks. Cycles must be idempotent (a sync that dies halfway is re-run, not repaired). And watch wp_postmeta bloat: a sloppy writer wrecks query performance long before anyone suspects the sync. Swap the wholesaler for an ERP with an API (Comarch, Dynamics 365, NetSuite) and the shape is identical.

Añadido: 2026-07-07 · Última revisión: 2026-07-07

Lectura relacionada