AI & B2B Automation · Global Scale

How to Build an AI Dealer Intelligence System That Scores, Filters & Auto-Messages Dealers — Anywhere in the World

A complete technical guide to building a dealer intelligence pipeline from scratch — scrape any marketplace globally, score every lead with AI logic, auto-route to your sales team, and fire personalized WhatsApp messages without lifting a finger. Any product. Any industry. Any country. Unlimited scale.

Leads — no ceiling
195
Countries supported
$0
Core infrastructure cost
Mayank Digital Lab April 6, 2026 14 min read Apps Script · Twilio · Firecrawl · Make.com

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.

Who this guide is for

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

South Asia
IndiaMart, JustDial, Tradeindia
India's largest B2B and SME marketplaces
Global B2B
Alibaba, Global Sources
Asia-Pacific and worldwide manufacturer/distributor directories
North America
Thomasnet, Kompass
US and European industrial supplier directories
General
Google Maps, Yellow Pages
Local business listings in any country
Professional
LinkedIn Sales Navigator
Decision-maker contacts at distributor companies worldwide
Custom
Any public website
Trade association directories, government vendor lists, chamber of commerce portals

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
Adaptable to any industry

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:

01
Any Marketplace
Raw dealer data source
02
Firecrawl
Web scraping → CSV
03
Apps Script
AI scoring + filtering
04
Google Sheets
5-tab live dashboard
05
Twilio
WhatsApp automation
📊
Google Sheets + Apps Script
Free · Core data store and automation engine
🔥
Firecrawl
Freemium · Structured web scraping from any marketplace
💬
Twilio WhatsApp API
~$0.005/msg · Outreach and sales rep alerts
⚙️
Make.com (optional)
Freemium · Advanced multi-step workflow triggers

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 TypeBase ScoreWhy It Scores High
Direct product category (e.g. Roofing, PC Sheets)9.5Already sells your product category
Adjacent material (e.g. Aluminium, Glazing)9.0Same buyer profile, high conversion
Hardware / Building supplies8.5Strong channel fit
Fabrication / Steel8.5Industrial buyer, infrastructure projects
Plastic / Polymer distributor8.0Material familiarity
Engineering / Construction7.0Broad fit, lower purchase intent
Unrelated / Generic retail3.0–5.0Unlikely channel partner

Score Modifiers

SignalModifier
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 detectedFLAG → Auto-remove

The Four Dealer Buckets

Hot Auto Lead
9.0+
Call immediately. WhatsApp fires automatically within minutes.
Verify First
7.5–8.9
Confirm business type or GST before committing outreach.
Nurture
5.0–7.4
Monthly drip. Worth developing over time.
Skip / Ignore
<5.0
Filtered out. Competitors auto-removed before output.

05 Step 1 — Scrape Dealer Data from Any Marketplace

1A

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
1B

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
Always clean phone numbers before processing

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
Performance: always batch-write data

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:

TabContentsPrimary User
DashboardSummary metrics, zone/region breakdown, funnel totalsSales Manager
Hot LeadsScore ≥ 9.0 dealers + call status dropdownSales Reps
All DealersFull filtered dataset across all bucketsOps / Admin
Dealer MessagesPersonalized WhatsApp draft per dealerSales Reps
Sales AlertsAuto-alert log sent to zone reps via WhatsAppSales 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
!
Do not use cell formula references in your data range

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)

  1. Create a free account at twilio.com
  2. Go to Messaging → Try it out → Send a WhatsApp message
  3. Note your sandbox number and join keyword
  4. Send the join keyword from your test phone to activate
  5. 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
Switching from sandbox to production

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

A

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.

B

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
C

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.

Make.com for advanced workflow control

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)CityBusiness TypeScoreVerifiedAction
01RoofTech Supplies LtdMetro City ARoofing / Sheets9.8CALL NOW
02AlphaGlaze WorksMetro City AAluminium / Glazing9.8CALL NOW
03Premier Hardware DepotPort City BHardware / Building9.6CALL NOW
04Eastern Fab IndustriesIndustrial City CFabrication / Steel9.6CALL NOW
05Nexus Polymer DistributorsMetro City APlastic / Polymer9.1CALL NOW
06Crown Roofing SolutionsMetro City ARoofing / Sheets9.3CALL NOW
07Northern Build MartRegional City DHardware8.7VERIFY
08Central Engineering Co.City EEngineering7.8VERIFY
09Sunridge Construction LtdCity FConstruction7.3NURTURE
10Apex Polymer TradersPort City BPlastic / Polymer8.1CALL 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 LevelDealer VolumeRecommended Stack
StarterUp to 50,000 rowsGoogle Sheets + Apps Script (as described in this guide)
Growth50K – 500K rowsSupabase (PostgreSQL) + Apps Script or Make.com triggers
Enterprise500K+ rowsGoogle 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

🔗
Make.com Workflows
Conditional message triggers, multi-step approvals, CRM updates — all without code.
WhatsApp Business API
Replace sandbox with a verified business number. Required for production-scale outreach.
🤖
AI Message Personalization
Use an LLM API to generate context-aware outreach based on each dealer's business type, city, and score.
📈
Looker Studio Dashboard
Connect your Google Sheet for a real-time visual pipeline dashboard — shareable with your entire team.

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

Mayank Digital

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.

✅ AI Dealer Scoring Systems ✅ WhatsApp Business Automation ✅ Google Sheets & CRM Pipelines ✅ n8n & Make.com Workflows ✅ B2B Lead Qualification AI
Get a Free Strategy Call →

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.