---
id: WF-MBR-MEM-027
title: Load memberships and terms through an import
trigger: >-
  The data job engine invokes Membership import operations after prerequisite
  configuration.
product_area: membership
module: memberships
revision: 1
status: draft
design_intent: proposed
implementation_evidence: partially-observed
inference: []
source_sha:
  services-membership: 5994c270e8a37a30f848e99ba5b5ee6b87c08893
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
implements:
  - CAP-MBR-MEM-001
moves:
  - STATE-MBR-MEM-001
  - STATE-MBR-MEM-003
crosses:
  - SVC-MBR-MEM-memberships
idempotency: >-
  Deterministic identifiers or producer crosswalk keys direct reruns to existing
  records instead of creating unrelated duplicates.
concurrency: >-
  Imported term writes lock their owning holding and check overlap. They do not
  provide the complete staff-creation validation boundary.
hops:
  - 'n': 1
    actor_or_service: Platform data job engine
    action: >-
      Prevalidate and invoke the registered data operation for each item,
      reporting refusal while continuing the job.
    anchor: >-
      services-membership:modules/memberships/services/data-operations/membership-operations.ts:operationsOf
    seam: queue
    on_failure: >-
      Classify the refused import item, including overlap conflict, and continue
      to other items.
    left_inconsistent: >-
      The workspace can be partly imported; reset retains versions and revision
      evidence.
    observer: Import job item outcomes
    provenance: test
    source: >-
      services-membership:modules/memberships/tests/integration/data-operations/membership-data-operations.integration.spec.ts#classifies
      an overlapping term as that
  - 'n': 2
    actor_or_service: Memberships service
    action: >-
      Create or update the holding with migration quality and record initial
      import attribution.
    anchor: >-
      services-membership:modules/memberships/services/data-operations/membership-operations.ts:createImportedMembership
    seam: sync
    on_failure: >-
      Report this membership item’s refusal without undoing earlier successful
      items.
    left_inconsistent: No partial membership item survives its failed transaction.
    observer: Import item outcome
    provenance: observed
    source: >-
      services-membership:modules/memberships/services/data-operations/membership-operations.ts:updateImportedMembership
  - 'n': 3
    actor_or_service: Memberships service
    action: >-
      Write the imported term under the holding lock, reject overlap and refresh
      caches without grant or child fan-out.
    anchor: >-
      services-membership:modules/memberships/services/data-operations/membership-operations.ts:writeImportedTerm
    seam: sync
    on_failure: Report this term item’s refusal and retain the job’s other completed work.
    left_inconsistent: >-
      The producer remains responsible for grants and derived holdings, and unit
      connections have no import path.
    observer: Import item outcome
    provenance: observed
    source: >-
      services-membership:modules/memberships/services/data-operations/membership-operations.ts
      (header)
branches:
  - >-
    Imports omit several staff-entry checks, and term upsert relies on the
    supplied target identifier.
waits: []
evidence:
  - >-
    services-membership at 5994c270:
    modules/memberships/services/data-operations/membership-operations.ts;
    aws/membership.data-operations.ts
controls: [TC-AVL-002, TC-AVL-003, TC-AVL-004, TC-AZ-001, TC-AZ-002, TC-AZ-003, TC-AZ-004, TC-AZ-005, TC-AZ-006, TC-CHG-001, TC-CHG-002, TC-CHG-003, TC-CHG-004, TC-CRY-001, TC-CRY-002, TC-CRY-003, TC-DAT-001, TC-DAT-002, TC-DAT-003, TC-DAT-004, TC-DAT-007, TC-IAM-001, TC-IAM-002, TC-IAM-004, TC-IAM-005, TC-IAM-006, TC-LOG-001, TC-LOG-002, TC-LOG-003, TC-LOG-004, TC-LOG-005, 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, TC-SEC-001, TC-SEC-004, TC-TEN-001, TC-TEN-002, TC-TEN-003]
---

# Load memberships and terms through an import

## What It Does

Imports load holdings and dated coverage one item at a time. Producer keys support repeatable upserts while the data engine reports successful and refused items separately.

## The Flow

```mermaid
flowchart TD
  H1["Prevalidate and invoke the registered data operation for each item, reporting refusal while continuing the job"]
  H2["Create or update the holding with migration quality and record initial import attribution"]
  H1 --> H2
  H3["Write the imported term under the holding lock, reject overlap and refresh caches without grant or child fan-out"]
  H2 --> H3
```

## When Something Fails

One item’s refusal does not undo prior items. The producer must load granted and derived holdings, and affiliation imports are missing. Existing findings cover permissive upserts and resets that retain temporal evidence of deleted records.
