# CRM hygiene definitions: <CRM and account name>

Fill this before counting anything. Every rule here becomes a line in the rules file (assets/rules-template.json) or a decision in `martech-context/decisions.md`. A rule with no workflow behind it is not a rule.

## Workflows the data must support

- <workflow, for example "inbound demo requests reach an owner within one business day">: fields, associations and freshness it needs
- <workflow, for example "renewal reminders go to the customer's account owner">: ...
- <workflow, for example "customer-only emails reach customers and nobody else">: ...

## Populations

- Marketing population: <HubSpot marketing contacts | records with an email and not opted out | other definition>
- Customers: <lifecycle value | closed-won deal | billing flag column>
- Open deals: <stages that count as open, per pipeline>
- Owner-required records: <lifecycle stages, open deals, customers, unconverted leads>
- Excluded from every rate: test and internal records (domains below), plus <other exclusions with a reason>

## Required fields (object, field, population, critical yes or no, workflow it serves)

- contacts, <field>, <population>, <yes | no>, <workflow>
- companies, <field>, <population>, <yes | no>, <workflow>
- deals, <field>, <population>, <yes | no>, <workflow>
- What blank means for each: <unknown | not applicable | failed transfer>

## Allowed values

- <object.field>: <value list, or "see data-dictionary.md">

## Owners

- Who must own what: <open deals, customers, owner-required stages>
- Objects whose customers need their own owner (FAIL when missing): <contacts and companies (default) | companies only | contacts owned through their company>. Rules file: `owner_critical_customer_objects`, plus `contact_owner_from_company` true when a contact counts as owned through an associated company with an active human owner
- Owner rule: <routing policy name and owner of the policy>; reassignment never by rotation without it
- Integration users that may own records: <none | list with the reason>

## Lifecycle and stages

- Lifecycle order: <earliest to latest>
- Stages that need an owner: <list>
- Closed-won values: <list>. Closed-lost values: <list>
- Pipelines and their stages: <pipeline: stage list>
- Deal types allowed to close with no amount: <list or none>
- Lost reason required: <yes | no>

## Stale windows

- Open deal past close date: <30> days before it counts as stale
- No activity on an open deal: <60> days, or per pipeline: <list>
- Dormant marketing contact: <365> days without contact-initiated engagement
- Never engaged: created more than <180> days ago

## Identity

- Account boundary: <legal entity | billing account | business unit>, decided <date> in decisions.md
- Unique keys: contacts <header>, companies <header>, deals <header>, leads <header>
- Internal domains: <list>. Test domains: <list>
- Dot-insensitive mail domains: <default gmail.com, googlemail.com>
- Extra personal mail domains: <list>

## Exemptions and threshold overrides

- <check ID> <record IDs or rule change>: decisions.md entry <date and title>

## Approvers (roles)

- CRM owner (merges, bulk changes): <role>
- Privacy owner (consent in merges, suppression): <role>
- Retention owner (deletion): <role>
- Routing owner (owner reassignment): <role>
- Report owners told before numbers move: <roles>
