---
id: WF-COM-FUL-019
title: Load and read back Rhythm 1.0 Commerce records through data jobs
trigger: Staff submit or control a collection migration job.
product_area: commerce
module: fulfillment
revision: 1
status: draft
design_intent: proposed
implementation_evidence: observed
inference: []
source_sha:
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
implements:
  - CAP-COM-FUL-020
crosses:
  - SVC-COM-FUL-data-operations
  - SVC-COM-FUL-inventory
  - SVC-COM-FUL-fulfillment
idempotency: >-
  Submission keys return an existing matching job. Applied item receipts
  deduplicate batch replay, and source crosswalks identify loaded records.
  Validation apply checks the expected impact digest.
concurrency: >-
  Dispatch claims queued batches per workspace; workers execute retained batches
  under the engine contract. Job controls preserve already running or committed
  work at batch boundaries.
hops:
  - 'n': 1
    actor_or_service: Collection's own API function
    action: >-
      Authorize up to 500 prepared records, gate initial imports on
      implementation loading and freeze a validate or apply job.
    anchor: 'services-commerce:modules/data-operations/services/jobs/data-jobs.ts'
    seam: sync
    on_failure: 'Refuse invalid authority, workspace state or input before job freezing.'
    left_inconsistent: The rejected submission creates no job.
    observer: Retained job status.
    provenance: observed
    source: >-
      services-commerce:modules/data-operations/services/jobs/initial-import-gate.ts
  - 'n': 2
    actor_or_service: Data-job dispatcher
    action: >-
      Claim queued batches and publish pointers after nudges or the minute
      schedule.
    anchor: >-
      services-commerce:modules/data-operations/services/queue/data-job-dispatch.ts
    seam: schedule
    on_failure: Retain undispatched work for another run.
    left_inconsistent: Accepted jobs can remain waiting for execution.
    observer: Batch counters.
    provenance: observed
    source: >-
      services-commerce:modules/data-operations/services/queue/data-job-dispatch.ts
  - 'n': 3
    actor_or_service: Data-job worker
    action: >-
      Reload submitter authority and apply each collection operation through the
      engine with item receipts and crosswalks.
    anchor: >-
      services-commerce:modules/data-operations/services/queue/data-job-worker.ts
    seam: queue
    on_failure: >-
      Retain typed rejections or deferred dependencies; fail revoked authority
      and dead-letter unreadable messages.
    left_inconsistent: Earlier committed batches are retained.
    observer: Item results and rejections.
    provenance: observed
    source: >-
      services-commerce:modules/data-operations/services/operations/inventory-import.ts
  - 'n': 4
    actor_or_service: Collection's own API function (read back)
    action: >-
      Resolve up to 100 producer source keys through collection crosswalks and
      return records or missing keys.
    anchor: >-
      services-commerce:modules/data-operations/services/jobs/records-by-source-key.ts
    seam: sync
    on_failure: Reject invalid collection access without writing records.
    left_inconsistent: This hop changes no business data.
    observer: Source-key reconciliation response.
    provenance: observed
    source: >-
      services-commerce:modules/data-operations/services/jobs/records-by-source-key.ts
branches:
  - >-
    Migrated orders including invoices the crosswalk cannot resolve are loaded
    and relinked by a later update job.
waits:
  - The engine's batches; the operator's apply after validation.
evidence:
  - >-
    services-commerce at c8b66a98: modules/data-operations/**;
    aws/api/data-operations.routes.ts (DATA_JOB_COLLECTIONS);
    docs/migrations/data-operations/README.md (D-C-01 to D-C-17).
controls: [TC-IAM-006, TC-AZ-001, TC-AZ-002, TC-AZ-003, TC-AZ-004, TC-AZ-005, TC-AZ-006, TC-TEN-001, TC-TEN-002, TC-TEN-003, TC-CRY-001, TC-DAT-001, TC-DAT-002, TC-DAT-003, TC-DAT-004, TC-LOG-001, TC-LOG-002, TC-LOG-003, TC-LOG-004, TC-LOG-005, TC-CHG-001, TC-CHG-002, TC-CHG-003, TC-CHG-004, TC-CHG-007, TC-AVL-004, TC-MON-001, TC-MON-002, TC-MON-004, TC-PI-001, TC-PI-002, TC-PI-003, TC-PI-004, TC-PI-005, TC-PRV-001, TC-PRV-002]
---

# Load and Read Back Rhythm 1.0 Commerce Records Through Data Jobs

## What It Does

Collection routes accept prepared migration records and retain frozen data jobs. A dispatcher queues batches, workers recheck submitter authority and apply collection-specific operations, and source-key readback supports reconciliation.

## The Flow

```mermaid
sequenceDiagram
  participant T as Migration tool
  participant A as Collection API
  participant D as Dispatcher
  participant W as Worker
  participant X as Crosswalk
  T->>A: submit validate (key)
  A-->>T: impact digest
  T->>A: apply with digest
  A->>D: nudge
  D->>W: batch messages
  W->>W: write records, receipts, crosswalk
  T->>A: read back by source keys
  A->>X: crosswalk, then records
```

## When Something Fails

Rejected records retain typed reasons and missing dependencies can defer work. Cancellation preserves committed batches. Unreadable messages are dead-lettered, and stable receipts prevent a repeated batch from applying its completed changes twice.
