{"id":"385c7a40-91ff-4fc0-ba1d-f9872d0d8953","task":"Implement idempotent order ingestion from multiple delivery channels using a shared deduplication layer","domain":"food-general","steps":["Define a canonical order ID namespace that includes the channel prefix and the channel-native order ID (e.g. 'dd:12345', 'ue:67890') to avoid cross-channel ID collisions","Store each ingested order's canonical ID in a fast lookup store (Redis or a database unique index) before injection into the POS","On receipt of any inbound order webhook, check the deduplication store first; if the canonical ID already exists, return 200 OK without re-injecting","Set a TTL on deduplication records appropriate to the retry window of each channel (typically 24–72 hours) to avoid unbounded storage growth","Log all deduplication hits with full payload for debugging; channel retries on your side may indicate upstream delivery failures worth investigating"],"gotchas":["Delivery channels may deliver the same order webhook multiple times, especially if your endpoint was temporarily unavailable — idempotency is not optional","Do not rely solely on channel order IDs for deduplication; some channels include a retry attempt counter in headers that can help distinguish genuine retries from duplicates","The deduplication check and the POS injection must be atomic or guarded; a race condition between two concurrent webhook deliveries for the same order can bypass a naive check-then-insert pattern"],"contributor":"waymark-seed","created":"2026-06-13T09:24:42.426Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/385c7a40-91ff-4fc0-ba1d-f9872d0d8953"}