A hypothetical DTC home goods brand builds a fulfillment orchestration system integrated with Shopify via the Admin GraphQL API and connected to two 3PL partners. Named system owner: the brand's head of operations. Named proposer: the warehouse coordinator. Named independent approver: the merchant operations manager. All targets are hypothetical and illustrative.
Prelaunch fixtures.
dtc_cur_1: Shopify webhook event with valid HMAC (raw body bytes, shared secret, constant-time safe compare), X-Shopify-Webhook-Id: wh-7001 for delivery dedup, X-Shopify-Event-Id: ev-8001 for correlation, FulfillmentOrder FO-9100 at Warehouse A location L-50, status OPEN, 12 remaining fulfillable items, updatedAt 2026-10-15T14:00:00Z, local OMS revision v5
dtc_cur_2: Dispatch draft prepared by warehouse coordinator, scoped to shop S-1/order O-2200/local OMS revision v5 (integration snapshot identity, not a native Shopify version or webhook header), queued for operations manager approval
dtc_stale_1: Webhook event with valid HMAC from an older Shopify event (legitimately signed by Shopify but referencing FulfillmentOrder state at local OMS revision v3 when current local OMS revision is v5), distinct from a duplicate delivery of wh-7001
dtc_unknown_shop_1: Webhook with valid HMAC but for shop S-99 and order O-8800 not recognized in the integration's configured shop/order manifest (valid signature, unknown business entity)
dtc_invalid_hmac_1: Webhook whose HMAC digest does not match the computed digest from raw body and shared secret (tampered payload or wrong secret)
dtc_inelig_1: Dispatch request for FulfillmentOrder FO-9100 already CLOSED with zero remaining fulfillable items
dtc_unauth_role_1: Customer service agent attempting to approve a 3PL dispatch (requires operations manager role)
dtc_unauth_tenant_1: Staff from Brand B attempting to access Brand A fulfillment data in a multi-brand environment
dtc_unavail_1: 3PL API temporarily unreachable for dispatch submission
Disjoint held-out setup. 12 synthetic dispatch records divided into two disjoint cohorts. Positive cohort (5 records: DSP-001 through DSP-005): valid HMAC, current local OMS revision from Admin GraphQL read, authorized warehouse coordinator, qualified operations manager approval, 3PL available. Negative cohort (7 records: DSP-006 through DSP-012): each tests one denial condition (stale local OMS revision from validly signed older event, valid HMAC but unknown shop/order, invalid HMAC, already fulfilled, wrong role, wrong brand, 3PL unavailable). Each negative fixture has a distinct ID and test acceptance target of zero unauthorized effects. The held-out total (12: 5 positive and 7 negative) excludes the named recovery-only revocation fixture (DSP-101) and private-restore test fixture. Training and tuning data separated from held-out fixtures; held-out cohorts are never used to train or tune system behavior. All are hypothetical.
Allowed workflow (dtc_1). Positive cohort DSP-001 arrives via Shopify webhook. Integration computes HMAC SHA-256 from raw body bytes and shared secret, compares to X-Shopify-Hmac-Sha256 via constant-time safe compare. Confirms X-Shopify-Webhook-Id: wh-7001 not previously processed. Reads current FulfillmentOrder FO-9100 via Admin GraphQL: status OPEN, location L-50, 12 remaining items, updatedAt 2026-10-15T14:00:00Z. Coordinator prepares dispatch draft with stable command key op:dtc_A_001 scoped to shop S-1/order O-2200/local OMS revision v5 (integration snapshot, not a Shopify version or header). Operations manager reads current FO-9100 state independently, confirms OMS revision v5 matches, approves. System dispatches to 3PL Warehouse A. 3PL work queue entry created (business effect verified independently by reading 3PL work queue). 3PL acknowledgment recorded, but ACK alone does not constitute confirmed fulfillment or trigger refund or payment effects. Records dispatch in minimized write-once log (FulfillmentOrder ID FO-9100, command key, approver, decision, timestamp, 3PL ACK status, local OMS revision v5; no raw customer PII). 5 of 5 positive records dispatched. Test acceptance targets; not executed results.
Denied: stale signed event (dtc_2a). Fixture dtc_stale_1 / negative DSP-006: webhook has valid HMAC (legitimately signed by Shopify for an earlier event) but references FulfillmentOrder state at local OMS revision v3 when current is v5. This is a validly signed older event, not a duplicate delivery of wh-7001 and not an HMAC failure. Integration reads current FO-9100 via Admin GraphQL, detects OMS revision mismatch. Dispatch deferred. 0 dispatches on stale revisions. Test acceptance target.
Denied: valid HMAC but unknown shop/order (dtc_2b). Fixture dtc_unknown_shop_1 / negative DSP-007: webhook HMAC is valid (Shopify signed it correctly) but shop S-99 and order O-8800 are not in the integration's configured manifest. Payload authenticated but business entity unknown. Logged as unrecognized, no dispatch. 0 business actions for unknown shops. Test acceptance target.
Denied: invalid HMAC (dtc_2c). Fixture dtc_invalid_hmac_1 / negative DSP-008: HMAC digest does not match computed digest from raw body bytes and shared secret. Payload rejected before any business logic. 0 actions on tampered webhooks. Test acceptance target.
Denied: already fulfilled (dtc_2d). Fixture dtc_inelig_1 / negative DSP-009: FulfillmentOrder FO-9100 status CLOSED, zero remaining items. Dispatch rejected. 0 dispatches for fulfilled orders. Test acceptance target.
Denied: unauthorized role (dtc_2e). Fixture dtc_unauth_role_1 / negative DSP-010: customer service agent attempts approval. Requires operations manager role. 0 approvals by unauthorized roles. Test acceptance target.
Denied: unauthorized brand (dtc_2f). Fixture dtc_unauth_tenant_1 / negative DSP-011: Brand B staff, Brand A data. Brand isolation enforced. 0 cross-brand access. Test acceptance target.
Denied: 3PL unavailable (dtc_2g). Fixture dtc_unavail_1 / negative DSP-012: 3PL API unreachable. Dispatch held locally, not dispatched, no 3PL queue entry, no fulfillment, no refund and no payment effect. 0 dispatch confirmations without 3PL availability (fail closed). Test acceptance target.
Idempotency and duplicate detection (dtc_3). Operation A: coordinator prepares dispatch for DSP-001, operations manager reads current FO-9100 (status OPEN, 12 remaining, local OMS v5), approves, command key op:dtc_A_001. 3PL work queue entry created (verified independently by reading 3PL queue and checking local dispatch queue for inflight operations). Log committed. ACK alone does not confirm fulfillment or trigger payment. Replay of A with same key op:dtc_A_001: rejected, prior log preserved, 0 duplicate 3PL queue entries. X-Shopify-Webhook-Id: wh-7001 also deduplicated at ingestion layer (separate from command key). Operation B: coordinator prepares distinct DSP-002, manager reads current FO state independently, approves, key op:dtc_B_002. 3PL work queue entry for DSP-002 created (verified independently by reading 3PL queue: entry present with correct FO reference and local OMS revision). 2 of 3 proposals applied (A and B), acceptance target 0 duplicate business effects, not observed. Test acceptance targets. No duplicate fulfillments, refunds or payment actions.
Revoked authority (dtc_3c). Fixture dtc_revoked_1: coordinator queued dispatch for DSP-101 with key op:dtc_R_101 while Brand A scope was current and operations manager had approved the draft. Before 3PL response returned, head of operations (named revoker) revoked coordinator's Brand A scope. On delayed result/reconnect: system reads current permission grant for coordinator: Brand A scope absent. Queries pending dispatch queue: op:dtc_R_101 present but not yet dispatched to 3PL. Reads 3PL work queue: no entry for DSP-101. Reads committed effects from prior operations (DSP-001 through DSP-003): preserved, no modification. Fail closed: no dispatch, no 3PL write, no replay. 0 effects after revoked authority. Test acceptance target.
Ambiguous first response (dtc_3b). Fixture dtc_ambig_1: coordinator submits dispatch for DSP-003, key op:dtc_A_003, local OMS revision v5. Network interruption before 3PL acknowledgment. Before any possible repeat: (1) read durable dispatch log for key op:dtc_A_003; (2) independently read 3PL work queue for FO-9100; (3) check local dispatch queue for inflight or pending submissions; (4) check downstream: any pending fulfillment, refund or payment tied to this dispatch. Re-read current FO-9100 via Admin GraphQL: status, remaining quantities, updatedAt.
Log found, 3PL queue entry exists, downstream consistent: dispatch complete, no repeat. Log found, 3PL queue entry missing but inflight or pending in local queue: STOP. Do not repeat. Head of operations investigates 3PL state, reconciles log against 3PL queue. Log found, 3PL queue entry missing, nothing pending or inflight: if log records a committed effect that 3PL does not show, this is a missing-effect state. Do not replay the original dispatch. A distinct missing-effect correction requires current scoped coordinator (current Brand A permission verified), fresh FO-9100 read, operations manager reads fresh state and approves correction with original domain approver signoff, preserving the committed log entry. Log not found, 3PL queue entry exists: effect without log. Do not repeat. Reconcile log against existing 3PL entry. Log not found, 3PL confirms no queue entry AND no pending AND no inflight across local queue and 3PL backlog AND current coordinator role and Brand A scope verified AND FO-9100 state current AND operations manager approves with fresh read: only then resubmit with identical key op:dtc_A_003 after separate operations manager approval. Log and effects disagree, or only some effects committed, or any state pending/unknown/stale/revoked: do not repeat. Hold for head of operations. 0 duplicate dispatches. No duplicate fulfillments, refunds or payment actions. Test acceptance targets.
Dispatch logging and access control (dtc_4). Write-once dispatch log captures: FulfillmentOrder ID, command key, staff identity, decision (approve/defer/reject), timestamp, local OMS revision, 3PL ACK status. No raw customer names, addresses or payment data. Append-only: no updates or deletions. Scoped read restricted to compliance and operations manager roles. Retention owner: head of operations. Retention purpose: dispatch decision audit trail and operational compliance evidence. Retention period per merchant compliance team schedule. Access restrictions: no bulk export, no third-party sharing without head of operations approval. Training and tuning data separated from held-out test fixtures; held-out cohorts are never used to train or tune system behavior.
Staged restore (dtc_5). After 3PL connectivity restored: stage the prior stable version privately with no real writes to 3PL, Shopify or production dispatch queue. In private staging: (a) test authorized route: verify that current coordinator Brand A scope, operations manager role and head of operations authority are accepted; verify each independently confirmed 3PL queue entry from before the outage is still present and consistent; reconcile exact queued dispatch records against current Shopify FulfillmentOrder state (re-read FO-9100 status, remaining quantities, updatedAt); (b) test revoked/denied route: coordinator whose Brand A scope was revoked during outage (see dtc_3c) attempts to submit a queued dispatch and system denies (zero dispatches after revoked scope, revoked access never resurrected). Require two named signoffs: head of operations verifies data integrity, operations manager verifies dispatch workflow correctness. Both approve before production restore. Current brand boundaries, permission assignments and committed dispatch log entries preserved. Already-dispatched 3PL entries from manual fallback preserved and reconciled. If 3PL remains unavailable: hold all submissions, no writes to unavailable 3PL, no refund or payment effects. Named manual fallback during outage: coordinator records exceptions with FO ID, warehouse, exception type and signature, stored securely; holds all 3PL commits; reconciles upon restore. Named fallback owner: head of operations; queue reconciliation and two-role restart.
Tablet and keyboard access plan (dtc_6). On iPad 10th generation at 820 by 1180, warehouse coordinator attempts 3 tasks: (1) review dispatch exception queue (pass: queue fits portrait viewport with 0 horizontal overflow; fail: queue truncated or overflow; error: queue loads but status column hidden behind collapsed panel), (2) open FulfillmentOrder detail with line items and 3PL status (pass: line item data scrollable with complete details visible; fail: data hidden or unreadable; error: detail opens but remaining-quantity field missing), (3) tap Submit for Operations Review (pass: button visible without scrolling past detail, draft submitted, not dispatch committed; fail: button unreachable; error: submit silently fails with no status feedback). On desktop at 1280 by 800, keyboard-only operations manager attempts 3 tasks: (1) navigate exception list with arrow keys (pass: visible focus ring on each row; fail: no focus indicator; error: focus ring present but skips rows), (2) open dispatch detail with Enter (pass: focus moves to detail panel with FO and 3PL data; fail: nothing opens; error: panel opens but focus stays on list), (3) approve or defer with keyboard (pass: decision dropdown accessible, approval announced, focus returns; fail: dropdown inaccessible; error: approval commits dispatch without confirmation step). Residual risk: if 3PL confirmation is delayed after approval, the pending-dispatch indicator may not render correctly on tablet portrait, causing coordinator to misread dispatch status. All numerical outcomes are test acceptance targets, not executed results. Test plan; results not claimed.
This is a hypothetical scenario for illustration. Actual scope, timeline and cost depend on your requirements.