ByteHint Logo™
HomeServices
Industries
Resources
About Us
Contact
ByteHintByteHintByteHintByteHint
ByteHint Logo

Building innovative solutions for the digital future. Transform your ideas into reality with our cutting-edge technology.

Quick Links

HomeAbout UsBlogCase StudiesContactClient Testimonials

Legal

Privacy PolicyTerms & ConditionsRefund Policy

Get In Touch

Veerbhadra Nagar
Pune City, Maharashtra
India 411045

info@bytehint.com
+91 93709 55842
© 2026 ByteHint. All rights reserved.
Case studiesConcierge

A WhatsApp assistant that qualifies property leads and routes the warm ones

A WhatsApp assistant that qualifies property buyers in a short chat, scores each lead warm or cold, and hands warm leads to a sales agent, with a live dashboard.

Client
A real estate sales team
Industry
Real estate
Type
Bot

Navigate

The problem

Property enquiries arrive on WhatsApp. Before a sales agent knows whether a lead is worth a call, someone has to ask the same six questions: name, property type, budget, timeline, location and financing. That work is repetitive and delays the reply to the buyers who are ready to move.

  1. 01

    Repetitive first-touch questions

  2. 02

    Agent time spent on cold leads

  3. 03

    No room for invented answers

  4. 04

    Compliance from the first message

  5. 05

    Messaging the buyer first

The solution

A Node.js service receives WhatsApp messages and makes one Gemini call per turn, returning the reply, the extracted details and the warm or cold score together. Rules like the automation notice and STOP opt-out are enforced in code, not the prompt.

Cold outreach from the dashboard

Add a name and number, and the assistant opens the conversation after checking the number is on WhatsApp.

Natural qualification chat

One or two questions per turn, mirroring the buyer's language, collecting name, property type, budget, timeline, location and financing.

Structured scoring every turn

Each Gemini call returns the reply, the extracted fields and a warm or cold score as JSON, checked in code before it is trusted.

Guardrails in code

A fixed disclosure line, STOP opt-out handled before any model call, and a turn limit that defaults to cold.

Round-robin agent assignment

Warm leads go to the next active agent the moment they qualify, and the buyer is told who will call.

Live sales dashboard

Stat cards and a lead table with each buyer's answers, status and assigned agent, refreshed every five seconds behind an admin login.

How it works

A sales admin adds a buyer on the dashboard and the assistant messages them on WhatsApp: first a fixed line saying it is automated, then a short, natural conversation in English, Hindi or Hinglish. It never quotes prices or listings. When it has enough, it scores the lead warm or cold, assigns warm leads to the next agent, and tells the buyer who will follow up.

Architecture · Architecture

Architecture
Clients, the Node.js API and webhook, conversation logic, MongoDB, and the WhatsApp bridge and Gemini as external services.

Buyer reply message flow · Message Flow

Buyer reply message flow
One inbound WhatsApp message: instant webhook ack, STOP branch, Gemini call with a JSON schema, warm or cold decision and agent assignment.

Cold outreach sequence · Sequence

Cold outreach sequence
An admin adds a lead, the number is checked, and the bot sends the disclosure and first question.

Data model · Data Model

Data model
One conversation per buyer phone with embedded messages and qualification fields, and an agent assigned only when warm.

Admin login · Auth Flow

Admin login
Single admin password, HMAC-signed HTTP-only cookie, checked on every dashboard API call.

Key decisions

Structured LLM output instead of parsing text

Chose Gemini with a JSON response schema over Free-text replies parsed with regex, or a second extraction call

One call per turn returns the reply, the stop signal, the warm or cold score and the extracted fields together. The code still normalises the score and coerces the done flag before trusting it.

Compliance rules enforced in code, not the prompt

Chose Hardcoded disclosure, STOP before any model call, a turn cap that defaults to cold over Putting every rule in the system prompt

Behaviour that must never fail, such as saying the assistant is automated or honouring an opt-out, does not depend on the model following instructions.

WhatsApp transport behind one file

Chose A separate bridge process reached over HTTP, isolated in one transport module over The official Cloud API from day one, or in-process client libraries

The official API needs an approved template for the first outbound message. Two in-process libraries proved unreliable. Isolating the transport means moving to the official API changes one file.

One document per buyer

Chose A MongoDB conversation per phone number with embedded history and fields over A separate messages collection or relational tables

Every turn needs the full history for the model call, so a single read and write per turn keeps it simple, and warm leads are one query away.

Stateless round-robin

Chose Next agent derived from the count of assigned conversations over A stored cursor or a queue

Nothing extra to keep in sync. The code accepts that one cycle may misassign when the roster changes, which is fine at demo scale.

API architectureArchitecture
JSON REST for the dashboard, an inbound webhook from the WhatsApp bridge that acknowledges before processing, and outbound REST to the bridge and Gemini.
Security and compliance controlsSecurity & Access · Partial
Controls that support compliance work: a hardcoded automated-assistant disclosure, STOP opt-out that silences the bot, a prompt rule against stating prices, and secrets kept out of git.
Key-person riskEngineering & Delivery
About 1,100 lines with plain names, and a README and comments that explain why each choice was made and how to run it.
ReliabilityReliability & Operations · Partial
Gemini calls retry once on 503 or 429, a missing key returns a stub instead of crashing, and bad numbers fail fast with a country-code hint.

How we delivered it

  1. Phase 1

    Qualification bot and dashboard

  2. Phase 2

    Login and agent routing

Tech stack

Languages & Runtime

  • Node.js18+Bot runtime, using built-in fetch and node:crypto

Frameworks

  • Express4.22.3Dashboard JSON API and the WhatsApp webhook receiver

UI

  • React18.3.1Sales dashboard: lead table, stats, add-lead modal, agent settings

Backend Libraries

  • Mongoose8.24.4Conversation and Agent schemas, queries and populate
  • cookie-parser1.4.7Reads the signed admin session cookie
  • cors2.8.6Allows the dashboard origin with credentials

Database & Storage

  • MongoDBOne conversation document per buyer phone, plus the agent roster

AI & ML

  • Google GeminiOne generateContent call per buyer turn with a JSON response schema

Messaging & Bot Platforms

  • WhatsAppBuyer channel, reached through the GOWA REST bridge behind one transport file

Dev Tooling

  • Vite5.4.21Dashboard dev server with API proxy, and production build
  • dotenv16.6.1Loads environment configuration

Have a similar challenge?

Tell us what you're building and we'll show you how we'd approach it.

Talk to us

Navigate

Get started with
your project

More case studies

A one-month deadline, no team, and a working team in eight days
Consumer apps and creator economy
AI Social App Team BuildProject

A one-month deadline, no team, and a working team in eight days

A studio promised its creator client an AI social app in a month with one developer. We scoped the real need and had four roles working eight days after the first call.

React NativeExpoLLM orchestration
Velocity Tweaks: a design-first e-commerce site that reached a 25% CTR
Gaming and PC optimization
Velocity TweaksWebsite

Velocity Tweaks: a design-first e-commerce site that reached a 25% CTR

A full-stack, design-first e-commerce build for a PC optimization brand, with cart, checkout and key delivery, that reached a client-reported 25% CTR in a low-conversion niche.

ReactExpressStripe
An Amazon deals bot that posts the best gaming discounts to Discord
Gaming and PC optimization
Amazon Deals BotBot

An Amazon deals bot that posts the best gaming discounts to Discord

A Discord bot that pulls the best gaming deals from Amazon through its Product Advertising API and posts them to the community every four hours.

Pythondiscord.pyAmazon Product Advertising API