01 The Problem: Sales Teams Flying Blind on Dealer Data
Picture this: your sales team has just pulled a list of 5,000 potential dealers from a marketplace. Hardware shops, fabricators, distributors, construction suppliers — all mixed together with no signal on which ones are actually worth calling. They start dialing randomly. Three hours later, they've reached 40 businesses, 30 of which were completely irrelevant.
This is the default state for most B2B manufacturers and distributors. Dealer acquisition is manual, slow, and expensive — not because the data doesn't exist, but because no one has built a system to prioritize it intelligently.
The AI dealer intelligence pipeline solves this entirely. Every lead gets a score. Every score maps to an action. Every action triggers automatically — without a human in the loop.
B2B manufacturers, national distributors, and sales ops teams who have dealer/distributor networks to build — in any country, any industry. No prior coding experience required beyond basic JavaScript comfort.
02 What This System Can Actually Do (Global Scope)
This is not a tool limited to one country or one marketplace. The pipeline is designed to work with any publicly listed dealer data source, anywhere in the world.
Supported Data Sources
Scale — No Upper Limit
- Firecrawl can process hundreds of thousands of pages per crawl job
- Google Sheets handles up to ~500,000 rows comfortably
- For larger datasets, swap Sheets for BigQuery or Supabase — same scoring logic applies
- Twilio WhatsApp scales to millions of messages per month on a business account
The scoring engine uses keyword-based business type matching. Swap the keywords and score weights to fit your product — roofing materials, FMCG, industrial equipment, pharmaceuticals, agrochemicals, electronics. The architecture is identical.
03 System Architecture Overview
Five components, all free or near-zero cost at the core level:
04 The AI Dealer Scoring Engine (1–10 Logic)
Every dealer gets a score from 1 to 10 based on three weighted signals: business type fit, location tier, and verification status. The score determines the bucket — and the bucket determines the automated action.
Base Score by Business Type
Customize the categories and weights to match your product. The example below is for a building materials manufacturer:
| Business Type | Base Score | Why It Scores High |
|---|---|---|
| Direct product category (e.g. Roofing, PC Sheets) | 9.5 | Already sells your product category |
| Adjacent material (e.g. Aluminium, Glazing) | 9.0 | Same buyer profile, high conversion |
| Hardware / Building supplies | 8.5 | Strong channel fit |
| Fabrication / Steel | 8.5 | Industrial buyer, infrastructure projects |
| Plastic / Polymer distributor | 8.0 | Material familiarity |
| Engineering / Construction | 7.0 | Broad fit, lower purchase intent |
| Unrelated / Generic retail | 3.0–5.0 | Unlikely channel partner |
Score Modifiers
| Signal | Modifier |
|---|---|
| GST / VAT / Tax verified | +0.5 |
| Tier-1 city (metro, high-volume market) | +0.3 |
| Tier-2 city (growing secondary market) | +0.1 |
| Competitor dealer detected | FLAG → Auto-remove |
The Four Dealer Buckets
05 Step 1 — Scrape Dealer Data from Any Marketplace
Configure Firecrawl for Your Target Source
Firecrawl is a web crawling API that returns structured data from any website. Point it at your marketplace search results and it returns clean JSON or CSV — no manual copy-paste needed.
// Example search URL patterns (replace with your marketplace + product)
// IndiaMart (India)
https://www.indiamart.com/search.mp?ss=YOUR+PRODUCT+KEYWORD
// Thomasnet (USA)
https://www.thomasnet.com/search/?searchterm=YOUR+PRODUCT
// Alibaba (Global)
https://www.alibaba.com/trade/search?SearchText=YOUR+PRODUCT
// Google Maps (any country)
https://www.google.com/maps/search/dealer+YOUR+PRODUCT+CITY
URL patterns
Required CSV Column Structure
Your scraped output must have at minimum these columns for the scoring engine to work:
Company, City, State/Region, Phone, Source URL, Verified (GST/VAT/Tax)
// Example rows (fictional companies for illustration):
"RoofTech Supplies Ltd", "Example City", "Region A", "98XXXXXXXX", "https://...", "Verified"
"AlphaFab Works", "Example City", "Region B", "70XXXXXXXX", "https://...", "Not Verified"
"Metro Hardware Depot", "Metro City", "Region A", "91XXXXXXXX", "https://...", "Verified"
CSV
Marketplace listings often include country codes, spaces, or dashes. Strip everything non-numeric and keep only the last 10 digits (or your country's standard). This ensures WhatsApp delivery works correctly.
06 Step 2 — Score & Filter with Google Apps Script
The scoring logic runs inside Google Apps Script — a free JavaScript environment attached to your Google Sheet. Here's the complete, adaptable scoring function:
function scoreDealer(businessType, city, verified, competitors) {
let score = 5.0; // default baseline for unknown types
// --- Step 1: Business type base score ---
const typeMap = {
'roofing': 9.5, 'sheet': 9.5,
'aluminium': 9.0, 'glazing': 9.0,
'hardware': 8.5, 'timber': 8.5,
'fabrication': 8.5, 'steel': 8.5,
'plastic': 8.0, 'polymer': 8.0,
'engineering': 7.0, 'construction': 7.0
};
const lowerType = businessType.toLowerCase();
for (const [keyword, baseScore] of Object.entries(typeMap)) {
if (lowerType.includes(keyword)) { score = baseScore; break; }
}
// --- Step 2: Auto-remove competitors ---
const lowerComp = competitors.map(c => c.toLowerCase());
if (lowerComp.some(c => lowerType.includes(c))) {
return { score: 0, bucket: 'IGNORE', flag: 'COMPETITOR' };
}
// --- Step 3: Verification modifier ---
if (verified === 'Verified') score += 0.5;
// --- Step 4: City tier modifier ---
const tier1Cities = ['metro', 'capital', 'port'];
const tier2Cities = ['secondary', 'regional'];
const lowerCity = city.toLowerCase();
if (tier1Cities.some(c => lowerCity.includes(c))) score += 0.3;
else if (tier2Cities.some(c => lowerCity.includes(c))) score += 0.1;
score = Math.min(score, 10);
// --- Step 5: Assign bucket ---
const bucket =
score >= 9.0 ? 'HOT AUTO LEAD' :
score >= 7.5 ? 'VERIFY FIRST' :
score >= 5.0 ? 'NURTURE' : 'IGNORE';
return { score, bucket, flag: 'OK' };
}
Google Apps Script
Apply Color-Coding to Rows
function colorByBucket(sheet, row, bucket) {
const palette = {
'HOT AUTO LEAD': '#d9ead3',
'VERIFY FIRST': '#fce5cd',
'NURTURE': '#cfe2f3',
'IGNORE': '#f4cccc'
};
sheet.getRange(row, 1, 1, 13).setBackground(palette[bucket] || '#ffffff');
}
Google Apps Script
Never write row by row inside a loop — it's 100x slower. Build a 2D array of all processed rows, then write in one call: sheet.getRange(2, 1, data.length, 13).setValues(data)
07 Step 3 — Build the 5-Tab Live Dashboard
Organize the Google Sheet into five purpose-built tabs, each serving a different function in your sales workflow:
| Tab | Contents | Primary User |
|---|---|---|
| Dashboard | Summary metrics, zone/region breakdown, funnel totals | Sales Manager |
| Hot Leads | Score ≥ 9.0 dealers + call status dropdown | Sales Reps |
| All Dealers | Full filtered dataset across all buckets | Ops / Admin |
| Dealer Messages | Personalized WhatsApp draft per dealer | Sales Reps |
| Sales Alerts | Auto-alert log sent to zone reps via WhatsApp | Sales Manager |
Column Structure (All Dealers Tab)
A: Company Name B: City C: State / Region
D: Business Type E: Phone F: Category
G: Verified H: Source I: Score
J: Bucket K: WhatsApp Draft
L: Next Action M: Flag
Sheet Structure
References like =A2&" "&B2 cause #REF! errors when rows restructure. Always write pure values via .setValue() — never dynamic formula references inside your data range.
08 Step 4 — Automate WhatsApp Outreach with Twilio
Once dealers are scored and bucketed, the system fires personalized WhatsApp messages via Twilio's WhatsApp API. Two flows run automatically: outreach to dealers, and internal alerts to your sales reps.
Setup: Twilio WhatsApp Sandbox (Free Testing)
- Create a free account at twilio.com
- Go to Messaging → Try it out → Send a WhatsApp message
- Note your sandbox number and join keyword
- Send the join keyword from your test phone to activate
- Copy your Account SID and Auth Token from the Twilio Console dashboard
Dealer Outreach Message Function
function sendDealerOutreach(phone, companyName, city, productCategory) {
const ACCOUNT_SID = 'YOUR_TWILIO_ACCOUNT_SID';
const AUTH_TOKEN = 'YOUR_TWILIO_AUTH_TOKEN';
const FROM_NUMBER = 'whatsapp:+1XXXXXXXXXX';
const TO_NUMBER = \`whatsapp:+\${phone}\`;
const messageBody = [
\`Hello, we are reaching out to \${companyName} in \${city}.\`,
\`We manufacture \${productCategory} and are looking for authorized\`,
\`dealers in your area. Interested in a partnership?\`,
\`Reply YES for product details and pricing.\`
].join(' ');
const endpoint = \`https://api.twilio.com/2010-04-01/Accounts/\${ACCOUNT_SID}/Messages.json\`;
const credentials = Utilities.base64Encode(\`\${ACCOUNT_SID}:\${AUTH_TOKEN}\`);
UrlFetchApp.fetch(endpoint, {
method: 'post',
headers: { Authorization: \`Basic \${credentials}\` },
payload: { From: FROM_NUMBER, To: TO_NUMBER, Body: messageBody }
});
}
Google Apps Script
Internal Sales Rep Alert Function
function sendRepAlert(repPhone, dealer) {
const alertLines = [
\`HOT LEAD ALERT\`,
\`Company : \${dealer.company}\`,
\`Score : \${dealer.score}/10\`,
\`Phone : \${dealer.phone}\`,
\`City : \${dealer.city}\`,
\`Bucket : \${dealer.bucket}\`,
\`Action : Call within 24 hours\`
];
// use same Twilio fetch with TO = repPhone
}
Google Apps Script
Only two lines change: ACCOUNT_SID and AUTH_TOKEN. Everything else stays identical. Always test on sandbox first, then swap credentials for production.
09 Step 5 — Deploy, Trigger & Run on Autopilot
Paste the Script and Authorize
Open your Google Sheet → Extensions → Apps Script. Paste in all functions (scoring, bucketing, formatting, Twilio). Save and run once to grant the required permissions: Sheets, UrlFetch, Drive.
The Master Function
function runDealerIntelligence() {
clearAllSheets(); // wipe old data
const raw = loadDealersFromCSV(); // read uploaded CSV
const scored = scoreDealers(raw); // apply scoring engine
writeToAllSheets(scored); // populate all 5 tabs
applyBucketFormatting(); // color-code rows
sendHotLeadAlerts(scored); // fire WhatsApp alerts
}
Google Apps Script
Set a Daily Trigger for Full Autopilot
In Apps Script → Triggers, add a time-driven trigger: run runDealerIntelligence every morning at 8 AM. New data gets processed overnight. Your team wakes up to a fully scored, color-coded, WhatsApp-ready lead dashboard — every single day.
Connect Make.com via Google Sheets webhook to trigger messages only when specific conditions are met — like when a rep marks a lead "Interested," or when a new row is added above score 9.0. No additional code required.
10 Sample Output: Scored Dealer Table
Below is an example output table using fictional company names to illustrate what the scored dashboard looks like in practice.
| # | Company (Example) | City | Business Type | Score | Verified | Action |
|---|---|---|---|---|---|---|
| 01 | RoofTech Supplies Ltd | Metro City A | Roofing / Sheets | 9.8 | ✓ | CALL NOW |
| 02 | AlphaGlaze Works | Metro City A | Aluminium / Glazing | 9.8 | ✓ | CALL NOW |
| 03 | Premier Hardware Depot | Port City B | Hardware / Building | 9.6 | ✓ | CALL NOW |
| 04 | Eastern Fab Industries | Industrial City C | Fabrication / Steel | 9.6 | ✓ | CALL NOW |
| 05 | Nexus Polymer Distributors | Metro City A | Plastic / Polymer | 9.1 | ✓ | CALL NOW |
| 06 | Crown Roofing Solutions | Metro City A | Roofing / Sheets | 9.3 | ✗ | CALL NOW |
| 07 | Northern Build Mart | Regional City D | Hardware | 8.7 | ✓ | VERIFY |
| 08 | Central Engineering Co. | City E | Engineering | 7.8 | ✓ | VERIFY |
| 09 | Sunridge Construction Ltd | City F | Construction | 7.3 | ✗ | NURTURE |
| 10 | Apex Polymer Traders | Port City B | Plastic / Polymer | 8.1 | ✓ | CALL NOW |
All company names above are fictional examples only. Competitor dealers are auto-flagged and removed before this table is generated.
11 Scaling Beyond Google Sheets
Google Sheets is the right starting point — zero cost, instant setup, no infrastructure. But as your pipeline grows, here's how to scale each layer:
| Scale Level | Dealer Volume | Recommended Stack |
|---|---|---|
| Starter | Up to 50,000 rows | Google Sheets + Apps Script (as described in this guide) |
| Growth | 50K – 500K rows | Supabase (PostgreSQL) + Apps Script or Make.com triggers |
| Enterprise | 500K+ rows | Google BigQuery + Cloud Functions + Looker Studio dashboard |
The scoring logic — the JavaScript functions — remains identical at every scale level. Only the data storage and trigger layer changes. Abstract your business logic from your infrastructure from day one.
12 What's Next: Make.com, AI Personalization & CRM Sync
This guide is the foundation. Each of these layers can be added incrementally — start with the sheet, add Make.com when your volume grows, and layer in AI personalization when your messaging needs to feel more human.
References & Further Reading
- Google Apps Script Documentation — Official guide to automating Google Sheets and Workspace
- Twilio WhatsApp API Docs — Complete reference for sending WhatsApp messages programmatically
- n8n Documentation — How to build no-code automation workflows and connect business tools
- Google BigQuery Docs — Scaling data pipelines from Sheets to enterprise-grade analytics
- Wikipedia: Lead Scoring — What it is and how AI improves B2B lead qualification
Need Help Building an AI Dealer Intelligence System?
At Mayank Digital Lab, we help B2B manufacturers and distributors worldwide build custom AI automation pipelines — dealer scoring, WhatsApp outreach, CRM sync, and live dashboards. We set it up end-to-end so your sales team works smarter, not harder.
No commitment. Just a 30-minute call to see how we can help.
Frequently Asked Questions
What is an AI dealer intelligence system?
An AI dealer intelligence system automatically scores and ranks your B2B dealers based on their sales potential, order history, and engagement data. It replaces manual spreadsheet work with a fully automated pipeline that flags your best leads and fires personalized WhatsApp messages — without human input.
What tools do I need to build a dealer intelligence system?
You need Google Apps Script or n8n for automation logic, Google Sheets for data storage, a WhatsApp Business API provider (like Twilio) for messaging, and optionally an AI API (Claude, GPT-4) for smarter scoring. All core tools have free tiers — you can start at $0.
Is this system free to build?
Yes — the core stack (Google Apps Script + Google Sheets + Twilio sandbox) is completely free for testing. For production scale, costs are low: n8n self-hosted is free, WhatsApp API charges per message, and AI API calls cost fractions of a cent each.
Can this work for any B2B industry?
Absolutely. The scoring logic and automation pipeline works for any business that manages dealers, resellers, distributors, or channel partners — including manufacturing, construction, FMCG, electronics, pharma, and more. The system is industry-agnostic by design.
How long does it take to set up?
A basic version — Google Sheets + Apps Script + WhatsApp alerts — can be running in under a day if you follow this guide. A production-grade system with Make.com workflows, CRM sync, and AI personalization typically takes 3–7 days depending on complexity.
Keep Reading
More guides on AI, automation, and digital growth.


