Skip to content

PranavNagrecha/AwesomeSalesforceSkills / skills/admin/data-model-documentation

data-model-documentation

Verified

Use when a BA or admin needs to document the Salesforce data model: creating field inventories, object relationship maps, ER diagrams, or analyzing field usage across objects. Triggers: 'data dictionary', 'document our data model', 'object relationship map', 'field inventory', 'ER diagram for Salesforce'. NOT for designing the model or choosing lookup vs master-detail — use data/data-model-design-patterns. NOT for generating the Mermaid or PlantUML diagram — use architect/salesforce-erd-and-diagramming. More trigger keywords: field inventory CSV, describe API, getGlobalDescribe, DescribeFieldResult, sObject describe, schema snapshot, schema drift, blank field descriptions, undocumented fields, field ownership, data dictionary review cadence.

templates/data-model-documentation-template.md

View on GitHub
# Data Model Documentation — Work Template

Use this template to produce a complete data model documentation package for a Salesforce org or a scoped set of objects.

This is the **human-facing** document. The machine-lintable companion is `data-dictionary.yaml`, checked by
`scripts/check_data_model_documentation.py --file`; fill that one first and derive the tables below from it,
so the two cannot drift. The generators that populate both are in `references/worked-examples.md`.

---

## Scope

**Objects in scope:** (list each object API name)

**Requested format:** Field inventory / ER diagram / relationship map / data dictionary / all of the above

**Audience:** Developer / Business stakeholder / Integration partner / Audit/compliance

**Source:** Live org Setup access / Metadata API retrieve / Both

---

## Object Inventory

For each object in scope:

| Object Label | Object API Name | Type (Standard/Custom) | Description / Business Purpose |
|---|---|---|---|
| | | | |

---

## Field Inventory

Repeat this table per object, or use a combined table with an Object column.

**Object: `<ObjectName>`**

| Field Label | API Name | Type | Required | External ID | Description | Owner/Team | Notes |
|---|---|---|---|---|---|---|---|
| | | | | | | | |

Columns explained:
- **Type**: Text, Number, Date, Lookup(Object), Master-Detail(Object), Picklist, Formula, etc.
- **Required**: Yes / No
- **External ID**: Yes / No — marks fields used as integration keys
- **Description**: The field's documented purpose (from metadata Description property)
- **Owner/Team**: Which team or system uses this field
- **Notes**: Deprecated, in-use, being migrated, etc.

---

## Object Relationship Map

| Parent Object | Relationship Type | Child Object | Relationship Field API Name | Cascade Delete? |
|---|---|---|---|---|
| | Lookup | | | No |
| | Master-Detail | | | Yes |
| | Junction (via) | | | — |

**Polymorphic lookups (document separately):**

| Field | Parent Object | Valid Target Objects |
|---|---|---|
| Task.WhoId | Task | Contact, Lead |
| Task.WhatId | Task | Account, Opportunity, Case, Contract, ... |

---

## ER Diagram

*(Attach Schema Builder screenshot or draw.io export here)*

Annotations:
- Bold/thick lines = Master-Detail (cascade delete)
- Thin lines = Lookup (no cascade)
- Dashed lines = Polymorphic lookup (multiple valid targets)

---

## Documentation Debt — Fields With No Description

The following custom fields have empty Description values and require documentation:

| Object | Field API Name | Type | Assigned To |
|---|---|---|---|
| | | | |

---

## FLS Summary (if in scope)

For sensitive fields, document which permission sets grant access:

| Object | Field API Name | Read Access (Permission Sets) | Edit Access (Permission Sets) |
|---|---|---|---|
| | | | |

---

## Delivery Checklist

- [ ] All in-scope objects and their custom fields are in the field inventory
- [ ] Standard fields on standard objects noted from Object Reference (not from metadata retrieve)
- [ ] All relationship fields show parent object, relationship type, and cascade behavior
- [ ] Polymorphic lookups documented separately
- [ ] ER diagram attached and reviewed against the field inventory
- [ ] Documentation debt list produced and assigned
- [ ] FLS summary completed for any sensitive fields (if required by scope)
deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall