CloudSketch AI Logo
FeaturesTemplatesPricingEnterpriseAboutContactLog in
🌙☀️
Log inStart free
Home/Templates/Marketing, CRM & Support

📣 Marketing, CRM & Support · Database ERD

CRM Sales Pipeline Schema

Tables for a B2B sales CRM: accounts, contacts, leads, opportunities moving through stages, activities and quotes.

More Marketing, CRM & Support templates

Opening a template is free and never counts toward your daily diagrams. Asking the AI to change it counts as one.

Drawing diagram…

What this diagram shows

  • Leads convert into contacts and opportunities
  • Opportunities record their stage and expected value
  • Every call, meeting and email is logged as an activity

Prompt used

CRM database: accounts (companies) have contacts; leads are converted into a contact and an opportunity; opportunities belong to an account, have an owner, a stage, amount and close date; activities (calls, meetings, emails) link to contacts and opportunities; quotes with line items belong to an opportunity.

Mermaid code
erDiagram
  ACCOUNT ||--o{ CONTACT : employs
  ACCOUNT ||--o{ OPPORTUNITY : has
  LEAD ||--o| CONTACT : "converts to"
  SALES_USER ||--o{ OPPORTUNITY : owns
  OPPORTUNITY ||--o{ ACTIVITY : logs
  CONTACT ||--o{ ACTIVITY : involves
  OPPORTUNITY ||--o{ QUOTE : receives
  QUOTE ||--|{ QUOTE_ITEM : contains
  ACCOUNT {
    int id PK
    string name
    string industry
    string city
  }
  CONTACT {
    int id PK
    int account_id FK
    string name
    string email
  }
  LEAD {
    int id PK
    string name
    string source
    string status
  }
  SALES_USER {
    int id PK
    string name
    string team
  }
  OPPORTUNITY {
    int id PK
    int account_id FK
    int owner_id FK
    string stage
    decimal amount
    date close_date
  }
  ACTIVITY {
    int id PK
    int opportunity_id FK
    int contact_id FK
    string type
    datetime happened_at
  }
  QUOTE {
    int id PK
    int opportunity_id FK
    decimal total
    string status
  }
  QUOTE_ITEM {
    int id PK
    int quote_id FK
    string product
    int quantity
    decimal price
  }

Inside this diagram

An entity relationship diagram with 8 tables, 35 columns and 8 relationships.

Tables and their columns

  • ACCOUNT: id (PK), name, industry, city
  • CONTACT: id (PK), account_id (FK), name, email
  • OPPORTUNITY: id (PK), account_id (FK), owner_id (FK), stage, amount, close_date
  • LEAD: id (PK), name, source, status
  • SALES_USER: id (PK), name, team
  • ACTIVITY: id (PK), opportunity_id (FK), contact_id (FK), type, happened_at
  • QUOTE: id (PK), opportunity_id (FK), total, status
  • QUOTE_ITEM: id (PK), quote_id (FK), product, quantity, price

Relationships

  • ACCOUNT employs CONTACT: each ACCOUNT has zero or more CONTACT, each CONTACT belongs to exactly one ACCOUNT
  • ACCOUNT has OPPORTUNITY: each ACCOUNT has zero or more OPPORTUNITY, each OPPORTUNITY belongs to exactly one ACCOUNT
  • LEAD converts to CONTACT: each LEAD has zero or one CONTACT, each CONTACT belongs to exactly one LEAD
  • SALES_USER owns OPPORTUNITY: each SALES_USER has zero or more OPPORTUNITY, each OPPORTUNITY belongs to exactly one SALES_USER
  • OPPORTUNITY logs ACTIVITY: each OPPORTUNITY has zero or more ACTIVITY, each ACTIVITY belongs to exactly one OPPORTUNITY
  • CONTACT involves ACTIVITY: each CONTACT has zero or more ACTIVITY, each ACTIVITY belongs to exactly one CONTACT
  • OPPORTUNITY receives QUOTE: each OPPORTUNITY has zero or more QUOTE, each QUOTE belongs to exactly one OPPORTUNITY
  • QUOTE contains QUOTE_ITEM: each QUOTE has one or more QUOTE_ITEM, each QUOTE_ITEM belongs to exactly one QUOTE

Make your own diagram like this

Describe your own system in plain English and the AI ER diagram generator draws it in seconds, in the same style as this template.

Related templates

C4 ArchitectureProMarketing, CRM & Support

Customer Data Platform

A customer data platform that joins a customer's activity from website, app, store and support into one profile, and sends audiences to marketing tools.

State MachineMarketing, CRM & Support

Helpdesk Ticket Lifecycle

The states of a customer support ticket, from creation through assignment, waiting on the customer, resolution and reopening.

FlowchartMarketing, CRM & Support

Contact Centre Call Routing

How an incoming support call is routed: caller recognition, IVR menu, self-service options and routing to the right skilled agent queue.

SequenceMarketing, CRM & Support

Email Campaign Send Sequence

How a marketing email campaign is sent: audience built, consent checked, emails personalised and sent in batches, and opens and clicks tracked.

SankeyMarketing, CRM & Support

Marketing Funnel

How visitors flow from marketing channels to sign-ups, trials and paying customers in a month, to see which channel brings buyers, not just traffic.

SequenceMarketing, CRM & Support

WhatsApp Support Bot with Agent Handover

How a WhatsApp support bot answers common questions and hands the chat to a human agent, with the full conversation, when it can't help.