CRM

CRM - Audit Trail, Privacy & Compensating Strategies

GDPR compliance, deduplication and merging policies, immutable audit trails, and correction strategies for the CRM domain.

Audit Trail, Privacy & Compensating Strategies

The CRM domain maintains a comprehensive, immutable audit trail for every relationship, opportunity, and service interaction. Corrections are achieved through compensating documents and controlled merge procedures rather than record destruction.


1. CRM Audit Trail

Every mutation within the CRM context is recorded with immutable context. The audit trail supports sales management, service accountability, privacy compliance, and regulatory scrutiny.

Audit Attributes

AttributePurpose
Actor IdentityIdentifies the sales rep, support agent, marketer, system job, or integration process that initiated the action.
TimestampRecords the precise moment of the action in UTC and the user’s local time zone.
Origin ContextIdentifies the source module, engagement tool, or API integration that triggered the action.
Before / After SnapshotCaptures the state of the lead, deal, contact, account, or ticket before and after the change.
Reason CodeCaptures the business justification for the mutation, especially for stage regressions, disqualifications, and merges.
Linked EntitiesIdentifies related contacts, accounts, deals, tickets, or campaigns affected by the change.

Audit Invariants

  • Audit log entries are append-only. They can never be edited or deleted.
  • Closed-Won deals retain a complete lineage of stage changes, value revisions, and closure details.
  • Lead disqualifications and requalifications are permanently linked to reason codes.
  • Ticket SLA breaches, escalations, and reopen events are recorded with full time calculations.
  • Contact merges and account merges retain both original and surviving record identifiers.

2. GDPR / Privacy Compliance

The CRM domain supports privacy regulations such as GDPR, CCPA, and equivalent frameworks by design. Personal data is managed with consent, minimization, retention, and erasure controls.

Privacy Principles

PrincipleImplementation
Lawful BasisEvery contact record carries a lawful basis for processing (consent, contract, legitimate interest, legal obligation).
Consent ManagementConsent is captured with purpose, timestamp, source, and withdrawal mechanism.
Data MinimizationOnly data necessary for the stated commercial purpose is collected and retained.
Retention LimitsData retention periods are defined per data category; expired records are flagged for review or pseudonymization.
Right of AccessIndividuals can request a complete export of their personal data held in CRM.
Right to RectificationIndividuals can request correction of inaccurate personal data.
Right to ObjectIndividuals can object to marketing processing; opt-outs are applied immediately.

Right to be Forgotten

The CRM domain implements the right to erasure through pseudonymization rather than physical deletion wherever historical transactional integrity must be preserved.

Pseudonymization Strategy

Data ElementErasure Action
NameReplaced with non-identifiable token (e.g., DELETED_12345).
EmailReplaced with hashed or masked placeholder.
PhoneReplaced with masked placeholder.
AddressRemoved or generalized.
Touchpoint ContentContent scrubbed of personal references; metadata retained.
Deal / Ticket HistoryRetained with pseudonymized requester/contact reference.
Audit TrailRetained to document erasure action and preserve accountability.

When Full Deletion Is Permitted

Full deletion is permitted only when:

  • There is no overriding legal or contractual obligation to retain the data.
  • The data is not required for pending disputes, regulatory investigations, or financial audits.
  • All downstream subscribers have been notified and have completed their own erasure obligations.

When consent is withdrawn:

  1. The contact’s marketing consent status is updated immediately.
  2. A ConsentUpdated event is emitted.
  3. Marketing automation and engagement tools consume the event and suppress further communications.
  4. Existing scheduled campaigns remove the contact from future sends.
  5. Withdrawal is recorded in the audit trail with timestamp and source.

3. Deduplication & Merging Policies

Duplicate contacts and accounts are inevitable in a multi-channel CRM. The domain handles deduplication through detection, review, and explicit merge procedures.

Duplicate Detection Process

flowchart TD
    A[New Record Created] --> B[Canonical Key Check]
    B --> C{Duplicate Found?}
    C -->|No| D[Record Confirmed Unique]
    C -->|Yes| E[Confidence Scoring]
    E --> F{Auto-Merge Eligible?}
    F -->|Yes| G[Auto-Merge with Audit]
    F -->|No| H[Merge Review Queue]
    H --> I{User Decision}
    I -->|Merge| J[Manual Merge with Audit]
    I -->|Ignore| K[Duplicate Dismissed with Reason]
    I -->|Not Duplicate| D

Merge Rules

RuleInvariant
Survivor SelectionOne record is designated as the survivor; all others become merged ancestors.
History TransferAll touchpoints, deals, tickets, activities, and campaign attributions transfer to the survivor.
Original IDs PreservedMerged record IDs are retained in a merge history table for traceability.
No Data LossConflicting field values are resolved through merge policy (e.g., most recent, most complete, manual selection).
Event EmissionA ContactMerged or AccountMerged event is emitted so downstream contexts can update aliases.
No Silent MergeAutomatic merging is restricted to exact-key matches; all other matches require review.

Field Conflict Resolution

Conflict ScenarioResolution Policy
Different phone numbersBoth numbers retained; primary flagged per policy.
Different job titlesMost recent value wins unless manual override.
Different account associationsBoth associations retained where the domain supports multiple account links; otherwise manual review.
Different consent statusesMost restrictive consent status wins.
Different owner assignmentsSurviving record owner retained; merged owners noted in history.

Downstream Alias Consolidation

When a merge occurs:

  • Sales / OMS updates customer aliases on quotes and orders.
  • FMS consolidates customer master references.
  • Marketing automation merges audience segments and suppression lists.
  • Support desk updates ticket requester references.

4. Compensating Strategies

The CRM domain does not allow retroactive editing of terminal states or deletion of historical records. Corrections follow formal compensating strategies.

Why Record Destruction Is Restricted

Deleting relationship records would break:

  • The immutable audit trail required for sales and service accountability.
  • The integrity of pipeline history and commission calculations.
  • The ability to reproduce historical forecasts and reports.
  • Regulatory compliance with data retention and privacy laws.

Correction Strategies

Correction ScenarioCompensating Document / ActionDescription
Deal value error after closureDeal Amendment Note + compensating action in Sales/FMS.Original Closed-Won deal remains sealed; correction applied downstream.
Incorrect account on dealAccount Reassignment Record + alias update.Deal reassigned to correct account with audit trail; downstream aliases updated.
Wrong contact marked as decision makerBuying Center UpdateRole corrected for current and future deals; history preserved.
Ticket incorrectly resolvedTicket ReopenReopen event created; SLA recalculated; resolution history retained.
Lead incorrectly disqualifiedRequalification EventNew qualification event recorded; original disqualification reason retained.
Duplicate records discoveredMerge RecordExplicit merge with history transfer and downstream alias consolidation.
Consent status errorConsent Correction EventUpdated consent with reason; withdrawal reprocessed if necessary.

5. Sales Commission & Forecast Protection

Because Closed-Won deals are sealed, corrections that affect commissions or forecasts must be handled carefully:

ScenarioHandling Rule
Deal canceled after Closed-WonCancellation processed in Sales / OMS and FMS; original deal remains Closed-Won; commission clawback handled by compensation system.
Deal value reduced after closureCredit note or amendment processed downstream; CRM records amendment note only.
Deal wrongly attributed to ownerOwner reassignment for future reporting only; historical attribution preserved for commission payout.
Forecast category misclassifiedReclassification audited; prior period forecasts remain unchanged.

6. Support Desk Audit & Compliance

Support operations require additional audit controls for service level accountability:

ControlImplementation
SLA Calculation AuditEvery SLA breach stores the complete calculation: target, elapsed time, calendar used, pause intervals.
Escalation AuditEscalations record trigger reason, previous assignee, new assignee, and timestamp.
Reopen AuditReopened tickets record customer reason, previous resolution, and new SLA calculation.
Agent Override AuditAny manual priority or SLA change requires reason code and manager approval.
Customer Satisfaction AuditCSAT responses are linked to ticket, agent, and resolution for quality reporting.

7. Summary

The CRM domain in Obelaw is a rigorous, event-driven bounded context that enforces relationship integrity through immutable records, explicit merge procedures, sealed deal states, strict SLA calculations, and privacy-aware data handling. It remains isolated from operational and financial contexts via an Anti-Corruption Layer and emits only the relationship facts necessary for downstream order creation, billing setup, inventory allocation, and engagement orchestration.

Our Premium Sponsors

Obelaw is proudly open-source. Continued development, bug fixes, and community support are made possible by the generosity of our sponsors.

Sponsor Obelaw