Salesforce Dictionary - Free Salesforce GlossarySalesforce Dictionary
Full Entity Relationship Diagram (ERD) entry
How-to guide

How to generate an ERD for a Salesforce org

Generating an ERD takes 15 minutes to 8 hours depending on org complexity and tool chosen. Schema Builder is fastest for ad-hoc visualization; third-party tools produce more polished documentation.

By Dipojjal Chakrabarti · Founder & Editor, Salesforce DictionaryLast updated May 21, 2026

Generating an ERD takes 15 minutes to 8 hours depending on org complexity and tool chosen. Schema Builder is fastest for ad-hoc visualization; third-party tools produce more polished documentation.

  1. Open Schema Builder

    Setup, then Schema Builder. The canvas opens with no objects displayed. Use the left sidebar to add objects to the canvas.

  2. Add objects to the canvas

    Select the objects relevant to your ERD. Common starting points: Account, Contact, Opportunity, Case, and any custom objects that integrate with them. The relationships draw automatically as you add objects.

  3. Adjust the layout

    Drag objects around the canvas to make the diagram readable. Group related objects together. Schema Builder does not auto-layout; you arrange manually.

  4. Export or screenshot

    Schema Builder lets you take a screenshot of the canvas or export as PDF. For richer formats, use a third-party tool that connects via the Tooling API.

  5. Connect a third-party ERD tool (optional)

    Lucidchart and draw.io support Salesforce connectors. Sign in to your org through the tool, select objects to include, and the tool renders an ERD with standard ERD notation, better styling, and export options.

  6. Save and share the ERD

    Save the ERD to your documentation system (Confluence, Notion, GitHub). Update it on a defined cadence (quarterly is common) or after every major schema change.

Key options
Schema Builder (built-in)remember

Salesforce''s interactive ERD tool. Drag-and-drop, decent for ad-hoc visualization, limited for formal documentation.

Lucidchart Salesforce Connectorremember

Cloud diagramming tool with a Salesforce data import. Better visual styling and export.

Dataedo for Salesforceremember

Documentation tool specializing in metadata-driven ERDs. Generates documentation alongside the diagrams.

Custom Tooling API scriptsremember

Build your own ERD generator by querying EntityDefinition and EntityParticle and emitting Mermaid, GraphViz, or another diagram format.

Gotchas
  • Schema Builder does not export usable XML for sharing. Screenshots are the workaround; third-party tools produce richer formats.
  • Auto-generated ERDs from large orgs are overwhelming. A 500-object diagram is unreadable; group related objects into multiple smaller ERDs.
  • Relationship types are not always obvious in ERDs. Master-detail vs lookup is critical for behavior; annotate clearly when the tool''s defaults are ambiguous.
  • Living ERDs drift quickly. Without a process to update them after schema changes, they become misleading documentation rather than authoritative.

See the full Entity Relationship Diagram (ERD) entry

Entity Relationship Diagram (ERD) includes the definition, worked example, deep dive, related terms, and a quiz.