
📣 Marketing, CRM & Support · Database ERD
Tables for a B2B sales CRM: accounts, contacts, leads, opportunities moving through stages, activities and quotes.
Drawing diagram…
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.
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
}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.
The states of a customer support ticket, from creation through assignment, waiting on the customer, resolution and reopening.
How an incoming support call is routed: caller recognition, IVR menu, self-service options and routing to the right skilled agent queue.
How a marketing email campaign is sent: audience built, consent checked, emails personalised and sent in batches, and opens and clicks tracked.
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.
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.