# What data governance practices ensure long-term database hygiene across enterprise Service Cloud environments?

**Topic:** Service Cloud · **Difficulty:** Medium · **Tags:** Service Cloud, Data Governance, Database Hygiene

Read it on the site: https://www.forcechallenges.com/interview-questions/what-data-governance-practices-ensure-long-term-database-hygiene-across-enterprise-service-cloud-environments

## Answer

**Basics:** Data governance is the set of rules for who owns data, what quality is required, how long it is kept and when it is removed. In Service Cloud, cases, emails, attachments and activities grow quickly, which hurts storage, report speed, search relevance and agent trust. Governance keeps this under control.

**How it works:**
1. Prevent bad data: required fields, validation rules, picklists with restricted values, record types, dependent picklists, Flow-based checks.
2. Prevent duplicates: Matching Rules and Duplicate Rules on Contact, Account, Lead, and clean-up with merge.
3. Control change: Field History Tracking (20 fields per object, 18 months in the UI, 24 months via API), plus Shield Field Audit Trail for long retention (up to 10 years, verify limits in current docs).
4. Retain and archive: define retention by case age and status (for example close plus 2 years); export or move old records to Big Objects, an external store or a backup/archive product, then delete.
5. Delete safely: deleted records stay in the Recycle Bin for 15 days; hard delete or Bulk API hardDelete when truly required (for example privacy requests).
6. Monitor: dashboards on storage use (Setup > Storage Usage), null rates, duplicate counts and stale records.

**Advanced / deep dive:** Treat governance as a lifecycle: capture, validate, enrich, use, archive, delete. Align with legal requirements (GDPR/CCPA deletion and consent). Use sharing and field-level security so only stewards edit critical fields. At enterprise scale prefer a central data council, metadata standards (naming, field descriptions), and an unused-field review using Field Trip-style analysis or Salesforce Optimizer successors. Large-volume deletes and archive need Bulk API with serial mode to avoid lock contention, and skinny tables or indexed filters for performance on big case tables. Archive design must keep references (an archived case ID in a Big Object or external system) so customers can still be served.

**Code / config example:** Validation rule example so a closed case cannot lack a resolution:
```
AND(ISPICKVAL(Status, "Closed"), ISBLANK(Resolution__c))
```

**Hidden gotchas & must-remember points:**
- Validation rules fire on every save path including integrations and data loads, so plan bypass via a custom permission, not hardcoded user IDs.
- Field history is not retroactive and does not store long text areas.
- Recycle Bin purge after 15 days is automatic; there is no undelete afterward.
- Deleting cases cascades to related activities and attachments.
- Archiving to a Big Object loses standard reporting and sharing features.
- Duplicate Rules do not stop records created via some paths unless configured to alert or block.

**Best practice:** Document a retention schedule per object, automate archival, and review data quality metrics monthly with named data stewards.

---
Source: ForceChallenges · last updated 2026-11-02
