---
id: ADR-CRM-DQ-006
title: Let applications apply their own merge changes
product_area: crm
module: data-quality
revision: 1
status: proposed
design_intent: confirmed
source_sha:
  services-crm: a8d1364f1dd44b723bb5f9acba12f983e9ec8d69
decision: >-
  Application-owned planning and apply functions are discovered from the
  database catalogue and run inside CRM’s merge transaction; missing required
  functions block planning and raised apply errors abort execution.
constrains:
  - WF-CRM-DQ-005
  - WF-CRM-DQ-006
  - SVC-CRM-DQ-merges
  - DOM-CRM-DQ-003
origin: 'services-crm:docs/merging/decisions.md#D1 (Andrew, 2026-10-11, option 1)'
alternatives:
  - option: Maintain a separate participant registry
    why_not: A second inventory could disagree with installed functions and grants.
  - option: Write application tables from CRM
    why_not: This would couple CRM to storage owned by other applications.
consequences:
  - Participants implement their own database functions.
  - >-
    The owner-deletion safety check runs only when its environment switch is
    enabled.
  - An unusable required participant prevents merging that record type.
  - Contact merges require Platform participation.
supersedes: []
evidence:
  - >-
    services-crm at a8d1364f:
    modules/merges/services/persistence/merge-participants.ts;
    references/second-order-coverage.ts.
---

# Let applications apply their own merge changes

## Context

Atomic merging must also respect each application’s write ownership.

## Decision

Application-owned planning and apply functions are discovered from the database catalogue and run inside CRM’s merge transaction; missing required functions block planning and raised apply errors abort execution.

## Alternatives Considered

Maintain a separate participant registry. A second inventory could disagree with installed functions and grants.

Write application tables from CRM. This would couple CRM to storage owned by other applications.

## Consequences

Participants implement their own database functions. The owner-deletion safety check runs only when its environment switch is enabled. An unusable required participant prevents merging that record type. Contact merges require Platform participation.
