Shopify–Odoo Integration · advanced · 10 min read
Handling API Limits and Retries
Shopify and Odoo API rate limits, backoff strategies, idempotent retries, error classification, and priority budgets for integration workers.
Last reviewed 2026-07-30 · Estimated effort: 6+ weeks for multi-team change
Table of contents
Shopify Admin API uses cost-based rate limits; Odoo RPC and database load impose separate ceilings. Integrations that ignore headers and retry aggressively create 429 storms, duplicate records, and database contention.
Production clients parse rate-limit headers, implement exponential backoff with jitter, classify errors as transient versus permanent, and retry only idempotent operations with stable keys.
Allocate API budget across priority lanes so order fulfillment calls win over catalog image backfills during congestion.
Rate limit errors look like infrastructure noise until orders stop importing during a sale. Retry design is integration logic — not an afterthought in exception handlers.
This article covers ERP connector API discipline — not general REST tutorials or Shopify GraphQL storefront queries.
Shopify REST and GraphQL Admin APIs expose bucket state via response headers. Clients should track available cost, restore rate, and requested query cost — throttling proactively before hard 429 responses when possible.
Bulk operations and pagination multiply cost. Catalog sweeps must use cursors and minimal field sets instead of fetching entire product graphs per SKU.
Odoo XML-RPC and JSON-RPC are not infinite throughput — long transactions, missing indexes on external ID fields, and N+1 browse loops inside importers slow workers and hold connections.
Batch creates and writes where ORM allows; profile hot paths during load tests. Database locks from concurrent order imports can mimic API failures with timeout errors.
Transient: network blips, 429, 5xx, Odoo serialization failures — retry with backoff. Permanent: 404 on mapped entity, validation errors, unknown SKU — route to dead-letter without endless retry.
Ambiguous 400 responses need structured logging of payload hash and mapping version so operators can fix data and replay once.
- ▸Max attempts with exponential backoff and jitter
- ▸Circuit breaker when error rate spikes across workers
- ▸Separate retry policy per queue priority
Retries are safe only when importers check external IDs before create. Order import, inventory set, and partner create must upsert or no-op on duplicate — otherwise backoff logic doubles shipments.
Use idempotency keys in middleware where Shopify APIs support them; store processed webhook IDs to skip duplicate delivery.
Define daily or per-minute API cost budgets per job family. When orders queue depth rises, pause catalog diff workers automatically. Media uploads get leftover budget after orders and inventory.
Reconciliation jobs should use delta queries with tight time windows to minimize call count versus full exports.
- ✓Parse and log Shopify rate-limit headers on every client response.
- ✓Never retry permanent mapping errors more than once without human fix.
- ✓Add jitter to backoff schedules so workers do not thundering herd.
- ✓Index external ID fields used in importer lookups.
- ✓Load test retry behavior under simulated 429 responses.
- ✓Document API budget ownership between connector and custom middleware teams.
- !Fixed one-second retry loops on 429 without reading Retry-After headers.
- !Retrying order create on timeout without idempotency check — duplicates result.
- !Full catalog pagination during peak sharing budget with order import.
- !Treating all 400 errors as transient and filling dead-letter queues slowly.
- !Ignoring Odoo database symptoms and blaming Shopify limits only.
- !No circuit breaker — workers hammer a failing endpoint for hours.
API limit handling combines header-aware throttling, classified retries, and idempotent importers — not generic catch-and-sleep loops.
Priority budgets tie rate limit strategy to queue design so orders survive catalog congestion.
API client
Gateway / auth
Odoo controllers / RPC
Database
- clientgw
- gwodoo
- odoodb
Retry with backoff
Quarantine + alert
Dead-letter + fix
Replay safely
| Option | Best when | Trade-off |
|---|---|---|
| Configure | Standard Odoo covers the need | Limited uniqueness |
| Customize | Differentiating workflow | Upgrade cost |
| Integrate | External system of record | Sync complexity |
Frequently asked questions
Should we use Shopify Bulk Operations for catalog sync?
Often yes for large initial backfills. Ongoing delta sync may still use lighter queries. Bulk jobs are async — integrate with queue completion handlers.
How many retries is enough?
Common pattern: 5–8 attempts over increasing windows for transient errors, then dead-letter. Orders may need faster escalation alerts than catalog jobs.
Does GraphQL always beat REST for rate limits?
Not automatically. GraphQL cost depends on query shape. Design minimal queries and measure actual bucket consumption.
Related articles
Shopify Webhooks vs Scheduled Sync
When to use Shopify webhooks, cron reconciliation, or both: latency, completeness, failure modes, and recovery patterns for Odoo integration.
View →Queue Management for High-Volume Stores
Durable queues, workers, priority lanes, and observability for Shopify–Odoo sync at scale — beyond synchronous webhook processing.
View →Managing Images and Media
Product image sync between Odoo and Shopify: ownership rules, URL vs binary transfer, rate limits, retries, and avoiding catalog job bottlenecks.
View →Testing an Ecommerce Integration
Structured UAT for Shopify–Odoo sync: staging stores, idempotency tests, partial fulfillments, failure injection, reconciliation validation, and go-live gates.
View →Related services
Python Backend Development
Middleware workers, queues, and APIs beside Odoo when the connector needs a service layer.
View →Shopify–Odoo Integration
Architecture, connectors, and operational sync for Shopify storefronts and Odoo ERP.
View →Odoo Support
Monitoring, incident response, and AMC for live Shopify–Odoo estates.
View →Seeing 429s or duplicate imports?
We audit client retry logic, idempotency keys, and API budget allocation across your sync jobs.
