Design a CRM (Customer Relationship Management)

Hard45 min
1 / 30
System design answer

Design a CRM (Customer Relationship Management)

Hard45 min30 sections
understanding•11 min read

Problem Statement: A Multi-Tenant System of Record for Customer Relationships

Frames CRM as a metadata-driven, multi-tenant system of record, not a CRUD app with a contact table.

Problem statement

Design a multi-tenant CRM platform where many separate organizations track leads, contacts, accounts, opportunities, pipeline stages, tasks, calls, emails, notes, and documents. Each org defines its own custom fields, pipeline stages, and dashboards. Sales reps work concurrently against shared records, managers watch live pipeline rollups, and admins reconfigure schema without downtime or data loss.

This is not a generic web application. A CRM is a system of record: losing a lead, duplicating a contact, silently dropping a stage change, or leaking one tenant's pipeline into another tenant's dashboard are all existential failures. The platform must therefore combine four hard properties that rarely appear together in interview questions.

Why the problem is distinctive

First, the schema is per-tenant. One org tracks leads with industry and region; another adds 40 custom fields, two custom objects, and a seven-stage pipeline. The storage engine must absorb arbitrary tenant-defined structure without an ALTER TABLE per tenant and without degrading query performance for everyone else. Salesforce famously solved this with a metadata-driven architecture where tenant custom objects and fields are rows in shared platform tables rather than physical tables; the same idea, in different forms, powers HubSpot, Dynamics 365 Dataverse, and Zoho.

Second, security is hierarchical and record-level. Visibility is not just role-based access to screens; it is evaluated per record using ownership, role hierarchy, and explicit sharing grants. A rep sees their own leads; their manager sees the team's; a partner sees only shared accounts. This evaluation sits on every read path and must be both correct and fast.

Third, the system must produce real-time aggregate views, pipeline value by stage, win-rate by rep, activity volume by week, over data that is being mutated continuously by thousands of concurrent users, without crushing the transactional database.

Fourth, CRM data arrives from many channels at once: web-to-lead forms, CSV imports, email sync, telephony logs, and third-party integrations. Each channel is a duplication and ordering hazard, so ingestion needs idempotency and matching, not just insert statements.

Public operating baseline versus design assumptions

The category is operationally real and enormous. Salesforce publicly reports serving more than 150,000 customers on shared multi-tenant infrastructure and is the largest CRM vendor by revenue. HubSpot reported more than 235,000 customers across more than 120 countries for fiscal year 2024. Pipedrive publicly states over 100,000 customers. These are company-reported figures that establish scale context; they are not requirements for our fictional system.

For capacity planning, this answer explicitly assumes a mature multi-tenant CRM with 5,000 tenant organizations, 500,000 total seats, 300,000 daily active users, 25 million lead records, 8 million contacts, 4 million open-and-closed opportunities, and 15 million activity events per day, with a five-times event peak. Unless a number is tied to a named company, it is a stated design assumption.

The four architectural planes

  1. Experience plane: web and mobile apps, list views, record pages, kanban pipeline boards, dashboards.
  2. Object and metadata plane: the system of record, tenant schema definitions, sharing evaluation, validation rules.
  3. Activity and integration plane: email sync, call logging, webhooks, imports, connectors, all normalized into one activity stream.
  4. Analytics and governance plane: rollups, reports, audit, tenant quotas, release controls.

A strong answer keeps these planes separate: the analytics plane may lag, the integration plane may retry, but the object plane never loses a committed write and never crosses a tenant boundary.

Key Highlights

  • •A CRM is a system of record: no lost updates, no duplicate leads, no cross-tenant leakage.
  • •The schema is tenant-defined; storage must be metadata-driven, not one physical table per tenant.
  • •Security is evaluated per record using ownership, role hierarchy, and sharing grants.
  • •Public figures set context: Salesforce 150,000+ customers, HubSpot 235,000+ customers in FY2024.
  • •Design assumptions: 5,000 orgs, 300,000 DAU, 25M leads, 15M activity events/day, 5x peak.
Lead With Multi-Tenancy and System-of-Record
State in the first two minutes that this is a multi-tenant system of record: every tenant gets custom schema, record-level security, and zero-loss durability. That instantly separates a CRM design from a generic contact-manager CRUD exercise.
Do Not Draw a Single-Tenant CRUD App
A design with one users table, one leads table, and no tenant key fails the moment a second organization signs up. Tenant isolation must appear in the first diagram, not as a later afterthought.

Section Rescue Kit

Buzzwords to use:

System of RecordMetadata-Driven Schema

Safe statements:

  • "I will separate the system of record from derived analytics before choosing any database."
  • "Before drawing services, let me define what each tenant can customize and what the platform must protect."
Design a CRM (Customer Relationship Management) - System Design | WinJob | WinJob