Skip to content

CAP-CRM-DQ-017Combine organizations and their connections safely

Markdown

CAP-CRM-DQ-017

Combine organizations and their connections safely

Markdown
  • DocumentDraft
  • Product intentConfirmed
  • ImplementationObserved

KindCapabilityProduct areaCRMModuleDuplicate Review and Record MergingRevision1

Read atservices-crm a8d1364freact-console baf6dae3

The Formal Contract

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

Outcomes
People from both organizations retain affiliations to the survivor.Parent and child movements preserve an acyclic hierarchy.Size refusals and warnings make unusually large work visible.
Surfaces
consoleapi
Constraints
Near the affiliation ceiling, execution can take several minutes within the durable job limit.
Intent sources
services-crm:docs/merging/decisions.md#D7 (decided 2026-10-12), D9 and D10 (decided 2026-10-14)services-crm:docs/merging/conflict-resolution.md#4. Collection rules (organization merge re-points links, Andrew 2026-10-13)services-crm:docs/merging/experience/functional-requirements.md#ORG-2 to ORG-8 (package approved by Andrew 2026-10-13)

Controls

29 controls apply, from the corpus control catalogue.

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

Permissions

KeyChecked atScope
crm.organizations.mergeapitenant
crm.organizations.readapitenant

Business Rules

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

IdRuleKindEnforced atProvenance
01must prove
Confirmed
The survivor's parent can only be outside participants and their descendants; internal parent links are removed with a cycle warning and children of absorbed organizations re-parent to the survivor.
no proof recorded yet
validationservice, databasetest
02must prove
Confirmed
One primary domain remains, defaulting to the survivor's, distinct remaining domains become alternates and boolean flags combine automatically.
no proof recorded yet
calculationservicetest
services-crm:modules/merges/tests/unit/services/planning/organization-fields.spec.js#unions every other distinct domain into the alternate domain names
03must prove
Confirmed
Different organization types create a type question and a warning about separate branches without blocking execution.
no proof recorded yet
policyservicetest
services-crm:modules/merges/tests/unit/services/planning/organization-decisions.spec.js#asks which type the survivor keeps and warns that they may not be duplicates at all
04must prove
Confirmed
Affiliations and roles move to the survivor, equivalent stays combine into its affiliation with primary status if either held it and discarded details are listed.
no proof recorded yet
lifecycleservicetest
services-crm:modules/merges/tests/integration/services/merges/organization-merge-execution.integration.spec.js#combines the two stays of somebody who worked at both into the survivor’s own affiliation
05must prove
Confirmed
Organization merges above 100,000 affiliation writes, including combined-away rows, are rejected; large plans explain affected people, duration and editing waits.
origin: services-crm:docs/merging/decisions.md#D7 (decided 2026-10-12: a ceiling of 100,000 employees)
no proof recorded yet
validationservicetest
06must prove
Confirmed
Linked employee details retain kept source records, redirect discarded slots to the retained same-type detail or copy their last value when no detail of that type remains, with each changed link recorded.
origin: services-crm:docs/merging/conflict-resolution.md#4. Collection rules (organization merge re-points links, Andrew 2026-10-13)
no proof recorded yet
lifecycleservicetest
services-crm:modules/merges/tests/integration/services/merges/organization-merge-execution.integration.spec.js#re-points a link to a record that lost its slot to the record of its type the merge kept
07must prove
Confirmed
The result keeps one address and phone per type, lists discarded items and retains exactly one preferred address selected by the plan.
no proof recorded yet
calculationservice, databasetest
08must prove
Confirmed
Organization role compliance and region assignment are recomputed after merging rather than offered as choices.
no proof recorded yet
calculationservicetest
services-crm:modules/merges/tests/unit/services/planning/organization-fields.spec.js#never offers the contact role compliance status and recomputes it after the merge
09must prove
Confirmed
Adding, removing or editing an affiliation that the merge moves invalidates the approved preview, even without an affiliation combination.
no proof recorded yet
policyserviceobserved
10
Confirmed
An organization locked against changes cannot participate in a merge.
validationservicetest

Scenarios

IdGivenWhenThenProvenance
01Two organizations have children, employees, domains and a person affiliated to both.An administrator combines them.The absorbed domain becomes an alternate, children and people move and the overlapping stay combines.test
02Employees link work addresses from the absorbed organization.The plan retains the survivor's address of that type.Employee links redirect to that address and each change is recorded.test

Edge Cases

IdGivenWhenThenProvenance
03An organization and its descendant participate together.The administrator opens their preview.Neither an excluded descendant nor the internal link can become the survivor's parent, and the removed link is explained.test

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.