Part 1 has the contents list of every section and case study.
Case studies in full
Cutting Churn Before the Ticket Arrives (SaaS)
How Loomstack Inc. consolidated its customer-success stack into a single Airtable workspace, surfacing at-risk accounts 47 days earlier and lifting net revenue retention from 102% to 114%.
Loomstack Inc. is a Series B B2B SaaS company providing workflow automation tooling to mid-market and enterprise customers, with roughly $24M ARR across 280 paying accounts. By Q4 2025 the customer success team was operating across five disconnected tools: HubSpot for CRM data, Zendesk for support tickets, Stripe for subscriptions, a homegrown product-usage dashboard, and a sprawl of Google Sheets for everything that didn’t fit elsewhere. Health scoring was a quarterly spreadsheet exercise, and renewal forecasts were assembled by hand the week before each board meeting.
Over a 9-week engagement we replaced this stack’s coordination layer with a single Airtable workspace, a unified accounts table, computed health scores updated nightly, role-specific Interfaces for CSMs and the VP, and an automation suite that triggers playbooks before churn risk turns into a churn ticket. HubSpot, Zendesk and Stripe still own their primary data; Airtable is the operating surface on top.
Outcomes after 90 days in production
114%: Net revenue retention
47 d: Earlier risk detection
3,742: Automated runs / mo.
$1.2M: Saved ARR (Q1)
At a glance
Before: 5 disconnected tools, quarterly health scoring done in a spreadsheet, renewal forecast assembled by hand, average risk detection lag of 51 days.
After: 1 Airtable workspace as the CS operating layer, health scores recomputed nightly, live forecast on the VP dashboard, average risk detection lag of 4 days.
Background
The client and the problem
About Loomstack
Loomstack sells a workflow automation platform to mid-market and enterprise operations teams across North America and EMEA. Headcount is 180; the customer-facing org is split into 14 CSMs (segmented by Enterprise / Mid-Market), 6 support engineers, and 4 account executives covering expansion. The CS leadership reports to a VP of Customer Success who in turn reports to the COO.
The pain points that triggered the project
Churn was being detected too late. The first signal an account was in trouble was usually a renewal coming up in 30 days and a CSM scrambling. Two enterprise logos worth $640K combined churned in Q3 2025 with effectively no warning.
Health scoring was theatre. A quarterly spreadsheet exercise produced colour-coded statuses that nobody trusted, by the time it shipped, the underlying data was already 4–6 weeks stale.
CSMs lived in eight tabs. A typical customer review meant opening HubSpot, Zendesk, Stripe, Mixpanel, the usage dashboard, the renewal sheet, the QBR notes doc, and the Slack channel, for every account.
Forecasts were unreliable. The VP’s renewal forecast was built in a spreadsheet from CSM-submitted estimates; variance against actuals was running ±22% per quarter.
Playbooks didn’t run. The CS playbook library lived in Notion but was almost never triggered, because nothing automatically noticed when a playbook should fire.
Why Airtable
Loomstack evaluated three category-leading customer success platforms and Airtable. The decision came down to four factors: (1) Loomstack already had clean data sitting in HubSpot, Zendesk and Stripe, what they needed wasn’t another database, but a coordination layer on top, (2) the CS ops team wanted to own the system and iterate on it weekly without a vendor implementation queue, (3) the health-score formula needed to be theirs, not a vendor’s black box, and (4) integration with Slack was non-negotiable. Airtable’s linked-record model, sync sources, and native Slack actions made it the right fit.
Approach
How the implementation was run
We delivered the implementation in four phases over nine weeks. A core working group made up of the VP of Customer Success, two senior CSMs (one per segment), the head of CS Ops, and a RevOps analyst met twice a week to validate the data model, review prototypes, and approve each automation before it went live.
Phase
Weeks
What we did
Output
1. Discovery
1–2
Shadowed CSMs through 5 customer reviews. Audited HubSpot, Zendesk, Stripe and the usage dashboard. Workshopped the health-score formula with leadership.
Process map, data dictionary, agreed health-score definition.
2. Data model & sync
3–4
Designed 11-table relational schema. Configured one-way syncs from HubSpot (accounts/contacts), Stripe (subscriptions) and Zendesk (tickets).
Live Airtable base with synced data; ER diagram.
3. Interfaces & automations
5–7
Built the CSM Command Center, the Account Detail Workspace and the VP Forecast Room. Designed and tested 9 automations.
3 production interfaces; automation library.
4. Pilot, training, go-live
8–9
Piloted with 4 CSMs for one week, trained all 14 CSMs and the VP team, ran a 3-day shadow-mode period before full cutover.
Single-day cutover; 14 / 14 CSMs active on day 1.
Guiding principles
Don’t replace systems of record. HubSpot, Zendesk and Stripe stay as systems of record. Airtable is the system of action on top: pulling from each, surfacing what matters, and writing back where appropriate.
One health score, one definition. Health is a single formula owned by CS leadership, not three competing scores. Every place it appears in the workspace is the same calculation.
Surface signals, don’t bury them. An at-risk account should be impossible to miss. Risk surfaces on the CSM dashboard, the VP forecast, and as a Slack alert, within 24 hours of the signal.
CS Ops owns the base. The head of CS Ops and a RevOps analyst were trained as base administrators and now ship changes weekly without engineering or vendor involvement.
What Was Built
The Accounts table: the heart of the workspace
Every paying customer is a record in the Accounts table. From here, CSMs can see their book of business at a glance, sliced by segment, plan, health band, or renewal window. The grid below shows the production view used by the VP each Monday to triage the team’s at-risk accounts.
Image: Figure 1: The Accounts grid view, grouped by segment and coloured by health band. The footer rolls up total ARR and counts at-risk / critical accounts across the visible records.
Highlights of this view
Health is a coloured chip driven by a formula on the record. It’s the same calculation everywhere it’s shown.
ARR is a rollup from the linked Subscriptions table, which is one-way synced from Stripe, no double-entry, no drift.
CSM is a linked record to the Staff table, so rebalancing books happens in one place and propagates everywhere.
NPS (last) is a lookup from the most recent record in the NPS Responses table, refreshed automatically.
Two more views the team uses every day
Kanban by health band is the view the VP uses on Monday morning. Cards are stack-ordered by ARR, so the largest at-risk accounts always sit at the top. The colour bar on the left of each card encodes the band; the avatar in the corner is the CSM.
Image: Figure 2: Kanban view of the Accounts table, grouped by health band. Healthy / At risk / Critical / Onboarding / Churned columns make book composition obvious in one glance.
The expanded account record
Clicking any row opens the full account detail. This is the screen a CSM lives in during a customer review, every field a CSM might want is on one page, computed live from the underlying tables. The Health Score, Usage Trend, Open Tickets and Days to Renewal all turn red automatically when they cross their respective thresholds.
Image: Figure 3: The expanded record view for ENT-00142 (Halcyon Robotics). Notice that the timeline at the bottom shows the champion-change event detected on Apr 18 that automatically triggered a save playbook.
The Data Model
Eleven tables, one source of truth
The base is built around Accounts as the central entity. Everything else (contacts, subscriptions, tickets, health scores, renewals, playbooks, NPS responses) links back to an account. This single design decision is what makes the rollups, formulas and automations possible.
Image: Figure 4: The 11-table schema. Accounts is the hub; Subscriptions and Tickets are synced from Stripe and Zendesk respectively; the rest is native to Airtable.
Field-level decisions worth calling out
health_score is a single formula combining four sub-scores: usage (40%), support (25%), NPS (20%), commercial signals (15%). Weights live in a Settings table so leadership can tune them without code changes.
health_band is a derived formula (Healthy / At risk / Critical) with bands at 80 and 60, the only place the thresholds are defined in the entire workspace.
days_to_renewal is a formula reading from renewal_date; the renewal automations all read this field, so date arithmetic lives in one place.
Subscriptions is one-way synced from Stripe: Airtable doesn’t write back. ARR is rolled up from synced rows.
Tickets is one-way synced from Zendesk every 15 minutes, open_tickets on the Account is a count rollup.
Interfaces
Three role-based interfaces, one underlying base
Different people on the CS org need different things from the same data. We built three Interfaces on top of the base, each tailored to a role. All three read from and write to the same tables. There is no duplication.
The CSM Command Center
This is the screen a CSM opens when they sit down at their desk. It surfaces the four KPIs that matter to them, the live health distribution of their book, a renewal forecast for the next six months, and a prioritised list of accounts that need attention today, all filtered to their book automatically.
Image: Figure 5: The CSM Command Center, scoped to the logged-in CSM. KPI cards on top; health distribution and renewal forecast charts below; on the right, the accounts that need attention today, sorted by ARR × risk.
Two other interfaces
Account Detail Workspace: the single screen a CSM uses during a customer review. Live health timeline, ticket history, usage chart, contacts directory, active playbooks, and a notes stream, all on one scrollable page.
VP Forecast Room: read-only org-wide view for CS leadership. Net revenue retention trend, weighted renewal forecast by quarter, churn-risk dollar amount, and CSM utilisation. Replaces what used to be a manual Friday afternoon spreadsheet exercise.
Automations
Automating the work that catches churn early
Nine automations remove roughly 3,700 manual touchpoints from the team’s month, but more importantly, they catch churn signals while there’s still time to act. None of them replace a CSM’s judgment; they make sure no signal slips through.
Image: Figure 6: The Automations panel. Nine automations, eight currently enabled, with run counts visible per automation. The detail pane on the right shows the trigger and three actions of the renewal-playbook workflow.
The automation catalogue
Each automation is owned by a named person on the CS Ops team, documented in a Notion runbook, and reviewed monthly.
#
Automation
Trigger
Actions
Replaces
1
Health score recompute (nightly)
Schedule: 2:00 AM, every night
Runs the health-score formula across all accounts; writes a row into Health Scores; updates health_band.
Quarterly spreadsheet exercise
2
Score drop > 15 pts → Alert CSM
Health Scores.delta_30d < −15
Slack DM to CSM + tags account as ‘momentum loss’; logs into the activity timeline.
Nothing: drops were missed
3
Renewal in 90/60/30 days → Playbook
Accounts.days_to_renewal IN (90, 60, 30)
Branches on plan + health to pick playbook (e.g. Enterprise + <80 → exec save). Spawns 5 linked tasks.
Manual playbook lookup in Notion
4
Trial ending in 7 days → Sales handoff
Subscriptions.status = trial AND term_end in 7 days
Creates handoff record; assigns AE; Slack DM to AE with usage summary; books a calendar slot.
CSM-to-AE handoff via email
5
New ticket P1 → Slack war room
Tickets.priority = P1 (synced from Zendesk)
Posts to #cs-warroom; tags CSM, AE, support engineer; creates a Linear issue if flagged.
Manual Slack post by support
6
NPS detractor → Recovery sequence
NPS Responses.score ≤ 6
Sets account flag; emails CSM with NPS comment; creates a follow-up task due in 48 hours.
NPS responses going unread
7
Usage anomaly → Tag account
Usage signal: WAU drop > 25% w/w
Sets a ‘usage_drop’ tag; surfaces it on CSM dashboard ‘Needs attention’ panel.
Caught (sometimes) at quarter-end
8
Onboarding day 14/30/60 check-ins
Schedule: nightly scan of accounts in Onboarding
Spawns the right check-in task at each milestone; emails customer with the day-30 product-tour link.
Three different CSM templates
9
Champion change detected → Playbook
Contacts.is_primary changes OR HubSpot role-change signal
Creates ‘Champion change’ playbook record; spawns a 5-step exec-meeting save plan.
Nothing: usually noticed too late
Worked example: automation #3 in detail
Trigger: nightly check on every Account where days_to_renewal equals exactly 90, 60, or 30 and status = Active.
Action 1 (Conditional branch): evaluates plan + health. Enterprise + health < 80 routes to Playbook A: Executive Save; everything else routes to Playbook B: Standard Renewal.
Action 2 (Create Playbook + tasks): writes a row in the Playbooks table linked to the account, then spawns 5 tasks with due dates working back from the renewal date.
Action 3 (Notify): Slack DM to the CSM with a deep link to the account; appends the record to the VP’s weekly forecast view.
Replaced: CSMs manually checking renewal calendars and looking up playbooks in Notion (frequently the wrong playbook, frequently too late).
Integrations
How the workspace connects to the SaaS stack
Airtable doesn’t replace HubSpot, Zendesk, Stripe, or the product analytics warehouse. It coordinates them.
System
Direction
What flows
Mechanism
HubSpot
One-way (in)
Accounts and Contacts sync nightly. Field-level mapping for industry, employee count, lifecycle stage and owner.
Airtable HubSpot sync source
Stripe
One-way (in)
Subscription rows sync every 4 hours. ARR rolls up from subscription records to the account.
Stripe → Airtable via Zapier
Zendesk
One-way (in)
Tickets sync every 15 minutes. Priority, status, assignee, and time-open are all rollup-able.
Native Zendesk sync
Slack
One-way (out)
Health drops, P1 tickets, renewal-playbook triggers, NPS detractor alerts.
Native Slack action in Automations
Mixpanel / Snowflake
One-way (in)
Daily WAU and feature-adoption metrics per account, used as inputs to the health score.
Snowflake → Airtable via reverse-ETL
Linear
One-way (out)
P1 tickets that need engineering escalation create a Linear issue with customer context attached.
Linear API call from script action
Gmail / Outlook
One-way (out)
Customer-facing emails (NPS follow-ups, day-30 onboarding tour) sent from automation actions.
Native email actions
Permissions & data handling
Workspace plan: Airtable Business with SAML SSO via the company’s identity provider. Two-factor authentication enforced for all users.
Field-level permissions: ARR and renewal amounts are read-only for CSMs and hidden from support engineers; visible to AEs and the VP.
Book-level filtering: CSMs see only their own accounts by default on every interface; the VP sees the full org. No CSM can edit another CSM’s accounts.
Audit: Airtable’s revision history is retained, and a nightly backup is exported to the company’s S3 bucket via the Airtable API.
Results
Measurable change after 90 days in production
Metric
Before
After
Change
Net revenue retention (NRR)
102%
114%
+12 pts
Average risk-detection lag
51 days
4 days
−92%
Renewal forecast variance
± 22%
± 6%
−73%
At-risk ARR identified earlier
n/a
$1.2M (Q1)
+ saved revenue
CSM time spent on reporting
≈ 6 hr / week
≈ 45 min / week
−87%
Playbook trigger rate
≈ 14% of cases
100% of cases
+ coverage
Automated touchpoints / month
0
3,742 across 8 active flows
n/a
CSM adoption (firm-wide)
n/a
14 / 14 active on day 1
100%
In the words of the team
The thing that changed isn’t really the dashboard: it’s that the team has time. My CSMs aren’t building reports any more, they’re actually talking to customers. And when an account starts going sideways, we know about it the next morning, not three weeks later when the renewal blows up. We saved $1.2M of ARR last quarter that would otherwise have walked out the door.
What we’d do again, and what we’d change
Worked well: co-designing the health-score formula with leadership in week 1. Because they owned it from day one, nobody argued with the scores once they started shipping.
Worked well: shipping the CSM Command Center first and the VP Forecast Room last. Adoption follows the front line.
Would change: we underestimated the data-cleanup burden in HubSpot during phase 2. About 11% of accounts had missing or stale ownership; cleaning that up consumed three days we hadn’t planned for.
Would change: add an in-product feedback widget that writes directly to the NPS Responses table. The current Typeform-based flow has a higher drop-off than we’d like.
Section: Custom SaaS Platforms, n8n Automations, AI Agents
Project Overview
Pure NSM manufactures capsule supplements for brands that need their own formulas produced at commercial scale. For every prospective customer, one of the most important questions is straightforward: How much will this formula cost to manufacture?
Answering that question, however, involved a complicated process. Quotes were prepared in a large Excel workbook, pricing information was spread across QuickBooks exports and supplier websites, and the manufacturing calculations required detailed knowledge of the business. Only a few experienced team members knew how to complete the workbook correctly.
The result was a quoting process that typically took two to three weeks.
Growlyze replaced this spreadsheet-dependent process with a custom quoting platform that centralizes ingredient and packaging costs, automates manufacturing calculations, supports AI-assisted quote editing, identifies missing supplier prices, and checks formulas for known production risks.
The platform also extends the quoting process to Pure NSM’s website, where prospective customers can receive a ballpark estimate without waiting for a sales call.
Key Results at a Glance
Metric
Before
After
Quote turnaround
2–3 weeks
24–48 hours
Raw material records
Distributed across data sources
7,800+ items in one searchable database
Packaging components
Maintained across separate sources
460+ items centralized
Quote preparation
Complex Excel workbook
Guided four-step quote builder
Public pricing
Enquiry and waiting process
Three-step ballpark estimator
The reported improvement reduced quote turnaround from several weeks to one or two days. The centralized database and automated calculations also made pricing information easier to access and the quoting process less dependent on a small number of spreadsheet specialists.
01. The Business Challenge
In supplement contract manufacturing, responding quickly with an accurate quote can influence whether a prospective customer chooses a manufacturer. A brand developing a new formula may approach several manufacturers at once. When one manufacturer takes weeks to respond, the opportunity to engage that customer can be lost.
Pure NSM’s previous process created several connected problems.
1.1 A Complex Spreadsheet Was the Bottleneck
Every quote depended on a large, multi-tab Excel workbook. Preparing a quote required the user to enter the correct information, follow the existing calculations, and ensure that the different cost components were handled properly.
A mistake in a single cell could affect the final price. Because of this complexity, only a few experienced team members could confidently prepare quotes.
When those team members were busy, other quotes had to wait. The process therefore depended not only on the complexity of the workbook but also on the availability of people who understood how to use it correctly.
1.2 Pricing Information Was Scattered Across Multiple Sources
The cost of manufacturing a supplement depends on more than its ingredient quantities. The team also needs current prices for raw materials, packaging, labour, and other relevant production inputs.
Before the new platform, this information was spread across:
QuickBooks exports.
Existing ingredient and packaging price lists.
Historical pricing records.
External supplier websites.
When an ingredient price was missing, someone had to search supplier websites, compare different package sizes, and manually convert the results into a comparable price per kilogram.
This repetitive research added time to quote preparation and made it harder to maintain a consistent view of costs.
A supplement quote cannot be calculated through simple multiplication alone. The pricing process must account for how ingredients are used and how manufacturing costs change with formula composition and order size.
The calculations included:
Ingredient potency: Low-potency ingredients can require more raw material to achieve the intended amount in the finished product.
Overage adjustments: Vitamins and minerals may require additional quantities to account for manufacturing requirements.
Packaging quantities: Bottle sizes and order volumes affect the quantities and costs of packaging components.
Production labour: Labour costs vary across 15 different manufacturing steps.
Margins and volume tiers: The final price must reflect the business’s margins and the requested order quantity.
Performing these calculations manually made quote preparation slower and left more room for errors in pricing and margins.
1.4 Formula and Production Risks Could Be Identified Too Late
Certain ingredient combinations can create formulation challenges or production difficulties. A formula may also present problems when processed through manufacturing equipment.
When these issues are not identified during quote preparation, the team may discover them only after the quote has already been sent.
Pure NSM therefore needed a way to flag known ingredient and production risks earlier, while the formula was still being reviewed.
1.5 Prospective Customers Could Not Get an Immediate Estimate
The existing process required prospective customers to submit an enquiry and wait for the sales team to prepare a quote.
This introduced friction at the beginning of the customer journey. Interested brands could not quickly assess whether a formula was likely to fit their budget, and the sales team spent time responding to enquiries that might not become viable opportunities.
The challenge was to make pricing more accessible without removing the detailed calculations required for manufacturing-specific quotes.
02. The Solution: A Custom Manufacturing Quoting Platform
Growlyze built a quoting platform around Pure NSM’s existing pricing logic, data, and operational requirements.
Rather than simply transferring the spreadsheet into another interface, the platform separates the process into connected components: centralized cost management, guided formula entry, automated calculations, AI-assisted changes, supplier price discovery, formula checks, quote generation, and public price estimation.
Each component addresses a specific weakness in the original process.
2.1 Centralized Database for Costs and Materials
The first step was to bring the information required for quoting into one searchable database.
The platform consolidates:
More than 7,800 raw material records.
More than 460 packaging components.
Labour rates.
Supplier contacts.
QuickBooks pricing information.
The team can search for items, edit records, and perform bulk price updates rather than repeatedly consulting different files and websites.
Each price also records its source, such as the internal database, QuickBooks, a supplier website, or a manual entry. This helps the team understand where a cost originated when reviewing a quote.
The centralized database provides the foundation for the platform’s other features: calculations can use the available cost data, while missing prices can be identified for further research instead of being treated as known values.
2.2 Guided Quote Builder With Automated Calculations
The quote builder organizes the preparation process into four steps: Formula, Packaging, Labour, and Summary.
This structure makes the workflow easier to follow and separates the main areas that contribute to the final price.
Step 1 — Formula
The team enters the ingredients and quantities required for the proposed supplement formula. The platform applies the relevant potency and overage adjustments as part of its calculation process.
Step 2 — Packaging
The packaging step accounts for the selected bottle sizes and the required packaging quantities, allowing packaging costs to be incorporated into the quote.
Step 3 — Labour
The platform estimates labour hours and costs across 15 production steps. This allows the labour component to be included in the overall calculation rather than handled separately through manual spreadsheet work.
Step 4 — Summary
The system combines the calculated costs, applies Pure NSM’s margins, and produces six price tiers. These cover two bottle sizes at three different order volumes.
The calculation logic was checked against a real historical quote, and the resulting price matched to within ten cents. This provided a practical validation point against the company’s existing quoting process.
2.3 AI Assistant for Natural-Language Quote Editing
The platform includes an AI assistant that allows team members to request quote changes in plain English.
Instead of manually locating every relevant field, a user can enter an instruction such as:
“Add 200mg magnesium glycinate.”
“Set bottle cost to 75 cents.”
The assistant interprets the instruction and proposes the requested changes. The changes are not applied automatically: a team member must approve them first.
This approval step keeps the user involved in pricing decisions and reduces the risk of unintended changes to a quote.
The assistant also follows an important pricing safeguard: it is not allowed to guess missing prices.
If a required cost is unavailable, the assistant identifies the missing information and directs the user to the Price Finder. This ensures that an unknown price is treated as a gap to resolve rather than an opportunity for the AI to invent a value.
2.4 Price Finder for Supplier Research
Ingredient prices may be missing from the internal database, particularly when the team needs to quote an ingredient that has not previously been used or priced.
The Price Finder streamlines this process.
The team can paste in up to 50 ingredients at once. The system first checks Pure NSM’s own database and then searches supplier websites when additional pricing information is required.
The results are processed so that different package sizes can be compared on a price-per-kilogram basis. The system also assesses how closely each result matches the requested ingredient and presents the available options side by side.
After reviewing the options, the team can select a price and add it to the quote with one click.
This approach reduces repetitive supplier research and brings price discovery into the quoting workflow itself.
2.5 Formula Safety and Production-Risk Checks
The platform checks ingredient changes against known problematic combinations and production risks.
These checks are integrated into the quote-building process so that potential issues can be highlighted while the team is still preparing the quote.
This gives the team an opportunity to review known concerns before the quote is sent, rather than relying entirely on someone noticing the issue during a later review.
The purpose is to surface potential risks earlier; the checks do not replace the need for appropriate formulation and manufacturing review.
2.6 One-Click Quote Document Generation
Once a quote is ready, the team can click Send to generate a formatted quote document.
The document includes:
All six pricing tiers.
The associated cost breakdown.
The 50% deposit amount.
This reduces the manual work required to assemble the final quotation after the calculations have been completed.
Instead of preparing the calculations in one place and formatting the customer-facing document separately, the platform connects quote preparation with document generation.
2.7 Website Estimator for Prospective Customers
The same pricing engine also powers a public-facing estimator on Pure NSM’s website.
Prospective customers enter their formula and quantity through a three-step process. They then receive a ballpark price per bottle on screen and by email, without needing an account or a sales call.
The estimator also sends the customer’s details and formula information to the sales team.
This creates a direct connection between the pricing platform and lead generation. Prospective customers can explore indicative pricing independently, while the sales team receives information about the formula they are interested in.
The website estimator provides a ballpark price; it should not be confused with a fully reviewed manufacturing quotation.
03. End-to-End Workflow
The platform connects its internal pricing process and public-facing estimator through the same underlying pricing logic.
Public-facing path:
These paths address two related goals: helping the internal team prepare quotes faster and giving prospective customers a quicker way to understand indicative pricing.
04. What Makes This Solution Different?
Built Around Pure NSM’s Manufacturing Logic
The platform was designed for the pricing requirements of supplement manufacturing, including potency, overage, packaging, production labour, and order-volume tiers.
It uses Pure NSM’s own pricing logic rather than relying on a generic quoting process.
AI With Guardrails
The AI assistant proposes changes for human approval and does not invent missing prices. This keeps pricing decisions under team control while still providing the convenience of natural-language instructions.
Supplier Research Integrated With Quoting
The Price Finder connects missing ingredient costs with supplier research and price normalization. The team can compare potential matches and bring a selected price directly into the quote.
Cost Sources Remain Visible
Prices retain source information, helping the team review where costs came from instead of treating every figure as an unexplained spreadsheet value.
Internal Quoting and Public Estimation Share One Pricing Engine
The website estimator extends the same pricing system to prospective customers. This connects internal quoting operations with a self-service route for generating enquiries.
05. Business Impact
Quote Turnaround Reduced to 24–48 Hours
The reported turnaround improved from two to three weeks to 24–48 hours. Pure NSM can now respond to prospective customers much faster, which is particularly important when brands are comparing multiple contract manufacturers.
Less Dependence on Spreadsheet Specialists
The guided workflow and automated calculations make quote preparation less dependent on a few experienced spreadsheet users. The process is organized into defined stages that other team members can follow.
More Consistent and Traceable Pricing
The platform brings cost records into one searchable location, records price sources, and applies the manufacturing calculations consistently. Its calculation logic was also checked against a historical quote, with a difference of no more than ten cents.
Earlier Identification of Formula Risks
Known ingredient and production concerns can be surfaced during quote preparation. This gives the team more opportunity to review potential issues before sending a quotation.
Faster Access to Supplier Pricing
The Price Finder reduces the need to research and normalize supplier prices manually for every missing ingredient. It supports batches of up to 50 ingredients and presents potential matches for review.
Improved Customer Access to Indicative Pricing
The website estimator lets prospective customers obtain a ballpark estimate without first arranging a sales call. The sales team receives their details and the formula they are interested in, creating a more direct path from pricing exploration to follow-up.
06. Technology Stack
Technology
Role in the Solution
React
Frontend application interface
Node.js
Application backend
OpenAI
AI-assisted quote editing
Firecrawl
Supplier website research
n8n
Workflow automation
Google Sheets
Supporting data workflows
QuickBooks data
Existing pricing information used by the platform
The technologies support the platform’s main functions: cost-data management, quote calculations, AI-assisted changes, supplier price discovery, and connected workflows.
07. Future Enhancements
The following items were identified as future improvements rather than completed capabilities.
Quote History
Save quotes and their history directly in the platform so previous pricing decisions can be reviewed more easily.
CRM Integration
Feed winning quotes back into the CRM to track win rates and margins by customer. This would help connect quoting activity with subsequent sales outcomes.
Additional Formula and Packaging Guidance
Extend the safety-check process with capsule-size and bottle-fit recommendations to provide additional guidance during quote preparation.
Conclusion
Pure NSM’s original quoting process relied on a complex spreadsheet, dispersed pricing information, and specialist knowledge. Preparing a quote could take two to three weeks, while prospective customers had to wait for the sales team to provide an estimate.
Growlyze replaced that process with a custom quoting platform that centralizes more than 7,800 raw materials and 460+ packaging components, automates manufacturing calculations, supports AI-assisted editing with human approval, helps locate supplier prices, flags known formula risks, and generates formatted quote documents.
The same pricing engine also powers a website estimator, allowing prospective customers to obtain a ballpark price without a sales call.
The reported result is a reduction in quote turnaround from two to three weeks to 24–48 hours, supported by a more structured and traceable pricing proces
A full-stack MERN real estate operations platform with CRUD, Google Auth, live charts, and Cloudinary image management, built on the Refine framework with Material UI.
Section: Custom SaaS Platforms
Project Overview
Estato is a full-stack real estate management platform designed to help real estate teams manage property listings, agent information, and portfolio performance from a centralized dashboard. Built using the MERN stack, TypeScript, and the Refine framework, it combines property management, analytics, and authentication in a unified interface.
The platform provides complete property CRUD operations, allowing agents to create, view, update, and delete listings with structured details such as property type, location, price, description, and images. Cloudinary handles property image uploads and delivery, while MongoDB Atlas stores property records and agent information.
The dashboard presents key operational metrics, monthly revenue trends, property referral sources, and recently added listings. Google OAuth provides individual user authentication, while agent directories and profile pages help teams view agent information and property portfolios. Built with Material UI and ApexCharts, Estato also supports light and dark modes for a flexible user experience.
Project Details
Project Type: Full-Stack MERN Application Case Study
Product: Estato — Real Estate Management Dashboard
Frontend: React 18, TypeScript, Refine Framework, Material UI, ApexCharts
Backend: Node.js, Express, ESM Modules
Database: MongoDB Atlas with Mongoose ODM
Authentication: Google OAuth, Google Identity Services, JWT, localStorage
Media Storage: Cloudinary for property image uploads and delivery
Image: The Estato dashboard: revenue, property, agent and customer tiles, a monthly revenue chart and a property referrals breakdown.
Why We Built This
Real estate teams often manage property listings, agent information, and performance data across disconnected tools. Property records sit in listing portals, agent performance is tracked in spreadsheets, and photos are scattered across emails or local drives. Without a centralized dashboard, getting a complete view of operations becomes difficult.
The core challenges Estato was designed to solve:
Fragmented Property Data: Listings were spread across multiple platforms without a consistent structure for property type, location, price, and description.
Limited Agent Visibility: Managers lacked a clear overview of agent portfolios and how properties were distributed across the team.
Inefficient Listing Management: Creating and editing listings without standardized forms, structured property types, and direct image uploads was time-consuming.
Lack of Centralized KPIs: Tracking properties for sale and rent, total customers, and total agents required manual effort across multiple systems.
Limited Referral Insights: Teams lacked a centralized view of which channels, including social media, marketplaces, websites, and digital ads, generated enquiries.
Unmanaged Authentication: Shared credentials limited individual accountability and made it difficult to associate listings with specific agents.
Our goal was to build a unified MERN-stack dashboard where agents could sign in with Google and manage their own property listings, while managers could monitor key metrics, revenue trends, referral sources, and the entire agent directory from one place.
What this system does
Estato is a full-stack MERN application that gives real estate teams a complete operations interface: live analytics, a full property CRUD system, an agent directory, individual profiles, and Google-authenticated access. The Refine framework handles data fetching, routing, and auth integration; Material UI provides the component layer; ApexCharts and custom donut charts deliver the analytics.
Operations dashboard
Four donut-style KPI tiles at the top of the home page give instant visibility: Properties for Sale (live count from the API), Properties for Rent, Total Customers, and Total Agents, each with a percentage ring showing the proportion against a target
Total Revenue area chart (ApexCharts) renders monthly revenue data across the full year with a smooth curve and gradient fill
Property Referrals horizontal bar chart shows the contribution of each lead source: Social Media (64%), Digital Ads (80%), Websites (50%), Marketplace (40%), and Others (15%).
Latest Properties section beneath the charts shows the 4 most recently added properties as live cards pulled from the API in real time
Property management (full CRUD)
All Properties page renders the full listing catalogue as a responsive card grid, with live search by title, filter by 8 property types (Apartment, Villa, Farmhouse, Condos, Townhouse, Chalet, Studio, Duplex), price sort toggle, and server-side pagination with a configurable page-size selector (5, 10, 20, 30, 40, 50, All)
Property Detail page shows the full-size property photo, property type with a 5-star rating, title, location, price, and description on the left. The right sidebar shows the creator agent’s avatar, name, property count, and location. Context-aware action buttons adapt based on the logged-in user: Message and Call for other agents’ listings; Edit and Delete for the current user’s own listings
Create Property form collects title, property type, description, location, price, and photo. The photo is read into base64 via the FileReader API and submitted to the backend, which uploads it to Cloudinary and stores the CDN URL
Edit Property form pre-populates all existing field values and allows any field to be changed, including the photo. If the photo is unchanged, the existing Cloudinary URL is preserved
Delete uses a Mongoose session transaction to remove the property document and simultaneously pull it from the creator’s allProperties array, keeping both collections in sync atomically
Agent management
Agents List page displays every registered user as an agent card with their Google avatar, name, email address, and total property count
Agent Profile page shows the full agent detail view via the shared Profile component, including the agent’s complete property portfolio
My Profile page uses the same shared Profile component for the currently authenticated user, with data fetched by their own MongoDB user ID
Authentication
The login page renders a Google Sign-In button using the Google Identity Services API. The credential response is a signed JWT
parseJwt utility decodes the Google JWT on the client to extract name, email, avatar (picture), and sub (user ID) from the payload
On every login, the user profile is POST-ed to /api/v1/users, which is idempotent: it returns the existing MongoDB document if the email already exists, or creates a new user record if not
The raw Google credential token is stored in localStorage as token. Axios’s request interceptor attaches it as Authorization: Bearer <token> to every subsequent API call
On logout, token and user are removed from localStorage and google.accounts.id.revoke() is called to invalidate the Google session
Light and dark mode
ColorModeContextProvider wraps the entire application and exposes a setColorMode function through React context
The current mode is stored in localStorage to persist the user’s preference across sessions. On first load, the system’s prefers-color-scheme media query is checked to set the default
Two custom Material UI themes are defined: overridedLightTheme and overridedDarkTheme, each extending Refine’s built-in theme objects with custom palette overrides. The active theme is passed to ThemeProvider at runtime
Benefits
Single source of truth for the portfolio: every property, agent, and relationship lives in one MongoDB database with a consistent schema, accessible from any device
Live KPIs on every login: four dashboard tiles give the team instant situational awareness without opening a single spreadsheet
Consistent listing creation: the structured form with defined property types ensures every listing is created to the same standard, with a real photo uploaded directly to Cloudinary
Role-aware property actions: agents can only edit or delete their own listings; other agents’ listings show contact options instead
Atomic data integrity: create and delete operations use Mongoose session transactions to keep the Property collection and the User.allProperties array perfectly synchronised
Zero password management: Google OAuth means no passwords to store, reset, or manage; every agent has their own authenticated identity
Scalable Refine architecture: adding a new resource (reviews, messages, enquiries) requires registering it in App.tsx; the data provider, routing, and UI scaffolding are automatically available
Dark/light mode out of the box: system preference is respected on first load; the preference is then stored in localStorage and toggleable at any time
How it works
Agent visits the login page and clicks ‘Sign in with Google’. Google Identity Services returns a signed JWT credential
parseJwt decodes the JWT client-side to extract the user’s name, email, and avatar. The profile is POST-ed to /api/v1/users, which creates or finds the user in MongoDB
Token stored in localStorage; Axios interceptor attaches it as a Bearer token to every subsequent request. Refine’s checkAuth hook reads localStorage on each route change to decide whether to redirect to login
Dashboard loads and fires a useList call to /api/v1/properties (pageSize: 4) for the Latest Properties grid. The 4 KPI donut tiles and both ApexCharts components render with static or aggregate data
All Properties page uses Refine’s useTable hook, which manages current page, page size, sorter, and filters as state and translates them into query params on the API call (_start, _end, _sort, _order, title_like, propertyType)
Creating a property: the agent fills the form. On photo selection, FileReader reads the file as a base64 data URL. On submit, onFinish POSTs the full payload (including the base64 photo and the agent’s email) to /api/v1/properties
Server receives the POST, finds the user by email, uploads the base64 photo to Cloudinary, receives back a CDN URL, then opens a Mongoose session and atomically creates the Property document and pushes its _id to user.allProperties
Property Detail page calls useShow to fetch /api/v1/properties/:id with the creator user document populated. Action buttons (Edit/Delete vs Message/Call) are conditionally rendered by comparing user.email with propertyDetails.creator.email
Deleting a property opens a browser confirmation dialog. On confirm, useDelete fires a DELETE request. The server opens a Mongoose session, removes the Property document, and pulls its _id from creator.allProperties, then commits the transaction
Agent and profile pages call useList / useShow against /api/v1/users, which returns user documents with all properties populated. The shared Profile component renders the same layout for both Agent Profile and My Profile
System architecture
Page inventory
Estato consists of 9 pages, each a React TypeScript component managed by Refine’s routing and data layer.
Page
File
Key Content
Dashboard (Home)
home.tsx
4 PieChart KPI tiles, TotalRevenue ApexChart, PropertyReferrals bar chart, Latest Properties card grid (4 items live from API).
All Properties
all-properties.tsx
Full property grid with search by title, filter by 8 property types, sort by price (asc/desc), page size selector, Previous/Next pagination.
Property Details
property-details.tsx
Full-width photo, property type + 5-star rating, title, location, price, description. Agent sidebar: avatar, name, property count, location, Google Map, Book Now, Message/Edit + Call/Delete buttons.
Create Property
create-property.tsx
Delegates to shared Form component. Handles image file selection (FileReader to base64), attaches logged-in user email before submitting to API.
Edit Property
edit-property.tsx
Same shared Form component as Create. Pre-populates existing property data. Allows photo re-upload; photo URL preserved if unchanged.
Agents List
agent.tsx
Grid of all users (agents) from /api/v1/users. Each AgentCard shows avatar, name, email, and property count. Clicking navigates to agent profile.
Agent Profile
agent-profile.tsx
Full agent detail using shared Profile component. Shows avatar, name, email, properties count and full property list.
My Profile
my-profile.tsx
Logged-in user’s own profile using the same shared Profile component. Data fetched from /api/v1/users/:userId.
Login
login.tsx
Google Sign-In button using Google Identity Services. On success, JWT decoded, user POSTed to /api/v1/users, token stored in localStorage.
Data models
Two Mongoose schemas define the complete data layer. The bidirectional relationship between Property and User is maintained by the server using session transactions on create and delete operations.
Collection
Field
Type
Notes
Property
title
String (required)
Listing headline
Property
description
String (required)
Full description text
Property
propertyType
String (required)
Apartment, Villa, Farmhouse, Condos, Townhouse, Chalet, Studio, or Duplex
Property
location
String (required)
Free-text location / address
Property
price
Number (required)
Numeric value (rendered as $price per day in the UI)
Property
photo
String (required)
Cloudinary CDN URL after base64 upload
Property
creator
ObjectId → User
Populated on read to include full user document
User
name
String (required)
Full name from Google profile
User
email
String (required)
Google account email; used as unique identifier
User
avatar
String (required)
Google profile picture URL
User
allProperties
[ObjectId] → Property
Bidirectional reference array; maintained via Mongoose transactions
Note
The User schema does not require a password field because authentication is handled entirely by Google OAuth. The email address serves as the unique identifier and is used both for login matching and for associating new properties with the correct creator.
API reference
All endpoints are prefixed with /api/v1/ and served by the Express server on port 8080. No authentication middleware is currently applied server-side; auth is enforced client-side by Refine’s checkAuth hook and the Axios Bearer token interceptor.
Method
Endpoint
Description
GET
/api/v1/properties
List all properties. Supports _start, _end, _sort, _order, title_like, propertyType query params. Returns x-total-count header for Refine pagination.
GET
/api/v1/properties/:id
Fetch a single property with creator user populated (name, email, avatar, allProperties).
POST
/api/v1/properties
Create a new property. Uploads photo to Cloudinary via base64. Uses Mongoose session transaction to atomically create property and push to user.allProperties.
PATCH
/api/v1/properties/:id
Update an existing property. Re-uploads photo to Cloudinary. Falls back to original photo URL if upload fails.
DELETE
/api/v1/properties/:id
Delete a property. Uses Mongoose session transaction to remove from DB and pull from creator’s allProperties array atomically.
GET
/api/v1/users
List all users (agents). Supports _end for limit. Returns full user documents including allProperties references.
POST
/api/v1/users
Create or find a user by email (idempotent). Called on every Google OAuth login to ensure the user record exists in MongoDB.
GET
/api/v1/users/:id
Fetch a single user by MongoDB _id with allProperties populated. Used by agent profile and my profile pages.
Technology stack
The complete dependency surface for both client and server packages:
Layer
Package / Version
Role
UI Framework
@pankod/refine-core ^3.103
Data fetching (useList, useShow, useDelete, useGetIdentity), auth provider, routing
Component Library
@pankod/refine-mui ^3.63
Material UI integration for Refine: layout, notifications, theme provider
Forms
@pankod/refine-react-hook-form
react-hook-form integration for create/edit property forms with Refine’s onFinish lifecycle
Routing
@pankod/refine-react-router-v6
React Router v6 adapter; all navigation uses useNavigate, useParams
Data Provider
@pankod/refine-simple-rest
Maps Refine resource operations to REST calls against the Express API
Charts
apexcharts + react-apexcharts ^1.4
TotalRevenue (area chart) and PropertyReferrals (horizontal bar chart)
Charts (KPI)
Custom PieChart component
4 donut-style KPI tiles on the dashboard (Properties for Sale/Rent, Customers, Agents)
HTTP
axios ^0.28
All API calls; Axios interceptor attaches Bearer JWT token to every outbound request
Loading State
react-loader-spinner ^5.4
Consistent loading indicator shown across all async pages via the shared Loader component
Automate lead qualification, respond instantly through WhatsApp in multiple languages, assign prospects fairly, and track follow-ups with an AI-powered real estate platform for smarter sales and higher conversion rates.
Section: Custom SaaS Platforms
Project Overview
LeadFlow AI is an AI-powered SaaS platform designed for Dubai real estate brokerages. It automates lead qualification, multilingual WhatsApp responses, agent assignment, and follow-up tracking. Powered by GPT-4o, Firebase, and the WhatsApp Cloud API, the platform helps brokerages manage incoming enquiries, prioritize high-intent prospects, and maintain a complete history of customer interactions.
Its subscription-based model, integrated Stripe billing, and dedicated owner and agent dashboards provide a centralized solution for managing leads and sales activities.
Business Problem
Dubai’s real estate market moves quickly, with enquiries arriving around the clock from buyers, renters, and investors across different countries and time zones. Without an automated lead management process, brokerages risk delayed responses, missed opportunities, and inconsistent follow-ups.
LeadFlow AI addresses these challenges:
Inconsistent Lead Qualification: Agents lack a standardized process for identifying high-intent prospects and prioritizing enquiries.
Delayed Responses: Manual lead handling can leave international prospects waiting for a reply, reducing opportunities to engage them at the right time.
Unmanaged WhatsApp Conversations: Messages and customer interactions lack centralized tracking, making it difficult to maintain complete communication histories.
Language Barriers: Multilingual enquiries require professional responses in languages such as Arabic, Russian, Chinese, French, and English.
Unbalanced Lead Distribution: Manual assignment can create uneven workloads and inconsistent allocation across agents.
Missed Follow-Ups: Without automated reminders, scheduled calls and subsequent interactions can easily be overlooked.
These challenges create operational inefficiencies and make it harder for brokerages to deliver timely, consistent customer experiences.
Proposed Solution
LeadFlow AI provides an end-to-end SaaS platform that automates lead qualification, customer communication, agent assignment, and follow-up management for Dubai real estate brokerages.
Using GPT-4o, the system identifies each lead’s language, intent, and temperature, then generates a professional response in the lead’s own language. Leads are assigned to agents through a fair round-robin process, while WhatsApp integration enables two-way messaging and maintains conversation history.
The platform also includes role-based dashboards for owners and agents, automated follow-up reminders, and Stripe subscription billing. Together, these features help brokerages manage enquiries more efficiently, improve response consistency, and maintain better visibility across their sales pipeline.
Project Details
Category
Details
Project Type
Product Case Study · SaaS Platform
Industry
PropTech · Real Estate · Dubai, UAE
Frontend
React (Vite) · Tailwind CSS · Vercel
Backend
Node.js · Express · Render
Database & Authentication
Firebase Firestore · Firebase Auth
AI Engine
OpenAI GPT-4o
Messaging
WhatsApp Cloud API · Meta Graph API v21.0
Payments
Stripe · AED subscriptions · 7-day free trial
End-to-End Workflow
Image: The LeadFlow AI landing page: “Never miss a hot lead again”.
Automated lead pipeline
Accepts inbound leads via a REST API endpoint that can be embedded into any website contact form, landing page, or chatbot
Validates and checks the brokerage subscription before processing: if the Basic plan’s 100-lead monthly limit is reached, the endpoint returns a clear upgrade prompt
Sends the lead through GPT-4o for classification: language detection, intent classification (buy / rent / invest / general inquiry), temperature scoring (hot/warm / cold), and AI-generated reply
Assigns the lead to an agent via atomic round-robin rotation, a Firestore transaction ensures fair distribution even under concurrent submissions
Sends the AI-generated reply directly to the lead’s WhatsApp number via the Meta Cloud API, in the same language the lead wrote in
Stores the complete lead record, AI analysis, and message thread in Firestore for full history
AI engine (GPT-4o)
System prompt defines a “premium Dubai luxury real estate” tone, professional, no emojis, no slang, concise but warm
Detects lead language automatically (ISO 639-1 codes: en, ar, ru, zh, fr, and others) and replies in that language
Classifies intent as buy, rent, invest, or inquiry based on message content
Tags lead temperature: hot (specific budget/area / timeline), warm (genuine interest, lacks specifics), or cold (general browsing)
Runs at temperature 0.4 with JSON response format enforced, consistent, structured output on every call
Falls back to a safe default reply if the AI call fails, ensuring no lead is ever left without an acknowledgement
WhatsApp integration (Meta Cloud API)
Outbound: sends AI replies and agent messages to leads via the WhatsApp Cloud API (Meta Graph API v21.0)
Inbound: receives replies from leads via a verified Meta webhook, matches the sender’s phone number to the correct lead record, and stores the message in the thread
Webhook verification uses Meta’s challenge-response flow with a custom verify token
All incoming payloads are validated via HMAC-SHA256 signature using the Meta App Secret before processing
Phone numbers are cleaned (stripped of spaces, dashes, and plus signs) before every API call
Owner dashboard
Displays total leads, hot leads count, follow-ups due today, and new leads this week
Shows agent performance table: total leads assigned vs. leads closed per agent
Lists the 10 most recent leads with full status, temperature, and intent data
The owner can reassign leads between agents directly from the dashboard
Visible only to users with the owner role: enforced server-side via requireRole middleware
Agent dashboard
Shows assigned leads, active (non-closed) leads, and follow-ups currently due
Lists the agent’s 10 most recent assigned leads
Agents can only view and interact with leads assigned to them, enforced in every route handler
Agents can send messages to leads, update lead status, and set follow-up dates
Subscription billing (Stripe)
Two plans available: Basic (AED 149/month, 100 leads) and Pro (AED 399/month, unlimited leads + analytics)
Both plans include a 7-day free trial before billing begins
Stripe Checkout handles the payment flow; Stripe Billing Portal handles plan changes and cancellations
Stripe webhooks update Firestore user records in real time on subscription activation, update, and cancellation
Agents automatically inherit their owner’s subscription status: if the owner’s plan lapses, agents lose access too
Follow-up automation
Agents set a follow-up date on any lead directly from the lead detail page
A scheduled cron job runs every day at 8:00 AM UAE time (UTC+4) via node-cron
Any lead with a follow-up date on or before today and a non-closed status is flagged followUpDue: true in Firestore
The agent dashboard surfaces these flags as a follow-up due count, creating a daily task list without manual tracking
Benefits
Instant first response at any hour: every lead gets a professional WhatsApp reply within seconds, regardless of time zone or day of the week
Replies in the lead’s language: Arabic, Russian, Chinese, French, and English buyers all receive a response in their own language without any manual effort
Fair, automatic agent assignment: round-robin distribution via Firestore transactions means no agent is overlooked and no manager needs to manually route leads
Hot leads surface immediately: buyers who mention a specific budget, area, or timeline are flagged HOT so agents know exactly who to call first
Complete conversation history: every WhatsApp message in and out is stored against the lead record, giving agents full context before they pick up the phone
No missed follow-ups: the daily cron job ensures agents see overdue leads on their dashboard each morning without any manual diary management
Subscription-gated access: brokerages pay per month; if a plan lapses, access is revoked automatically via Stripe webhook sync
Multi-tenant by design: each brokerage’s data is isolated by ownerUid; no lead or agent data is ever visible across brokerage accounts
How the Platform Works
A lead submits a form on the brokerage’s website, the form POSTs to the public /api/leads endpoint with name, email, phone, message, and ownerUid
Subscription and plan limits are checked: the server verifies the brokerage has an active or trialing Stripe subscription, and that the Basic plan lead cap has not been reached
GPT-4o processes the lead: language is detected, intent classified, temperature scored, and a professional reply generated in the lead’s own language
The lead is assigned to an agent: a Firestore transaction reads the round-robin counter, selects the next agent in the rotation, and atomically increments the counter
The lead record is written to Firestore, all fields stored: name, contact details, message, AI analysis (language, intent, temperature), assigned agent, status, and timestamps
The AI reply is sent via WhatsApp: if a phone number was provided, the generated reply is dispatched through the Meta Cloud API, and the WhatsApp message ID is stored
The API returns a success response: the caller receives the lead ID, AI reply text, intent, temperature, and assigned agent ID
The agent is notified via their dashboard: the new lead appears in their assigned leads list with full AI analysis visible
If the lead replies on WhatsApp: the message arrives at the Meta webhook, is validated, matched to the lead by phone number, and stored in the messages collection
Follow-up dates are tracked automatically: the daily cron job at 8 AM UAE time flags any lead whose follow-up date has arrived, surfacing it on the agent’s dashboard
System architecture Flow Diagram
Subscription plans
LeadFlow AI is sold as a monthly SaaS subscription in UAE Dirhams. Both plans include a 7-day free trial before the first charge. Stripe Checkout handles the payment flow; Stripe Billing Portal handles self-service plan changes and cancellations.
Plan
Price
Lead Limit
Included Features
Basic
AED 149 / month
100 leads / month
AI classification, WhatsApp auto-reply, agent assignment, follow-up tracking
Pro
AED 399 / month
Unlimited leads
Everything in Basic + analytics dashboard, agent performance tracking, priority support
The Basic plan lead limit is enforced server-side on every lead submission. When the 100-lead monthly cap is reached, the API returns an HTTP 429 response with a clear upgrade message. Pro plan subscribers have no cap.
Dashboard overview
Owner dashboard
The owner's view is the brokerage’s operational command centre. It shows four headline KPIs (total leads, hot leads, follow-ups today, new leads this week), an agent performance breakdown, and a live feed of the most recent leads. Owners can reassign any lead to a different agent directly from this view.
Role-restricted: visible only to owner accounts
Agent dashboard
The agent's view is designed for daily use. It shows the agent’s assigned lead count, active (non-closed) lead count, and follow-ups currently due, the three numbers that define their working day. Below the KPIs is a list of their most recently assigned leads.
Agents only see leads assigned to them: enforced at the API level
Lead detail page
Each lead has a dedicated detail page showing all contact information, AI classification results (language, intent, temperature), the full WhatsApp message thread, and status controls. Agents can update the lead’s status, set or clear a follow-up date, and send new messages directly from this page.
Message thread includes AI replies, agent messages, and incoming WhatsApp replies in chronological order
Pricing page
Public-facing pricing page displays both plans with feature lists and a “Start Free Trial” call-to-action. Clicking a plan triggers Stripe Checkout in AED, with the 7-day trial clearly communicated before any payment details are entered.
Currency displayed in AED; trial communicated pre-checkout
Lead classification & AI scoring
Every inbound lead is processed by GPT-4o using a structured system prompt that enforces a consistent professional tone and returns strict JSON. The model evaluates four dimensions simultaneously and returns them in a single API call.
Temperature
Score
Routing Action
Classification Criteria
HOT
High
Immediate agent assignment + WhatsApp reply
Mentions specific budget, area, or timeline. Clearly ready to act.
WARM
Medium
Assigned + follow-up date set
Shows genuine interest but lacks specifics about budget, area, or timing.
COLD
Low
Stored, lower priority nurture
General inquiry, browsing behaviour, or unclear intent.
The AI prompt explicitly defines the classification rules for each temperature band, prohibits emojis and slang, and instructs the model to respond in the detected language of the lead’s message. The system prompt is fixed (not user-editable) to ensure brand consistency across all brokerages.
Project evolution & key milestones
The platform scope expanded significantly from an initial lead capture proof-of-concept. Key additions and refinements delivered across the build:
AI & classification
GPT-4 integration upgraded to GPT-4o for higher accuracy and lower latency
Temperature set to 0.4 after testing: lower values produced overly rigid replies; higher values produced inconsistent classification
Fallback reply added, so no lead is ever unanswered if the OpenAI API is unavailable
Intent classification expanded from buy/rent to include invest and inquiry as distinct categories
WhatsApp integration
Initial outbound-only integration expanded to support two-way messaging via the Meta webhook
Incoming message matching logic added: sender phone matched to the most recent lead record in Firestore
HMAC-SHA256 signature validation added using the Meta App Secret for all incoming webhook payloads
Phone number cleaning function added to handle +, spaces, and dashes from various form inputs
Agent assignment
Initial random assignment replaced with deterministic round-robin using a Firestore atomic counter transaction
Counter document stored per brokerage (assignment_{ownerUid}) to ensure correct rotation per team
Graceful fallback: if no agents exist, the lead is stored unassigned rather than failing
Subscription billing
Stripe integration added with two recurring AED products (Basic and Pro)
7-day free trial added to subscription_data at checkout session creation
Stripe webhook handler added for checkout.session.completed, customer.subscription.updated, and customer.subscription.deleted events
Subscription status synced to Firestore user record in real time on every Stripe event
Basic plan 100-lead monthly cap enforced server-side via Firestore count() query
Stripe Billing Portal endpoint added for self-service plan management
Security & access control
Firebase Auth middleware added to all protected routes; public lead capture endpoint intentionally left unprotected
requireSubscription middleware added to check subscription status for both owners and agents (agents inherit from the owner)
requireRole middleware added for owner-only routes (owner dashboard, agent management)
Raw body preservation implemented for Stripe and WhatsApp webhook routes (bypassing Express JSON parsing)
Follow-up system
followUpDate field added to lead schema; agents can set it from the lead detail page
Daily cron job added via node-cron: runs at 8:00 AM UAE time (UTC+4 = 04:00 UTC)
Batch Firestore update sets followUpDue: true on all leads whose date has arrived, for efficient dashboard display
Data flow architecture
A reference overview of how data moves through each stage of the system and at what cadence:
Stage
Source
Destination
Trigger / Cadence
Lead intake
Website form / API call
Express backend
On submission (real-time)
AI processing
OpenAI GPT-4o
Firestore lead record
Per lead, synchronous
Agent assignment
Firestore counters (round-robin)
Lead record (assignedAgentId)
Per lead, synchronous
WhatsApp reply
AI-generated reply text
Lead's phone (Meta API)
Per lead, async
Follow-up check
Firestore leads collection
followUpDue flag on each lead
Daily at 8:00 AM UAE time
Dashboard refresh
Firestore (Realtime queries)
Owner / Agent dashboard
On page load / request
Subscription sync
Stripe webhook events
Firestore user record
On Stripe event (real-time)
Note
Firestore is the single source of truth for all lead records, message threads, user profiles, subscription status, and round-robin counters. The Firebase Admin SDK (backend) and Firebase Web SDK (frontend) both read from the same Firestore project, with security rules and server-side middleware providing access control.
API reference
All endpoints are prefixed with /api/. Protected routes require a Firebase ID token in the Authorization: Bearer <token> header. The lead capture endpoint (/api/leads POST) is intentionally public to allow embedding on any brokerage website without authentication.
Method
Endpoint
Description
POST
/api/leads
Public lead capture: no auth required. Runs AI, assigns agent, sends WhatsApp.
GET
/api/leads
List leads (owners see all, agents see assigned only). Filterable by status, temperature, intent.
GET
/api/leads/:id
Single lead detail with access control (role-based).
PATCH
/api/leads/:id
Update lead status, follow-up date, or agent assignment.
GET
/api/leads/:id/messages
Retrieve full message thread for a lead.
POST
/api/leads/:id/messages
Agent sends a message, delivered via WhatsApp if phone is available.
GET
/api/dashboard/owner
Owner dashboard: total leads, hot leads, follow-ups today, agent performance.
GET
/api/dashboard/agent
Agent dashboard: assigned leads, active leads, follow-ups due.
POST
/api/stripe/create-checkout
Create Stripe Checkout session (Basic or Pro plan, AED, 7-day trial).
POST
/api/stripe/portal
Create Stripe Billing Portal session for plan management.
Meta webhook verification challenge (subscribe mode).
POST
/api/whatsapp/webhook
Receive incoming WhatsApp messages, match to lead by phone, store in messages collection.
GET
/api/health
Health check: returns server status and timestamp.
Security
LeadFlow AI is built with multi-tenant security as a first-class requirement. Each security layer is implemented independently so that no single point of failure exposes brokerage data.
Security Layer
Implementation
Firebase ID Token Auth
All protected routes verify Bearer token via Firebase Admin SDK. Invalid or expired tokens return 401.
Subscription Gate
Middleware checks owner subscription status (active / trialing) before allowing access. Agents inherit their owner’s subscription.
Role-Based Access Control
requireRole(‘owner’ | ‘agent’) middleware enforces role boundaries. Agents can only access their assigned leads.
WhatsApp Signature Validation
Incoming Meta webhooks validated via HMAC-SHA256 using App Secret. Invalid signatures return 401.
Stripe Webhook Verification
Stripe events verified using stripe.webhooks.constructEvent with the webhook signing secret.
Helmet HTTP Headers
Sets security headers (XSS, clickjacking, content-type sniffing) via the Helmet middleware.
CORS Restriction
Requests accepted only from the configured FRONTEND_URL. Credentials are required for authenticated calls.
Plan Limit Enforcement
Basic plan lead cap (100/month) enforced server-side via Firestore count query on every lead submission.
Image: The pricing page: a Basic plan at AED 149 per month and a Pro plan at AED 399 per month, both with a 7-day free trial.
Image: The live demo: a sample enquiry is classified by GPT-4o as a HOT lead, with intent, urgency, language and an AI-generated WhatsApp reply.
Closing Remarks
LeadFlow AI streamlines real estate lead management through AI-powered qualification, multilingual WhatsApp communication, automated assignment, and follow-ups helping brokerages improve efficiency and manage prospects more effectively.