ServicesSalesforce consultingArchitectureImplementationOrg health checkDevelopmentIntegrations and APIsData migrationTesting and QAManaged supportSpecialist supportMarketing Cloud auditDeliverability
SolutionsMarketing Cloud EngagementMarketing Cloud NextSalesforce + BrazeAccount EngagementData Cloud (Data 360)Identity resolutionInsights and segmentsAgentforce and AIMCP integrationsSales and Service CloudReal-time personalisationIntegration solutionsEnterprise AI integrationBy industry
ArchitectureSalesforce CRMData 360Salesforce + BrazeAgentforceCustomer 360API-led integrationEvent-drivenMCP host, client and serverIdentity and consentMCP securityData governanceCI/CD and releasesOur public MCP server
ResourcesEngineering journalDecision guidesSolution blueprintsSalesforce productsProjects and achievementsSales ROI calculatorWhere we workChecklists and templatesPlanning toolsReadiness assessmentGlossaryAbout GeekMidstOur approachOur expertiseContact
CompanyAbout GeekMidstOur approachDelivery methodologyTrust and evidenceProjectsAchievementsBook a consultationContactWhere we workSecurity and data
Book a Consultation

Designing a Salesforce Data Model That Scales

The decisions that matter most in a Salesforce data model: grain, ownership, relationship types, data skew and volume, plus a review process to follow before you build.

Type
Article
Topic
CRM & Engineering
Reading time
6 min
Updated
Author
GeekMidst Team
Reviewed by
Site owner
Consultant reading a message on a laptop and sketching a reply on a notepad by a window

Most Salesforce data model problems are invisible on day one. They show up two years later as record locking errors during data loads, reports that time out, sharing recalculations that run for hours, or a custom object nobody dares to change because twelve integrations write to it. Designing a Salesforce data model that scales means making a handful of decisions deliberately at the start, and writing them down.

Checklist of six data model review steps: entities and grain, ownership and sharing, volumes, keys and sources, reporting needs and integration and security review
Agree grain, ownership, volumes and keys before building in Setup, and record each decision in the data dictionary. View full size

Workflow diagram

Explore how the pieces fit together. Select a step to read what happens there.

Workflow

Account and contact relationships

Open full size
Account and contact relationshipsA new contact is linked to a primary account. If the person also works with other organisations, indirect account contact relationships record those roles. Accounts sit in a parent hierarchy, account teams and opportunity contact roles are added, and the account page shows the full picture.Account and contact relationshipsSales repContactAccountOpportunityYesNoContact added: Manual or lead conversion. Contacts are people and accounts are organisations. Duplicate rules should check for an existing contact before a new one is saved.Contact addedManual or leadconversionContact record: Primary account set. The Account field on the contact is the direct relationship. It drives ownership and sharing, so choose the organisation the person mainly works for.Contact recordPrimary account setOther accounts too?. Consultants, board members and people at subsidiaries often work with several organisations. Contacts to Multiple Accounts handles this without duplicate contacts.Other accountstoo?Account contact relationship: Indirect, with roles. Each indirect relationship records roles and active dates. Related lists on both the account and the contact show who is connected, past and present.Account contactrelationshipIndirect, with rolesParent account: Groups subsidiaries. The Parent Account field links subsidiaries to a parent, so the hierarchy view shows the group. Totals across levels need reports or automation.Parent accountGroups subsidiariesAccount team: Roles and record access. Account teams list who works the account, such as the owner, a solutions engineer and a service lead, and can grant them extra access to it.Account teamRoles and recordaccessContact roles: Decision maker, influencer. Opportunity contact roles show who is involved in each deal, such as decision maker or influencer, and help spot deals with no senior contact in time.Contact rolesDecision maker,influencerAccount view: People, roles, hierarchy. The account page shows direct and indirect contacts, the group structure, the team and open deals: the context reps and service agents need.Account viewPeople, roles,hierarchyStartDataDecisionPerson or teamEnd or outcomeOriginal GeekMidst explanatory diagram, not an official Salesforce reference.

Select any step in the diagram, or use Step through, to see what happens at that point and why.

Text version: every step in order
  1. Contact added Sales repManual or lead conversion

    Contacts are people and accounts are organisations. Duplicate rules should check for an existing contact before a new one is saved.

    Next: Contact record

  2. Contact record ContactPrimary account set

    The Account field on the contact is the direct relationship. It drives ownership and sharing, so choose the organisation the person mainly works for.

    Next: Other accounts too?

  3. Other accounts too? Contact

    Consultants, board members and people at subsidiaries often work with several organisations. Contacts to Multiple Accounts handles this without duplicate contacts.

    Next: Yes: Account contact relationship; No: Parent account

  4. Account contact relationship AccountIndirect, with roles

    Each indirect relationship records roles and active dates. Related lists on both the account and the contact show who is connected, past and present.

    Next: Parent account

  5. Parent account AccountGroups subsidiaries

    The Parent Account field links subsidiaries to a parent, so the hierarchy view shows the group. Totals across levels need reports or automation.

    Next: Account team; Contact roles

  6. Account team Sales repRoles and record access

    Account teams list who works the account, such as the owner, a solutions engineer and a service lead, and can grant them extra access to it.

    Next: Account view

  7. Contact roles OpportunityDecision maker, influencer

    Opportunity contact roles show who is involved in each deal, such as decision maker or influencer, and help spot deals with no senior contact in time.

    Next: Account view

  8. Account view AccountPeople, roles, hierarchy

    The account page shows direct and indirect contacts, the group structure, the team and open deals: the context reps and service agents need.

    End of the flow.

A new contact is linked to a primary account. If the person also works with other organisations, indirect account contact relationships record those roles. Accounts sit in a parent hierarchy, account teams and opportunity contact roles are added, and the account page shows the full picture. Original GeekMidst explanatory diagram; not an official Salesforce reference architecture.

Start from the business questions, not the screens

Before creating any object, list the questions the business needs to answer and the processes that create data. "Which accounts renewed late last quarter?" tells you that renewals are records with dates, not a checkbox on Account. Then decide, for each entity:

  • Grain. What does one record represent? An order or an order line? A subscription or a subscription period? Getting grain wrong is the most expensive mistake to undo.
  • Ownership and visibility. Who owns these records and who needs to see them? This drives the choice between lookup and master-detail more than anything else.
  • Volume and growth. Roughly how many records now, and in three years? Ten thousand and ten million need different designs.
  • Source of truth. Is Salesforce the system of record, or a copy of data mastered elsewhere? Copies need an external ID and a clear sync direction.

Prefer standard objects where they genuinely fit

Standard objects such as Account, Contact, Opportunity, Case, Product and Order come with built-in behaviour, reporting and integration support that you would otherwise rebuild. Use them when the meaning matches. Do not force a concept into a standard object just to avoid a custom one: a site visit stored as a Task with ten custom fields is harder to report on and secure than a small custom object.

Choose relationships on purpose

Relationship type decides delete behaviour, sharing, roll-ups and locking. The table summarises the trade-offs.

Relationship types compared

LookupMaster-detailJunction object
Parent requiredOptional by defaultAlwaysBoth parents required
Deleting the parentConfigurable; child is usually keptChildren are deleted tooJunction records are deleted with either parent
Sharing and ownershipChild has its own ownerChild inherits from the parentAccess depends on both parents
Roll-up summary fieldsNot available nativelyAvailableAvailable on both parents
Best forOptional or loose linksRecords that cannot exist without the parentMany-to-many relationships

Master-detail is attractive because of roll-up summaries, but child records inherit sharing from the parent and saving a child can lock the parent. If a parent will accumulate a very large number of children, or the children need their own owner, a lookup with Flow or Apex maintaining any summaries may scale better.

Watch for data skew

Data skew is when too many child records point at one parent, or one user owns too many records. Salesforce guidance commonly uses around 10,000 child records per parent as the point where skew starts to cause trouble. Typical symptoms are UNABLE_TO_LOCK_ROW errors during bulk loads and slow sharing recalculation after ownership or role changes.

Common causes are a catch-all "Unknown" account that collects orphaned contacts, an integration user that owns every record, and lookups to a single placeholder record. Fix the design rather than the symptom: distribute records across real parents, assign ownership meaningfully and avoid placeholder parents.

You can spot account skew with an aggregate query like the one below. On very large objects it may time out, so run it in a full sandbox or against an extract.

soql
SELECT AccountId, COUNT(Id) contactCount
FROM Contact
WHERE AccountId != null
GROUP BY AccountId
HAVING COUNT(Id) > 10000
ORDER BY COUNT(Id) DESC
LIMIT 50
Finds accounts with more than 10,000 contacts. Swap the object and lookup field to check other relationships.

Design for large data volumes early

When an object will hold millions of rows, query selectivity matters. Filters on indexed fields, such as Id, Name, OwnerId, lookup fields, external IDs and unique fields, let the query optimiser avoid full scans. Mark integration keys as External ID so upserts and filters use an index. Avoid leading wildcards in LIKE filters and filtering on formula fields in high-volume queries. For data that must be kept but is rarely used, plan archiving from the start, whether into Big Objects, an external store or a data platform. Thresholds and indexing options change over time, so check current large data volume guidance in Salesforce Help.

Keep the model understandable

Scale is also about people. A model that only its original builder understands does not scale to a team.

  • Give every custom object and field a description and help text that explains what it means, not what type it is.
  • Use consistent API names and avoid suffixes like Status2__c.
  • Use record types for genuinely different processes on the same entity, not for every layout variation.
  • Use picklists for short, stable value lists and a reference object for lists that change often or carry their own attributes.
  • Keep a data dictionary and update it whenever fields change.

A design review before you build

  1. 01

    Map entities and grain

    List each entity, what one record represents and the process that creates it. Agree this with the business before anything is built in Setup.

  2. 02

    Assign ownership and sharing

    Decide who owns each object and its org-wide default. For most relationships this settles lookup versus master-detail.

  3. 03

    Estimate volumes

    Record current counts and three-year growth per object, and flag anything likely to reach millions of rows or create skew.

  4. 04

    Define keys and sources

    Name the system of record and the external ID for every object fed by an integration, and the direction of sync.

  5. 05

    Check reporting needs

    Confirm that key reports can be built from the proposed relationships without duplicated data or awkward report types.

  6. 06

    Review with integration and security owners

    Walk through the model with whoever owns integrations and data protection, then record the decisions in the dictionary.

Questions we hear

Should we use one object with record types or several objects?
If the records share most fields, the same ownership model and the same reporting needs, one object with record types is simpler. If they have different security requirements or very different fields, separate objects are usually cleaner.
Can we change a lookup to master-detail later?
Often yes, but every existing child record needs a parent value first, and the change alters sharing and delete behaviour. Rehearse it in a full sandbox with production-like data.
How many custom fields is too many on one object?
Hard limits depend on edition, so check current limits for your org in Salesforce Help. Long before the limit, very wide objects become hard to maintain, which usually means one object is holding more than one concept.
When should data live outside Salesforce?
High-volume, rarely edited data such as raw event logs or historic transactions is often better kept in a data platform and surfaced as summaries, external objects or through Data Cloud.

Review your data model before it hardens

We can review an existing or proposed data model for skew, sharing and volume risks, and give you written recommendations with the trade-offs explained.

Request an architecture review →

Tell us what you are trying to fix.

Share your Salesforce setup, goals and constraints. A practitioner reads every message and replies with questions, first thoughts or an honest view of whether you need outside help at all.

Talk to a Salesforce Expert
Book a Consultation