Data Function

Case study · Custom software · Automation

Lead-to-Site Pipeline: Lead in, website out.

A framework that turns a sales lead from the CRM into a finished, quality-checked preview website for that business, live on its own web address, in under a minute and without any manual design work.

Client
Data Function (internal)
Our role
Concept, architecture, templates, build and deployment
Timeline
October 2026
Status
In production: 38 previews live
Trades template home page generated for a fictional general contractor
Demo screenshot: the fictional businesses used for development. Real lead sites are private sales material.

The pipeline, one lead at a time

  1. 01ImportRead the CRM export. Clean names, filter junk and duplicates.
  2. 02ClassifyMap the CRM category to an industry template and trade.
  3. 03ValidateCheck the business record against a strict schema.
  4. 04BuildRender a static multi-page site with Astro.
  5. 05QATest every page at 4 screen widths in a real browser.
  6. 06ReviewA person approves it from the report and screenshots.
  7. 07PublishUpload to its own subdomain, then re-check it live.

01

The problem

Data Function sells websites to local service businesses: plumbers, roofers, painters, HVAC contractors. Many of them have an outdated site or none at all. The most convincing pitch is to show them their own new website before they have spent anything.

  • Doing that by hand meant hours of design work per lead, for a business that might never reply.
  • Generic AI site builders were faster but unsafe for a sales pitch: they invent reviews, licences, prices and years in business.
  • Showing a business owner made-up claims about their own company loses the deal and creates legal risk.

How do you produce a real-looking site for hundreds of leads, quickly, without inventing a single fact?

02

The idea

Treat each lead as structured data instead of a design brief. If the facts about a business (name, trade, phone, area, address) are rendered through templates designed for its industry, every site comes out on-brand and accurate by construction.

Deterministic code does all the building; there is no language model at build time. The same lead always produces the same site, every statement on it can be traced back to a CRM field, and a batch of a hundred costs nothing but compute time.

03

The solution

  • The generator reads a CRM export and runs each lead through import, classification, validation, build, asset pruning, screenshots and the full QA suite. It writes a report with a status, reasons and review flags for every lead. One bad lead never stops a batch.
  • The deployer publishes approved sites, each to its own subdomain. Uploads are atomic, so a half-copied site is never served. Each site is then re-checked live: every page, the noindex header, the phone link and the footer text.
  • Five industry templates share one data contract: Trades & Home Services (12 trades), Food & Hospitality, Beauty & Personal Care, Health & Professional Services, and Fitness.
  • Trades template for a fictional roofing company with a full-bleed photo hero
    Trades · RoofingFull-bleed hero · per-trade accent colour
  • Trades template for a fictional landscaping company
    Trades · LandscapingEditorial hero
  • Food template for a fictional restaurant
    Food & HospitalityRestaurant
  • Beauty template for a fictional salon
    Beauty & Personal CareSalon
  • Beauty template for a fictional barber shop
    Beauty · BarberSame template, different subtype
  • Health template for a fictional physiotherapy clinic
    Health & ProfessionalPhysiotherapy clinic
  • Fitness template for a fictional gym
    FitnessGym & studios

04

The approach

  • Honest by design

    Nothing is invented. A missing fact removes its section instead of filling it. Generic services are labelled as typical jobs to confirm. Stock photos are captioned as illustrative, never as the business's own work.

  • Designed per industry

    Five separate templates, not recolours of one layout. A plumber's site leads with click-to-call and quote requests; a restaurant's with menu and hours. Trades get their own accent colour, photo set and one of three hero layouts.

  • Data quality at the door

    The importer strips SEO keyword tails from business names, corrects categories when the name clearly names another trade, and rejects test records, suppliers, trade associations and duplicate phone numbers, each with a written reason.

  • A person approves every site

    Automation does the work and a person makes the call. Sites flagged for review cannot be published without an explicit sign-off, and anything that fails QA is never published.

  • Safe to operate

    Read-only access to the CRM. Every preview is hidden from search engines. Real lead data is kept out of version control. Any preview can be taken down with one command.

  • Lightweight output

    Static HTML with responsive WebP images and no client framework. Unused assets are pruned after each build, cutting each site from about 98 MB of build output to 3 to 16 MB.

05

Quality gates

Mobile view of the Trades template with the sticky call and quote bar

Every generated site runs through an automated browser test before a person ever sees it. It covers every page at 360, 768, 1024 and 1440 px wide:

  • No horizontal scrolling, broken images, console errors or dead internal links
  • Tap targets at least 44 px, body text at least 16 px, one heading per page in order
  • Phone and address shown exactly as supplied, with a working call link
  • Structured data for local search, a noindex tag, and no placeholder text
  • Mobile call bar visible without covering content; menu and skip link usable from the keyboard

Lighthouse on the Trades demo: Accessibility 100, Best Practices 100, Performance 81 to 100.

06

Results

  • 38preview websites live, one per business
  • 0QA failures across 44 generated sites
  • ~40 sper site including full QA (~10 s without)
  • 5industry templates, 12 trade variants
  • 53real CRM leads processed in the first run
  • 9rejected automatically, each with a reason
  • 6held back by human review (data mismatch, language)
  • 100Lighthouse accessibility score
From CRM export to live site
  • Leads in53
  • Importable44
  • Built and passed QA44
  • Approved and live38

What used to take hours of design per lead now takes about a minute of machine time and a short human review. The sales team gets a link to a site that is specific to each prospect, and every claim on it is one the business itself published.

07

Built with

  • Astro (static site generation)
  • TypeScript
  • Zod schemas
  • Node.js CLI
  • Playwright + Chrome
  • Lighthouse
  • nginx
  • CloudPanel VPS
  • Wildcard DNS
  • SSH atomic deploys
  • Git / GitHub

08

What's next

  • Write each preview URL and screenshot back to the lead in the CRM, so sales can pitch straight from the pipeline
  • Wildcard HTTPS for every preview subdomain
  • French-language previews for Quebec businesses
  • Live quote forms that reach the business once a site is sold
  • Scheduled runs on fresh CRM exports, with automatic expiry of unconverted previews

Have a similar problem?

A free 30-minute call, then a written proposal before any work starts.

Automate a process like this

Free consultation

Tell us what is slowing your business down

A free 30-minute consultation about a custom website, custom software, a business valuation, AI or automation. We tell you what we would do first and roughly what it would cost. A person replies within one business day.

Or reach us directly:info@datafunction.ca+1 416-319-3884