CRM

CRM - Domain Invariants & Business Rules

The immutable business laws governing CRM identity integrity, deal finality, SLA enforcement, and lead disqualification.

Domain Invariants & Business Rules (“The Law”)

The CRM domain enforces a strict set of business invariants. These rules are non-negotiable constraints that protect relationship integrity, sales forecast accuracy, service commitments, and regulatory compliance.


1. Identity Uniqueness & Deduplication

Contacts and Accounts must enforce identity integrity based on canonical email and phone keys. Duplicate records require explicit merging rather than silent overwriting.

Uniqueness Rules

RuleInvariant
Canonical Email KeyA contact’s primary email address is normalized and treated as a canonical identity key.
Canonical Phone KeyA contact’s primary phone number is normalized (country code, digits only) and treated as a secondary identity key.
Account Name DeduplicationAccounts are deduplicated by a combination of legal name, domain, and tax identifier where available.
No Silent OverwritesWhen a duplicate is detected, the system requires an explicit merge decision; data is never silently overwritten.
Merge PreservationMerging records preserves all historical touchpoints, deals, tickets, and campaign attributions under the surviving record.

Duplicate Detection Hierarchy

Match ConfidenceAction
ExactPrimary email or phone matches exactly.
HighName + company + phone/email domain match.
MediumName + company or name + email domain match.
LowPartial name or domain similarity.

Exact and high-confidence matches trigger merge review; medium and low matches are surfaced as suggestions.


2. Non-Reversible Deal Won State

Once a Deal reaches Closed-Won, its commercial parameters are sealed permanently. Retroactive manipulation of the pipeline stage, value, or close date is forbidden.

Closed-Won Rules

RuleInvariant
Stage LockClosed-Won deals cannot be moved back to an open pipeline stage.
Value FreezeDeal value, currency, close date, and win probability are sealed at closure.
Downstream TriggerDealWon event triggers downstream orchestration in Sales, FMS, and potentially Inventory.
Correction PathErrors discovered after closure are corrected through compensating documents (credit, cancellation, or amendment), not by reopening the deal.

Business Consequence

Closed-Won is a terminal, irreversible state. If a deal was recorded incorrectly:

  • A Deal Amendment record may document the correction.
  • A Credit / Cancellation may be initiated in Sales or FMS.
  • A new deal may be created for renewed or expanded business.

The original Closed-Won record remains intact for forecast and commission audit purposes.


3. Strict SLA Timers

Ticket SLA breaches are mathematically determined based on operational calendar hours. SLA timers cannot be bypassed, paused arbitrarily, or manually extended without documented reason.

SLA Timer Rules

RuleInvariant
Calendar-Based CalculationSLA elapsed time counts only within configured business hours and time zone.
Customer Wait PauseTimer pauses when ticket status is “Awaiting Customer Response” and resumes on customer reply.
No Manual ExtensionSLA targets cannot be manually extended; extensions require escalation policy or SLA plan change with audit reason.
Breach DeterminationBreach is determined when elapsed operational time exceeds target, regardless of agent assignment or workload.
Escalation CascadeBreach triggers predefined escalation rules that cannot be overridden by the assigned agent.

SLA Calculation Formula

$$ \text{Elapsed SLA Time} = \sum (\text{Business Hours Intervals During Active Status}) $$

$$ \text{SLA Breach} = \text{Elapsed SLA Time} > \text{SLA Target} $$


4. Explicit Disqualification Audit

A Lead cannot transition to Disqualified without capturing a validated reason code. Disqualification is a deliberate, auditable action.

Disqualification Rules

RuleInvariant
Mandatory Reason CodeEvery Disqualified lead must have a reason code selected from a controlled list.
Free-Text ElaborationOptional but encouraged detail explaining the disqualification context.
Requalification PathA disqualified lead can be requalified later, but the original disqualification reason remains in the audit history.
No Reversion Without AuditReverting a Disqualified lead to an active state requires a new qualification event and reason.

Standard Disqualification Reason Codes

Reason CodeUse Case
No BudgetLead lacks funding or approved budget.
No AuthorityLead cannot influence or approve purchase.
No NeedProduct/service does not address lead’s need.
No TimelineNo foreseeable purchase timeframe.
Wrong GeographyLead operates outside serviceable region.
CompetitorLead is affiliated with or represents a competitor.
Invalid DataContact information is fake, bounced, or unreachable.
Not a FitLead profile does not match ideal customer criteria.

Contact and account records must respect privacy regulations and consent preferences. Marketing communications require valid consent or legitimate interest justification.

RuleInvariant
Consent RequiredMarketing emails and calls require documented consent or legal basis.
Consent TimestampEvery consent record includes source, timestamp, and method.
Withdrawal honoredOpt-out or consent withdrawal is applied immediately and propagated to engagement tools.
Minimal Data CollectionOnly data necessary for the stated purpose is collected and retained.

Right to be Forgotten

  • Personal data may be pseudonymized to preserve historical transactional integrity while removing identifiable attributes.
  • Anonymized records retain activity metadata but cannot be reassociated with the individual.
  • Deletion is only performed where legal basis no longer exists and no overriding business or legal obligation requires retention.

6. Activity Attribution Integrity

Every touchpoint must be attributable to a contact, account, or lead. Orphan activities are not permitted.

Attribution Rules

RuleInvariant
Required ParentEvery touchpoint links to at least one Contact, Account, Lead, Deal, or Ticket.
Owner AssignmentEvery touchpoint has an owner or agent responsible for the action.
Timestamp IntegrityTouchpoint timestamp cannot be in the future and should not be modified after creation except for correction with audit.
Campaign LinkageMarketing touchpoints must reference the originating campaign where applicable.

7. Pipeline Stage Progression Rules

Deals must advance through pipeline stages in defined order unless explicitly configured for skip or regression.

Progression Rules

RuleInvariant
Sequential AdvancementDeals advance to the next stage in order unless an explicit skip policy exists.
No Skip Without CriteriaSkipping stages requires completed required activities or manager authorization.
Backward Movement AuditMoving a deal to an earlier stage requires reason code and is recorded in audit history.
Stage RottingDeals exceeding maximum days in stage trigger stale-deal alerts for sales management.

8. Summary of “The Law”

InvariantViolation Consequence
Contacts and accounts must be unique; duplicates require explicit merge.Duplicate creation blocked or queued for merge review.
Closed-Won deals are sealed and irreversible.Retroactive stage/value changes rejected; corrections via compensating documents.
SLA breaches are determined by calendar math, not agent discretion.Breach event emitted; escalation cascade triggered.
Disqualification requires validated reason code.Transition to Disqualified blocked until reason provided.
Privacy consent must be documented and honored.Communication suppressed; compliance alert raised.
Touchpoints require attribution and owner.Activity creation rejected or flagged as orphan.
Pipeline stage progression follows defined rules.Invalid stage transition blocked or audited.

These invariants collectively ensure that the CRM domain remains the authoritative source of truth for commercial relationships while preserving forecast integrity, service accountability, and regulatory compliance.

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