Skip to content

CAP-CRM-ENT-013Set records aside and restore them

Markdown

CAP-CRM-ENT-013

Set records aside and restore them

Markdown
  • DocumentApproved
  • Product intentConfirmed
  • ImplementationObserved

KindCapabilityProduct areaCRMModuleEntitiesRevision1Approved byAndrewApproved at2026-10-22

Read atservices-crm 7ea48a41react-console da630758

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Outcomes
An archived record is out of every default list and picker and cannot be edited.Every affiliation that names an archived organization preserves it, badged archived.Unarchive returns the record as it was.
Surfaces
consoleapi
Intent sources
services-crm:docs/milestones/CRM-M1-contacts-and-organizations.md#D-02services-crm:docs/milestones/CRM-M1-contacts-and-organizations.md#D-07services-crm:docs/milestones/CRM-M1-contacts-and-organizations.plan.md#A16services-crm:docs/milestones/CRM-M2-affiliations-roles-compliance.plan.md#A8

Controls

23 controls apply, from the corpus control catalogue.

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-LOG-001 TC-LOG-002 TC-LOG-003 TC-LOG-004 TC-LOG-005 TC-PI-001 TC-PI-002 TC-PI-003 TC-PI-005 TC-PRV-001 TC-PRV-002 TC-TEN-001 TC-TEN-002 TC-TEN-003

Repositories Read

RepositoryPaths
undefined:modules/entities/
undefined:docs/archive.md
undefined:modules/entities/tests/e2e/archive.e2e.spec.js
undefined:modules/entities/tests/integration/services/persistence/contacts.archive.integration.spec.js
undefined:modules/entities/tests/integration/services/persistence/organizations.archive.integration.spec.js
undefined:app/(console)/console/[tenantId]/crm/contacts/
undefined:acceptance/crm/playwright/journeys/contacts/CRM-ACC-0066.spec.ts

Where It Lives

Permissions

KeyChecked atScope
crm.contacts.archiveapitenant
crm.organizations.archiveapitenant

Business Rules

9 rules, 8 to be proved before approval. A rule's product intent is derived from its origin: 9 confirmed by a product decision, the rest inheriting this capability's confirmed.

IdRuleKindEnforced atProvenance
01must prove
Confirmed
Archive and unarchive require the record kind’s archive permission independently of update permission.
permissionapitest
services-crm:modules/entities/tests/e2e/archive.e2e.spec.js#refuses a caller who may update contacts but not archive them, 403
02must prove
Confirmed
Archive and unarchive require the read version, reject missing or stale versions and reject a record locked against updates.
validationapi, servicetest
services-crm:modules/entities/tests/e2e/archive.e2e.spec.js#refuses an archive with no version, 400, naming it
03must prove
Confirmed
Archive preserves status and collections, records its actor, time and optional reason up to 500 characters, advances version once and creates a revision; repeating the current archive state changes nothing.
lifecycleservice, databasetest
04must prove
Confirmed
Unarchive clears archive information and restores the record with an optional reason up to 500 characters retained until its next archive.
lifecycleservice, databasetest
05must prove
Confirmed
Archived records reject ordinary replacements, patches, bulk or job edits and disconnected-detail actions while permitting merge writes, system bookkeeping and deletion.
policyservicetest
services-crm:modules/entities/tests/e2e/archive.e2e.spec.js#refuses a replacement, 409 RecordArchived
06must prove
Confirmed
Default contact and organization lists exclude archived records, support explicit include or archived-only selections with matching pagination and still return full archived records by id.
policyapi, servicetest
services-crm:modules/entities/tests/e2e/archive.e2e.spec.js#lists it for archived=only, and only it
07
Confirmed
Pickers, Quick Search and newly created queries exclude archived records by default.
policyservicedocumented
08must prove
Confirmed
Organization archive preserves every affiliation and its organization identity, adds archive information to affiliation reads and leaves people-list filters available with archived-contact indicators.
invariantservicetest
services-crm:modules/entities/tests/integration/services/persistence/organizations.archive.integration.spec.js#keeps the ended affiliation naming the organization's id, with its name and its archive instant
09must prove
Confirmed
Ordinary saves, imports and data jobs cannot write archive information; archive and unarchive actions own those changes.
invariantservicetest

Scenarios

IdGivenWhenThenProvenance
01Test Duplicate is a contact nobody uses.An administrator archives it with a reason.It leaves Quick Search and the list, and can be unarchived from its 360.test
02A firm that closed years ago with former employees.It is archived.Its former employees are found under Past, each affiliation naming it, badged archived.test
services-crm:modules/entities/tests/e2e/archive.e2e.spec.js#keeps the former employee findable from it under Past, by the contact’s id

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.