salesforce-object-design
Installation
SKILL.md
Salesforce Object Design
Custom objects in Salesforce extend the data model beyond standard objects (Leads, Contacts, Accounts, Opportunities). They store data that doesn't fit standard objects: product usage events, partner records, subscription data, or custom scoring models. Good object design keeps data organized, queryable, and reportable. Bad object design creates a spaghetti data model that nobody can navigate.
The principle: use standard objects for standard data. Only create custom objects when standard objects genuinely can't hold the data you need. Every custom object adds maintenance, permission management, and reporting complexity. Earn the complexity.
When to Create a Custom Object
Decision framework
| Question | If yes | If no |
|---|---|---|
| Does this data naturally belong on Lead, Contact, Account, or Opportunity? | Add a custom field to the standard object | Consider a custom object |
| Will this data have multiple records per parent? (1-to-many) | Custom object (e.g., multiple subscriptions per account) | Custom field on the parent |
| Does this data need its own page layout and record type? | Custom object | Custom field |
| Will multiple standard objects reference this data? | Custom object with lookup relationships | Custom field on one object |
| Do you need to report on this data independently? | Custom object (reportable as its own entity) | Custom field |