Case studies›Real Estate CRM
REAL ESTATE CRM

Compass CRM for Real Estate — built for agents, not generic deals

How we built our own Pipedrive-grade CRM for real estate agents — with event-based lead scoring, automatic viewing invites, email orchestration, and weekly owner reports.

14 min readReal Estate CRMLead ScoringEmail Orchestration+3 more
54
Database tables
100% row-level security
203
Automated tests
green after every iteration
~1 min
Scheduled email
precision, with a per-minute scheduler
4 weeks
First commit to production
134 commits, 66 migrations

The problem: a real estate agent isn't a spreadsheet

A real estate agent's day isn't made of to-do lists — it's made of people and properties: leads from Meta ads and listing portals, viewings arranged over the phone, offers, and owners who want to know every week how the sale is going. Real estate agents typically use Pipedrive or another generic CRM. The basics work — but most of the real-estate-specific work happens outside the system: in calendars, in Gmail, in spreadsheets, and in the agent's head. The biggest pain points:
📥
Scattered leads
Leads from Meta Lead Ads, listing portals, and the website land in different places and have to be collected by hand.
🔥
Who is the "hot" buyer?
Nobody can see who has opened the price list several times or clicked to book a viewing. Call order comes down to gut feeling.
📅
Manual viewing scheduling
Times agreed by phone, calendar entries added by hand, no reminders — and every cancellation or reschedule means more manual work.
🏠
Owner reports
Sellers ask every week: how many viewings, how much interest? Putting the answer together takes half an hour each time.
💰
Commissions in a spreadsheet
Commissions on each listing (base, mortgage, legal) live in a separate spreadsheet, not in the CRM.
A generic CRM can't solve this, because it has no concept of a property, a listing agreement, or a viewing. You need a real estate data model.

Why wasn't Pipedrive enough?

Pipedrive is an excellent general-purpose sales tool. But a real estate agent doesn't manage "deals" — they manage properties, listings, and viewings, and the connections between them are what matter.
GENERIC CRM
  • Who is the customer?
  • What stage is the deal in?
  • When should I call?
REAL ESTATE OPERATING SYSTEM
  • Which property did they view, and what was their feedback?
  • Who is the most engaged buyer for this listing?
  • Did they accept the viewing invite?
  • Who needs to hear about it when the price drops?
  • How much commission is expected this quarter?
The goal wasn't a Pipedrive clone — it was a system built around how real estate agents actually work, while still covering every Pipedrive feature they use daily, so switching wouldn't feel like a step back.

Architecture decisions

Four decisions shaped the system: two separate pipelines, measurable buyer intent, humans making the calls, and zero new vendors.
🏠
Two pipelines: buyers and sellers
Leads track buyer and renter inquiries; Deals track seller listings — from the first visit to handing over the keys. Adding a new property automatically creates its listing. Contacts, viewings, and offers connect to both sides on a shared timeline.
Why? A real estate agent works in two directions at once. A generic CRM squeezes both into a single "deal" concept — here, each side follows its own logic.
🎯
Event-based lead scoring
Every buyer action earns points, and the 0–100 score places each lead in COLD, WARM, HOT, or VIP. At the VIP threshold the system assigns the lead and creates a call task automatically. Point values and thresholds are configurable in the UI.
Why? Call order is driven by real behavior, not gut feeling — the hottest buyers move to the top.
🤝
The system flags, a human decides
When a lead replies to an email, the system neither scores it nor acts on it — it surfaces the lead in a "Replied" block, where the agent decides the next step. Nothing gets archived or closed automatically.
Why? A reply could be "when can I see it?" or "thanks, not interested." A person reads that better than any automation.
🧩
No new vendors
For per-minute scheduling we didn't add a paid cron service or a pricier hosting plan — we used the pg_cron and pg_net extensions of the database we already had (Supabase).
Why? Zero ongoing cost, and the sending logic stays in one place — the Next.js app. The database only handles timing.

Pipelines and automations

The system follows every client from the first inquiry to the closed sale and the commission — and does the work for the agent wherever it can.
THE TWO PIPELINES AND SCORING
Leads — buyers and renters
leads
NewEmail sentActiveCall scheduledContactedQualifiedViewingOfferWon
Deals — seller listings
deals
Wants to sellAfter valuationOn the marketPurchase offerSale agreementHandover
Lead categories (0–100 points)
intent_score
COLD 0–29WARM 30+HOT 60+VIP 80+
AUTOMATIONS
1
Meta lead → CRM
Trigger:A Facebook/Meta lead form is submitted
Action:Lead + contact created and linked to the property, optional welcome email
Frequency:Instantly (webhook)
2
VIP threshold
Trigger:The score reaches 80
Action:Assigned to the lead agent + high-priority call task + notification + Telegram message
Frequency:Per event
3
"I'd like to see it"
Trigger:A click on the viewing request button
Action:Immediate call task + notification + Telegram, regardless of score
Frequency:Instantly
4
Activity spike
Trigger:3+ property-related clicks within 30 minutes
Action:Immediate call task — no need to wait for the score to cross the threshold
Frequency:Per event
5
Post-viewing follow-up
Trigger:A viewing is closed with positive interest
Action:Follow-up email using the default template
Frequency:When the viewing is closed

Engineering deep-dive

📈
Lead scoring
  • Price list opened 15, booking click 20, "I'd like to see it" 50, offer 35 points
  • Email opens on a graded curve: 1 → 2 → 4 points, then 0 from the 4th open — reloading a tracking pixel can't inflate the score
  • No negative points, and the stored score never decreases — but the dashboard ranking "cools" with time since the last activity (100% within an hour, 10% after 14 days)
  • Own and test contacts are automatically excluded from scoring and every automation
⏱
Precise email scheduler
  • pg_cron calls the scheduler endpoint every minute (via pg_net) — processing never depends on someone opening the CRM
  • Recipients are claimed with FOR UPDATE SKIP LOCKED: two parallel runs can never send twice
  • Suppression list (bounces, complaints, unsubscribes) and normalized-address deduplication before every send
  • Viewing reminders run on the same engine — there is no second scheduler
📅
Google Calendar integration
  • Two-way sync with Google Calendar: anything added in the CRM shows up on the agent's phone
  • Real calendar invites for clients, with the address and a Google Maps link
  • Rescheduling updates the existing event — duplicate entries are never created
  • The client's RSVP (accepted / declined) is checked every 15 minutes and shown in the CRM
📦
Pipedrive Smart Importer
  • Pipedrive exports land in staging tables — analysis and dry runs never touch live data
  • File type detection by a required set of headers: no guessing on partial matches
  • Dry run, reconciliation report, and owner-based filtering (whose clients get migrated)
  • Reversible imports and idempotent activity loading — re-running never duplicates

Quality and security

A CRM holds client data — so quality assurance was never an afterthought, but part of every iteration.
Data security
  • All 54 tables are protected by row-level security (RLS), isolated per organization
  • The importer and settings are available to the admin role only
  • The outgoing email suppression list automatically applies to every sending path
Automated tests
  • 203 tests: 48 end-to-end (Playwright) and 31 unit test files
  • A mock Google Calendar server for testing invites, RSVPs, and reschedules
  • A regression run at the end of every iteration, before each deploy
Independent audits
  • A completeness audit of 71 features, with a prioritized gap list
  • Every "it works" claim was verified against the live database — claims we couldn't reproduce were removed from the reports
  • Mobile (390 px) and accessibility visual QA
Human approval
  • Owner reports never go out automatically — the agent reviews, adds a note, then sends
  • Bulk campaigns only start after a dry run and approval
  • A real Pipedrive import only runs with a dry run, small batches, and the option to roll back

Key learnings

„Real estate is about relationships, not deals."
Without connecting buyers, properties, listings, and viewings, a CRM is just a nicer spreadsheet.
„Behavior decides who to call — not gut feeling."
Whoever opens the price list for the fifth time should get a call today — scoring makes that visible.
„When it goes to a client, a human decides."
Automation prepares, summarizes, and reminds — but the agent approves the owner reports and the campaigns.
„Cheap infrastructure isn't a compromise."
Per-minute scheduling runs inside the existing database — zero new vendors, zero extra monthly fees.
„A well-designed CRM is a reusable foundation."
Today, this architecture is the starting point for the CRM systems we propose to other real estate clients.
ARCHITECTURE SUMMARY
Real Estate CRMLead ScoringEmail OrchestrationGoogle Calendar SyncPipedrive MigrationOwner Reporting
COMPASS MARKETING

Want a system like this?

We don't hand you a template. We design production-grade digital infrastructure that fits the way your business actually runs.