---
id: CAP-CRM-ACT-018
title: Retain interactions and work through record deletion and merge
feature: FEAT-CRM-ACT-05
product_area: crm
module: activities-tasks
revision: 2
status: draft
product_intent: proposed
implementation_evidence: partially-observed
supersedes:
  - react-console acceptance inventory CAP-CRM-ACT-018
source_sha:
  services-crm: a8d1364f1dd44b723bb5f9acba12f983e9ec8d69
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
intent_sources:
  - 'services-crm:docs/milestones/CRM-M8-activities-and-tasks.md#D-44'
  - 'services-crm:docs/milestones/CRM-M4-duplicates-and-merge.md#D-20'
purpose: >-
  CRM record changes preserve related work and move appropriate references to a
  survivor.
outcomes:
  - Shared activity links retained where possible
  - Tasks moved to the merged survivor
  - Unlinked activity retention made visible as a gap
concepts:
  - CON-CRM-ACT-001
  - CON-CRM-ACT-003
  - CON-CRM-ACT-005
actors:
  - ACT-CRM-003
  - ACT-CRM-005
surfaces:
  - api
  - job
preconditions: []
postconditions: []
permissions:
  - key: crm.contacts.merge
    where_checked: service
    scope: tenant
  - key: crm.organizations.merge
    where_checked: service
    scope: tenant
  - key: crm.contacts.delete
    where_checked: service
    scope: tenant
rules:
  - id: BR-CAP-CRM-ACT-018-01
    proved_by: [ATS-CRM-ACT-018-01, ATS-CRM-ACT-018-04, TST-CRM-ACT-003, TST-CRM-ACT-007, TST-CRM-ACT-063]
    statement: >-
      Deleting a related record removes its activity links only, preserving the
      activity on other linked records’ timelines.
    kind: lifecycle
    enforced_at:
      - database
    must_prove: true
    provenance: test
    source: >-
      services-crm:modules/activities/tests/integration/services/persistence/activities.integration.spec.js#leaves
      the activity on the other records’ timelines when one linked contact is
      deleted
    origin: none
  - id: BR-CAP-CRM-ACT-018-02
    proved_by: [ATS-CRM-ACT-018-02, TST-CRM-ACT-063]
    statement: >-
      An activity left without links retains direct and authorized dataset
      access but has no timeline and cannot open through its console record
      link.
    kind: lifecycle
    enforced_at:
      - database
    must_prove: true
    provenance: observed
    source: >-
      services-crm:modules/activities/queries/activities.query.ts:activitiesQuery;
      react-console:app/(console)/console/[tenantId]/crm/activities/[id]/page.tsx
    origin: none
    note: >-
      The product decision requires authorized management of retained activities
      without links.
  - id: BR-CAP-CRM-ACT-018-03
    proved_by: [ATS-CRM-ACT-018-04]
    statement: >-
      Loss of the final related record neither deletes the activity nor
      automatically transfers it to an organization.
    kind: policy
    enforced_at:
      - database
    must_prove: true
    provenance: test
    source: >-
      react-console:acceptance/crm/playwright/journeys/cross-application/CRM-ACC-0719.spec.ts#CRM-ACC-0719
    origin: 'services-crm:docs/milestones/CRM-M8-activities-and-tasks.md#D-44'
  - id: BR-CAP-CRM-ACT-018-04
    proved_by: [ATS-CRM-ACT-018-02, TST-CRM-ACT-063]
    statement: >-
      The deletion journey checks for removed activity links in the audit and
      records an absent section as a gap, without proving the same gap in every
      deployment.
    kind: policy
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      react-console:acceptance/crm/playwright/journeys/cross-application/CRM-ACC-0719.spec.ts#CRM-ACC-0719
    origin: none
    note: >-
      The finding preserves the difference between observed behavior and the
      earlier acceptance or product expectation.
  - id: BR-CAP-CRM-ACT-018-05
    proved_by: [ATS-CRM-ACT-005-11, ATS-CRM-ACT-018-03, TST-CRM-ACT-064]
    statement: >-
      Merging transfers activity links to the survivor, collapses duplicate
      links and preserves a primary flag on the retained link.
    kind: calculation
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      react-console:acceptance/crm/playwright/journeys/cross-application/CRM-ACC-0720.spec.ts#CRM-ACC-0720
    origin: none
  - id: BR-CAP-CRM-ACT-018-06
    proved_by: []
    statement: >-
      Merge preview evidence includes activity versions, allowing later activity
      changes to invalidate the plan.
    kind: invariant
    enforced_at:
      - service
    must_prove: true
    provenance: observed
    source: >-
      services-crm:modules/activities/services/persistence/activities.ts:listActivityLinkVersionsOfRecords
    origin: 'services-crm:docs/milestones/CRM-M4-duplicates-and-merge.md#D-31'
  - id: BR-CAP-CRM-ACT-018-07
    proved_by: [ATS-CRM-ACT-005-11, ATS-CRM-ACT-017-09, ATS-CRM-ACT-018-03, TST-CRM-ACT-064]
    statement: Merge transfers related task references to the surviving record.
    kind: calculation
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      react-console:acceptance/crm/playwright/journeys/cross-application/CRM-ACC-0720.spec.ts#CRM-ACC-0720
    origin: none
  - id: BR-CAP-CRM-ACT-018-08
    proved_by: [ATS-CRM-ACT-005-13, ATS-CRM-ACT-018-03, TST-CRM-ACT-064]
    statement: >-
      Reading a merged-away record’s timeline returns Gone with the surviving
      record reference.
    kind: validation
    enforced_at:
      - api
    must_prove: true
    provenance: test
    source: >-
      react-console:acceptance/crm/playwright/journeys/cross-application/CRM-ACC-0720.spec.ts#CRM-ACC-0720
    origin: 'services-crm:docs/milestones/CRM-M4-duplicates-and-merge.md#D-20'
scenarios:
  - id: SC-CAP-CRM-ACT-018-01
    given: Two contacts share a meeting and one also has a separate call.
    when: Merge the duplicate into the survivor.
    then: >-
      The survivor receives both activities without duplicate meeting links and
      retains the primary designation.
    provenance: test
    source: >-
      react-console:acceptance/crm/playwright/journeys/cross-application/CRM-ACC-0720.spec.ts#CRM-ACC-0720
edge_cases:
  - id: SC-CAP-CRM-ACT-018-02
    given: One contact is an activity’s only link and a task’s related person.
    when: Delete that contact.
    then: >-
      The activity has no links and the task remains with its contact reference
      cleared.
    provenance: test
    source: >-
      react-console:acceptance/crm/playwright/journeys/cross-application/CRM-ACC-0719.spec.ts#CRM-ACC-0719
constraints: []
depends_on:
  - CAP-CRM-ACT-001
  - CAP-CRM-ACT-010
related:
  - CAP-CRM-ACT-005
journeys:
  - JNY-CRM-ACT-006
open_questions: []
evidence:
  - >-
    services-crm at a8d1364f1dd44b723bb5f9acba12f983e9ec8d69: Independently
    reviewed declarations, behavior and assertions identified in this
    capability’s row citations.
  - >-
    react-console at baf6dae382d6f41dce976c7f848667ccc37e076f: Independently
    reviewed declarations, behavior and assertions identified in this
    capability’s row citations.
controls: [TC-AZ-001, TC-AZ-002, TC-AZ-003, TC-AZ-004, TC-AZ-005, TC-AZ-006, TC-DAT-001, TC-DAT-002, TC-DAT-003, TC-DAT-004, TC-IAM-001, TC-IAM-005, TC-IAM-006, TC-LOG-004, TC-LOG-005, TC-MON-001, TC-MON-002, TC-PI-001, TC-PI-003, TC-PI-004, TC-PI-005, TC-PRV-001, TC-PRV-002, TC-PRV-003, TC-TEN-001, TC-TEN-002, TC-TEN-003]
exercised_by: [FAS-CRM-ACT-05-02, FAS-CRM-ACT-05-03, FAS-CRM-ACT-05-04, FAS-CRM-ACT-05-05]
suites: [TST-CRM-ACT-003, TST-CRM-ACT-007, TST-CRM-ACT-063, TST-CRM-ACT-064]
---

# Retain interactions and work through record deletion and merge

## Purpose

CRM record changes preserve related work and move appropriate references to a survivor.

## How It Works

An administrator removes a contact or organization through the owning records module. Storage removes the activity links to that record. Activities with other links still appear in those contexts. An activity with no links remains stored but its console link has no record to open. The deletion journey inspects whether removed links appear in the audit. A merge uses the activities module’s reference-handling helpers to move and collapse links. Task references move to the survivor through the merge process. Preview versions help detect activity changes after planning. A merged record’s timeline directs callers to the survivor. The product should finish the recorded orphan-management and deletion-audit requirements.

## Relationships

- Task recording defines survival after a related record is deleted.
- Activity logging owns the links transferred by merge.
- Entities owns record deletion, and Data Quality owns merge orchestration.
