Skip to main content
Automation, AI & open source

Where Your Leads Actually Go: Routing Ads, Forms and Scraped Data into CRM, WhatsApp and ERP

Every lead source — ads, website forms, extracted data, inbound calls — can land in one place and notify the right person on the right channel. How the routing layer works, and why we install a subset of it rather than all of it.

MManojAugust 24, 20269 min read
More in Automation, AI & open source#crm#whatsapp#lead-routing
Share

If you have run a business for any length of time you already know the failure: a lead arrives, and nobody is quite sure where it went. It is in someone's inbox, or a Facebook notification nobody opened, or a spreadsheet a contractor keeps. This post walks through the lead routing layer that fixes it — one place every lead lands, and a notification that reaches the person who can act on it, on the channel they actually read. It also explains the part most automation posts skip: why we deliberately install a subset of this and not the whole thing.

You are reading this because you filled in the form on our contact page and watched it report, in the moment, exactly where your message went. That receipt is not a trick. It is the same routing layer described below, running on our own site, and the only thing special about this lead routing is that we made it visible.

I am Manoj, and I lead the implementation practice at MithTech. We install open-source business systems — Frappe/ERPNext, Medusa, n8n, Chatwoot — for organisations that have outgrown spreadsheets and do not want to rent their operations from a SaaS vendor.

Where do leads actually come from, and why do the sources never agree?

Almost every business we work with is capturing leads from some mix of these:

Website forms. The enquiry form, a pricing calculator, a downloadable guide, a newsletter box. Usually each one emails a different address, and at least one of them has been silently failing since a DNS change nobody connected to it.

Paid ads. Meta Lead Ads and Google Lead Form extensions collect a name and a number inside the ad platform. They sit there until someone remembers to export a CSV. The half-life of an ad lead is measured in minutes; the half-life of a CSV export is measured in weeks.

Extracted and enriched data. Trade-show scans, directory scrapes, a list bought from an industry body, LinkedIn exports. Structurally the same as an ad lead — a name, a number, a context — but it arrives as a file rather than an event, so it usually lands in a completely different pipeline, if it lands anywhere.

Inbound conversations. WhatsApp messages to the business number, a Chatwoot chat, a phone call. These are the highest-intent contacts a business gets, and they are the ones least likely to become a record anywhere.

The pattern is always the same. Four sources, four destinations, four different people assuming someone else picked it up. Nobody set out to build that — it accreted, one integration at a time.

How should lead routing be structured — one destination, then a fan-out?

The fix has two halves, and the order matters more than the tooling.

Half one: write it down before you tell anyone

Every source normalises to the same shape — name, contact, context, source, attribution — and gets written to one durable store first. In our stack that is a Frappe CRM Lead, or an ERPNext Lead where the customer already runs ERPNext, or a Payload collection when the site is the system of record.

This ordering is not fussiness. On our own site, the contact route persists the lead to Postgres and only then fans out to notifications. We learned that the hard way: an earlier version had the record as a side effect of the notifications, so when every channel was misconfigured at once the enquiry returned an error and vanished. The lead is the row. Everything else is a nudge about the row.

Half two: notify in parallel, never in sequence

Once the record exists, the notifications go out independently and concurrently. Not a chain — a fan-out. If the CRM webhook is down, the WhatsApp message still goes. If WhatsApp rate-limits you, the email still goes. Each channel reports success or failure on its own, and those results get written back onto the lead so you can see, weeks later, that the CRM push failed on the fourteenth and nobody noticed.

That is what the receipt on our contact form is showing you. Four independent results, reported honestly.

Which notification channel is right for which team?

This is the part where most automation advice goes wrong. It presents a menu and implies you want all of it. You do not.

+What is lead routing?

Lead routing is the layer between where an enquiry arrives and where it is worked. It normalises every source — website forms, ad platforms, extracted lists, inbound chats — into one record in a single system, then notifies the right person on the channel they actually read. Capture is rarely the problem; routing is.

Frappe CRM / ERPNext LeadThe durable record and assignmentSelf-hostedAnyone with more than one person on enquiries
WhatsApp (inbound alert)Telling the team a lead arrivedFree for internal notificationTeams that live in WhatsApp
WhatsApp Business APIMessaging the lead outboundPer conversationBusinesses running outbound campaigns
ntfyImmediate phone push, no vendorFree, self-hostedOwner-operators who want to know now
ChatwootUnified reply queue across channelsSelf-hostedHigh enquiry volume with a support function
EmailAudit trail and fallbackExistingEveryone, as a backstop

Frappe CRM / ERPNext Lead — the record

The destination, not a notification. This is where the lead is assigned, where its status moves, where the follow-up is logged, and where you eventually count conversion rate by source. If you install exactly one thing from this post, install this.

Right for: anyone with more than one person handling enquiries.

WhatsApp — the channel people actually read

For a large share of businesses in India, the UAE and Southeast Asia, WhatsApp is where work happens. A lead notification in a WhatsApp group that the sales team already has open all day gets picked up in minutes. The same information in email gets picked up when someone next processes their inbox, which might be Thursday.

Two distinct uses, and they get confused constantly:

  • Inbound notification — the business gets told a lead arrived. This is what fires on our contact form.
  • Outbound conversation — you message the lead. This one needs the WhatsApp Business API, a verified sender, and approved message templates, and it has real per-conversation costs.

Start with the first. It needs no template approval and delivers most of the value.

Right for: teams that live in WhatsApp — which, in our client base, is most of them.

ntfy — the alert nobody has to pay for

ntfy is a self-hostable push notification service. A topic, an HTTP POST, and a phone app. No per-message cost, no vendor account, no approval process. We use it for the on-call alert on our own site.

It sounds unglamorous next to WhatsApp, and it is the single highest value-per-hour integration we install. Ten minutes of work gives a business owner a phone buzz for the events they care about — a high-value enquiry, a failed payment, a stock-out — without a SaaS subscription.

Right for: owner-operators and small teams who want to know now and do not want another bill.

Chatwoot — when the lead wants to talk, not wait

If a meaningful share of your enquiries are people who want an answer inside two minutes, a shared inbox that unifies website chat, WhatsApp, email and Instagram into one queue is worth more than any amount of routing sophistication.

Right for: businesses with high enquiry volume and a real support function.

Email — the one you keep, and stop relying on

Email remains the audit trail and the fallback. It should not be the primary alert for anything time-sensitive.

Right for: everyone, as a backstop.

The glue: n8n

Sitting between the sources and the destinations is a workflow layer. We use n8n because it is self-hostable and the workflows stay yours. It is the backbone of the marketing automation work we do. It does the unglamorous work: polling the Meta Lead Ads API every few minutes, normalising a trade-show CSV into the same shape as a form submission, de-duplicating against existing leads by phone number, enriching from a company database, and deciding who gets assigned based on territory or product.

That de-duplication step is worth more than it sounds. A lead who filled a form, clicked an ad and messaged WhatsApp is one person, and a CRM showing three of them is a CRM your sales team stops trusting.

+Should a business connect every lead source at once?

No. The failure mode of automation projects is not broken tooling, it is asking a team to change how they work in eleven ways simultaneously. Fix the one gap where leads currently die, install the record plus the single channel the team already reads, run it for a month, and add the next thing only when someone asks for it.

Why do we install less lead routing than we could?

Here is the honest part. We have never installed all of this for one client, and we would push back hard on anyone who asked us to.

The failure mode of automation projects is not that the tools do not work. It is that someone builds a lead routing graph with eleven integrations, a team of six is asked to change how they work in eleven ways at once, and within a quarter they are back to the WhatsApp group and the spreadsheet — now with an expensive system running alongside, unmaintained, quietly out of date.

So the sequence we run is:

  1. Find where leads actually die. Usually one specific gap: ad leads never leaving the ad platform, or WhatsApp enquiries never becoming records. Fix that one thing first.
  2. Install the record, and one channel. The CRM, and whichever channel the team already reads all day. Nothing else.
  3. Run it for a month. Watch what people actually do, not what they said in the workshop.
  4. Add the next thing only when someone asks for it. A request from the team is evidence of a real need. A slide from us is not.

A ten-person distributor typically ends at step two and is completely well served. A 400-seat manufacturer with three regional sales teams and territory rules needs the full lead routing graph, and gets there over months, not in a launch.

What happened to the enquiry you just sent?

Concretely, for the enquiry you sent:

  • It was normalised and written to a Payload collection as the durable record, with last-touch attribution — the page you submitted from and the channel that brought you.
  • Then, concurrently: a Frappe CRM Lead was created via webhook with your name, number and country; an alert went to the consultant on call; an email went to the practice inbox; and the WhatsApp notification went to the team thread.
  • Each of those reported back independently, and the ones that succeeded are what the receipt listed.

Total elapsed time, a bit under a second. No CSV, no export, nobody assuming someone else picked it up.

Frequently asked questions

+Do I need the WhatsApp Business API for lead notifications?

Not for notifying your own team — an internal alert to a group or a number you control does not need template approval. You need the Business API when you want to message the lead outbound, which brings verified sender requirements, approved templates and per-conversation costs. Start with inbound notification.

+Can Meta Lead Ads go straight into ERPNext or Frappe CRM?

Yes. Meta offers a webhook for real-time lead delivery, and where that is awkward to configure, a workflow that polls the Lead Ads API every few minutes is more than fast enough. If you are still exporting CSVs, start there. Either way the lead arrives as an event rather than an export, which is the whole point.

+What happens to leads if one integration goes down?

Nothing, if the system is built in the right order. The durable record is written first, and the notifications fan out independently afterwards — one dead channel cannot take the others with it, and cannot lose the lead. The per-channel results should be written back onto the lead so a silent failure is visible later.

+How do you stop the same person appearing three times in the CRM?

De-duplicate on phone number at the point of ingestion, before the lead is created, and merge the context rather than creating a second record. A CRM with duplicate leads is a CRM the sales team stops trusting, and that is much harder to recover than the duplicates themselves.

+Is ntfy really worth setting up when we already have email?

For anything time-sensitive, yes. It is a self-hosted push notification with no per-message cost and roughly ten minutes of setup, and it reaches a phone immediately rather than waiting for someone to process their inbox. It is the highest value-per-hour integration in this list.

+How long does this take to implement?

The record plus one notification channel is typically a few days on an existing system. A full multi-source routing graph with de-duplication, enrichment and territory-based assignment is measured in weeks — and should be reached incrementally, not at launch.

Where should you start?

If you are reading this after filling in our form, you have already seen the smallest useful version of it working. If you want the same thing pointed at your own sources, tell us where your leads currently die — that one answer usually determines the whole first phase.

Want your own leads routed like this?

Tell us where enquiries come from today and where they get lost. We set up the smallest version that works first: one record in the CRM and one alert your team will actually see, then add sources from there.

Next step · Automation, AI & open source

Now see what automating this would take

Tell us which systems should talk to each other. We build the workflows, connect WhatsApp, CRM and ERPNext, and keep them running.

M

Written by

Manoj

Founder of MithTech, an open-source ERP & automation engineering practice. Hands-on ERPNext/Frappe implementation across multi-branch, multi-warehouse Indian operations — GST/TDS/PT compliance, branch-level permissions, and custom Frappe apps that give management real-time visibility.

Free · By email

Get practical ERPNext & automation guides

New implementation guides, cost breakdowns and open-source tips for Indian businesses — occasionally, straight to your inbox. No spam.

Already a MithTech client?

Help the next operator choose.

Most teams evaluating ERPNext have no way to tell who actually delivers. If we’ve run an implementation for you, two lines on Google count for more than anything we can write about ourselves.

Leave a Google review

Only if we’ve actually worked together — Google filters reviews from non-customers, so an honest one is worth more than ten polite ones.

Keep reading

See what this looks like for your business

A 30-minute working session with a principal consultant. We pressure-test the architecture and outline the engagement model that fits your governance and procurement posture. You leave with a written brief.

0
Published on 24 August 2026

Manoj

Comments & ratings

No comments yet. Start a new discussion.