What problem does it solve?
Inconsistent order statuses, duplicate webhook deliveries, and brittle integrations between payment gateways, fulfillment providers, and storefront platforms cause inventory errors, double-charges, and broken customer experiences. This Skill defines clear state transitions, idempotent webhook handling, and a robust audit trail so orders reliably move from pending → confirmed → processing → shipped → delivered without unintended side effects.
Core Features & Use Cases
- Platform mappings: Prescribes how Shopify, WooCommerce, BigCommerce, and headless systems map native statuses and which webhooks to subscribe to.
- Idempotent webhook handling: Early-return guards and order existence checks to prevent duplicate processing from repeated webhook deliveries.
- State machine & event sourcing: A VALID_TRANSITIONS mapping, canTransition checks, atomic DB transactions, timestamped
${status}At fields, and append-only orderEvents for auditability.
- Decoupled side effects: Inventory deduction, emails, fulfillment notifications, and tracking updates run outside the DB transaction and failures are logged for retry.
- Operational guidance: Best practices for wiring 3PL apps, configuring gateway post-payment status, and handling partial cancellations or refunds.
Quick Start
Transition order ORD-123 from pending to confirmed using the Stripe payment_intent.succeeded webhook payload, record the confirmedAt timestamp, deduct inventory, and notify the fulfillment provider.