Case Studies

Case Study: How We Built ImmoCRM, a Lead Engine for Estate Agencies

How we built ImmoCRM: a multi-tenant platform that captures an estate agency's Meta leads in seconds, auto-routes them to the right agent, and even generates its own leads with an automated property-valuation engine.

< 30s
from Meta lead to the right agent
~18,000
comparable listings behind instant valuations
Multi-tenant
one platform, every agency isolated by RLS
Anomaly-aware
ad performance watched, Meta CAPI server-side

A real-estate agency lives and dies on speed. A seller fills in an ad, and whichever agent calls first usually wins the listing. Every agency we looked at was buying leads on Meta and then losing that speed advantage the moment the lead arrived: it landed in a Facebook inbox, got copied into a spreadsheet, and waited for whichever agent happened to check. Meanwhile the most valuable visitor of all, the owner quietly wondering what their flat is worth, hit a contact form and a promise to "call you back."

We built ImmoCRM to fix both ends of that problem. This is not a story about a marketing result; it is a story about how the system is built and why we built it the way we did. ImmoCRM is a multi-tenant platform that captures an agency's leads the second they arrive, routes each one to the right agent automatically, and runs a valuation engine that turns "what's my property worth?" into a qualified lead on its own.

The problem we set out to solve

The problem was never a shortage of leads. It was that they arrived slowly, scattered across tools, with no idea which campaign produced them.

BEFORE Meta lead inbox Spreadsheet Manual valuations Lost attribution Ad spend in another tab slow · scattered · nothing attributed AFTER Instant lead capture Auto-assigned to an agent SMS + Telegram in-thread Spend + valuations in one place one pipeline · one source of truth
The goal was not another dashboard. It was to collapse a Meta inbox, a spreadsheet, a manual valuation process and a billing tab into a single connected pipeline.

So the brief was narrow and clear: take the messy, multi-tool reality and turn it into one pipeline an agency could actually run, where the first agent calls in seconds and every lead carries the campaign that produced it.

One pipeline: how a lead flows

The core of ImmoCRM is a single pipeline that a lead moves through, with every stage recorded as it happens. A lead arrives with its source and campaign attached, gets deduplicated and attributed, is assigned to an agent automatically, and is then worked entirely inside the system, with the conversation and the resulting deal hanging off the same record. Nothing is re-keyed between tools.

LEAD PIPELINE SourcesMeta · Wyceniarka· manual Capturewebhook +CAPI Dedup +attribution+ campaign Auto-assignround-robin /fastest agent AgentSMS + Telegramin-thread Dealstatus · value· commission every lead carries its source and campaign, so spend can be attributed to closed deals
The lead pipeline. A lead enters with its source and campaign attached and moves through capture, attribution, auto-assignment and agent contact to a recorded deal, never re-keyed between tools.

The value of modelling it this way is that the agency stops losing information, and time, at every handoff. The rest of the build is about making each stage fast and reliable.

Capturing leads the instant they happen

The first job is speed. ImmoCRM ingests a Meta lead the moment the form is submitted, through a Lead Ads webhook, with a native polling fallback that sweeps for anything a webhook might miss, so a dropped notification never means a lost listing. Because Meta forms vary from campaign to campaign, the system keeps a set of form-field mappings that translate each form's answers into the agency's own lead fields, and an ad-set mapping layer so every lead is tied back to the exact campaign and ad set that produced it. On the way out, it fires a server-side Conversions API event back to Meta, so the ad platform learns which leads were real and optimises toward them, even when browser tracking is blocked.

Getting the lead to the right agent

A fast capture is wasted if the lead then waits for someone to notice it. ImmoCRM assigns each new lead to an agent automatically, using a configurable strategy per folder or campaign: round-robin to share leads evenly, or a fastest-contact rule that favours the agents who historically call quickest. The agent is notified instantly over a Telegram bot, and from that point the whole conversation, SMS and Telegram alike, happens inside the lead's record, so the next person to open it sees the full history rather than guessing. Assignment pools decide who is eligible for which leads, so a luxury-apartment campaign and a suburban-house campaign can feed completely different teams from the same inbox.

The valuation engine that makes its own leads

The most distinctive part of ImmoCRM is that it does not only manage leads, it generates them. Wyceniarka is an automated property-valuation engine that an agency embeds on its own website. A visitor enters their property's details and gets an instant estimate, and that estimate is backed by a database of roughly 18,000 comparable listings that the system scrapes and refreshes on a schedule. The moment someone requests a valuation, that high-intent visitor, an owner actively thinking about selling, becomes a lead in the same pipeline as every paid lead, with its own consent and attribution.

SYSTEM ARCHITECTURE Agency → agents · multi-tenant (RLS) ImmoCRM coreNext.js + Supabase + RLS Meta Lead webhook SMS + Telegram Auto-assignment Meta insights + anomaly Wyceniarka · ~18k Flexible lead tables audit + activity log · per-agency isolation
One core, isolated per agency by row-level security, with each integration wired in around it. Channels, valuation widgets and lead tables are configured per agency, not globally.

Watching the ads, not just the leads

Most CRMs stop at the lead. ImmoCRM also keeps an eye on the spend that produces them. It pulls each agency's Meta ad insights on a schedule, builds a baseline of normal performance per campaign, and raises an anomaly when a campaign's cost or results drift outside that baseline, so a campaign that quietly stops converting gets flagged instead of bleeding budget unnoticed. It also monitors the health of each agency's Meta access token, because the single most common way lead flow dies is a token that silently expires. Catching that automatically is the difference between a five-minute fix and a week of "why did the leads stop?"

Built for agencies, isolated per agency

ImmoCRM is multi-tenant by design. One platform serves many agencies, and every agency's data is isolated from every other through row-level security on every query. On top of that, each agency can model its leads its own way: the lead-table system lets a team define its own columns, folders and views, like a spreadsheet that happens to be a database, so the CRM bends to the agency's process instead of forcing a fixed shape on everyone.

Under the hood

ImmoCRM is a custom application, not a pile of SaaS subscriptions wired together.

  • Next.js and PostgreSQL (Supabase), multi-tenant with row-level security. One schema, strict per-agency isolation on every query, with the Wyceniarka valuation data kept in its own schema.
  • Instant Meta lead capture. A Lead Ads webhook ingests each submission as it happens, with a native polling fallback, per-form field mappings, ad-set attribution, and a server-side Conversions API event so Meta optimises toward real leads.
  • Automatic assignment, with round-robin and fastest-contact strategies and per-campaign eligibility pools, so the right agent gets the lead without a manager in the loop.
  • In-thread messaging. SMS and a Telegram bot share one conversation per lead, so history never lives in someone's phone.
  • Wyceniarka, a valuation engine, built on a scraped and scheduled-refresh database of roughly 18,000 comparable listings, embeddable per agency, with its own consented lead funnel and server-side tracking.
  • Ad-performance monitoring, with per-campaign anomaly baselines and Meta token-health checks, so problems surface before they cost a week of leads.
  • A flexible lead-table layer (custom columns, folders and views) plus a full audit and activity log, so every change is traceable.

Why weeks, not quarters

A platform this broad usually sounds like a year of work. It is not, because the build follows the same process we use on every project: a tight scope, an agent-assisted build, and a deployment that is monitored from day one. We break the method down in how we ship custom apps in weeks, and the build-versus-buy logic in build vs buy: when a custom app wins.

What we would tell any agency considering this

A few honest lessons from the build.

  • The fastest call wins, so make speed automatic. Instant capture plus automatic assignment and a notification on the agent's phone beats any amount of discipline, because it removes the human delay entirely.
  • A lead source you own beats one you rent. The valuation engine turns the agency's own website into a lead channel that does not get more expensive every quarter, which is why we treated it as core, not a gadget.
  • Watch the plumbing, not just the pipeline. Token-health checks and ad anomalies are unglamorous, and they are exactly what stops an agency from discovering, a week too late, that the leads quietly stopped.

If your agency is buying Meta leads but running the rest on an inbox and a spreadsheet, talk to us. We will look at how your leads actually flow today and show you what one connected pipeline, and a valuation engine of your own, would change before we build anything.

case-studysaascrmreal-estatemeta-adslead-managementcustom-software
Work with us →