Lead Management
8 sec
Median to assignment
46 min
Median to first contact
3
Unactioned over 2h
4%
Went to fallback
| Lead | Matched rule | Assigned to | To contact | Note |
|---|---|---|---|---|
| Halden Foods, demo | Open opportunity | R. Iyer | 6 min | |
| Vantor, pricing | Named account | T. Okafor | 22 min | |
| Kestrel, trial | EMEA mid-market | M. Sandoval | 1h 40m | Deputy, on leave |
| Brightsea, content | Fallback | S. Roche | 3h 12m | No rule matched |
| Northrise, support | Existing customer | A. Mensah | 11 min |
What matters here
- A routing app is four parts: readable rules, a guaranteed fallback, speed measurement, and an audit of every decision.
- The fallback is the most important rule. Anything the rules did not anticipate must still reach a named person.
- Measure time from arrival to first contact, not to assignment. Assignment is not contact, and only one of them matters.
- Route on what the lead is, not only on who is available. Round-robin over a fair queue still sends an enterprise inbound to whoever is next.
- Record why each lead went where it did. Routing disputes are constant and unanswerable without it.
- Handle availability: out of office, at capacity, on leave. A perfect rule that assigns to somebody on holiday is a lost lead.
Who this is for
You run marketing operations or revenue operations. You already have routing rules somewhere. What you want is rules a person can read, nothing landing unowned, and a number for how fast the first contact actually happens.
How it works in practice
What happens to a lead in the first few minutes, and what you learn from it afterwards.
- 1
It arrives and gets matched against what you know
Email domain against existing accounts and open opportunities first, because an inbound from a live deal is not a new lead.
- 2
Rules run in a readable order, first match wins
Named accounts, existing customers, open opportunities, then territory, segment and product interest.
- 3
Availability is checked before assigning
Out of office, over capacity, on leave. A perfect rule that assigns to somebody on holiday is a lost lead with extra steps.
- 4
Anything unmatched goes to a named person
Never a pool. The fallback is the rule that separates a good router from an expensive one.
- 5
Two clocks run, and the second one matters
Time to assignment should be seconds. Time to first contact is what correlates with conversion.
- 6
Every decision is logged and the rules are reported on
Which fired, which never fire, and how often the fallback caught something, which is the rule you are missing.
What a routing app is made of
A routing app is not a set of CRM assignment rules. It is four parts, and the second is the one that prevents the expensive failure.
Readable rules
Ordered conditions over what the lead is: territory, segment, product interest, named account, source. First match wins, and the order is visible rather than buried.
A guaranteed fallback
A named person who receives anything the rules did not anticipate. Never a pool, never a shared inbox, never nobody.
Speed measurement
Time from arrival to assignment, and separately to first contact. The second is the one that correlates with conversion and the one nobody measures.
An audit of every decision
Which rule fired, what the lead looked like at that moment, and who it went to. Routing disputes happen weekly and are unanswerable without it.
The prompts
Paste these into Claude Code, Codex or Cursor in order. Each one leaves you with something that runs, so you can stop after any step.
These prompts start from a Helix project, which is what handles sign-in, credentials and hosting. Start with Helix.
Rules a person can read
Ordered, first match wins, and visible to the people they affect.
Create a Helix app: a lead routing app.
A lead arrives with: name, email, company, job title, country, company size if we know it, the source, what they asked for, and any campaign or form reference.
Enrich it where I can supply a source: match the email domain to an existing account or open opportunity first, because an inbound from a live deal should never be treated as a new lead.
Then rules, as an ordered list I can read top to bottom. Each rule has conditions over the lead's attributes and a destination, and the first match wins. Show me the order and let me reorder it.
Seed with the ones every company needs: named accounts go to their owner, existing customers go to their success manager, anything matching an open opportunity goes to that rep, then territory and segment rules, then product interest.
Let me test a rule set against a batch of past leads and show me where each one would have gone before I turn anything on.
Nothing lands unowned
The fallback, which is the rule that actually matters.
Now the part that prevents the expensive failure.
Require a fallback destination: a named person who receives anything the rules did not anticipate. Not a pool, not a shared inbox, not a queue somebody checks on Mondays. Every routing system has cases its rules did not foresee, and the difference between a good one and a bad one is whether those reach a person.
Then handle availability. Before assigning, check whether the destination is out of office, over a capacity limit I set, or has leave booked. If they are unavailable, route to their named deputy and record that this is what happened. A perfect rule that assigns a hot inbound to somebody on holiday is a lost lead with extra steps.
Support round-robin inside a rule, but only inside one. Round-robin as the top-level strategy sends an enterprise inbound to whoever happens to be next, which is fair to the reps and expensive for the company.
Alert on anything unassigned for more than a few minutes. That should never happen, and when it does it is the most urgent thing in the app.
Measure to first contact, not to assignment
Because those are different and only one of them matters.
Track two clocks and keep them separate.
Time from arrival to assignment, which should be seconds. And time from arrival to first contact, which is the one that correlates with conversion and the one almost nobody measures.
A lead assigned in four seconds and contacted in two days was not routed well. It was assigned well, which is not the same thing.
Show each rep their unactioned leads ordered by age, and escalate anything past a threshold I set to their manager. Then reassign, with the reason recorded, if it goes past a second threshold.
Report median and worst-case time to first contact by rep, by source and by segment. Include an out-of-hours breakdown, because the weekend gap is usually where the worst numbers hide and an aggregate median conceals it completely.
Record why, because someone will ask
The audit, and what it tells you about your rules.
Log every routing decision: the lead as it looked at that moment, which rule matched, which rules were evaluated and skipped, the destination, whether a fallback or deputy was used, and the timestamp.
Routing disputes happen weekly. "Why did I not get that lead" is unanswerable without this, and answerable in ten seconds with it.
Then report on the rules themselves. Which rules fire most, which have never fired at all, and how often the fallback is used. A fallback firing frequently is not a fallback doing its job, it is a rule set with a gap in it, and the leads it caught are the specification for the rule you are missing.
And report leads by source against opportunities created, so the routing data doubles as a source quality report you did not have to build separately.
Connect it to real systems
The step that turns a working prototype into something with your data in it.
Now connect it to the systems we actually run, so it works on real data rather than the rows you seeded.
Anything in angle brackets is a placeholder. Swap it for whatever we use instead, and have the app name the connection it wants rather than assume a vendor, so changing my mind later is a config change and not a rewrite.
<Salesforce>. Match an inbound against existing accounts and open opportunities, then write the assignment.
<Okta>. Read the current sales roster and its groups, so a rule never assigns to somebody who has left or is not on that team.
<your website forms>. Take the inbound the moment it arrives, because time to first contact is the metric.
<Slack>. Tell the rep they have a lead, and escalate anything unactioned to their manager.
<Marketo>. Read form fills and enrichment before routing, so the rules have something to match on.
<Outreach>. Put the lead into a sequence the moment it is assigned, which is what time to first contact measures.
<Snowflake>. Read historical routing outcomes, so a rule set can be tested before it is switched on.
Only write where I have said to write. Everything else is read only.
Ship it
The last step of every build: a URL, and the right people on it.
Deploy my app.
What it connects to
Routing is a read against your pipeline and a write of an assignment, and both have to be fast.
-
Salesforce Match an inbound against existing accounts and open opportunities, then write the assignment. Reads and writes
-
Okta Read the current sales roster and its groups, so a rule never assigns to somebody who has left or is not on that team. Reads - Your website forms Take the inbound the moment it arrives, because time to first contact is the metric. Reads
-
Slack Tell the rep they have a lead, and escalate anything unactioned to their manager. Writes
-
Marketo Read form fills and enrichment before routing, so the rules have something to match on. Reads -
Outreach Put the lead into a sequence the moment it is assigned, which is what time to first contact measures. Writes -
Snowflake Read historical routing outcomes, so a rule set can be tested before it is switched on. Reads
Named systems are the ones most teams actually run, not a list of the only ones that work. Swap in whatever you use.
Running it for real
The build gets you a working router. It handles inbound personal data and effectively decides who works which deal, so it needs to be run properly.
- 1
Get it to a URL people can open
One command takes the app from your assistant to a live address, so the people who need it get a link rather than instructions for running it locally.
- 2
Put your identity provider in front of it
Routing decides who works which deal, so the audit is only useful if every rule change is attributable. SSO means people sign in with their existing account, and access is scoped so reps see their own leads.
- 3
Connect the system of record with managed credentials
Matching against accounts and open opportunities, and writing assignments back, needs real CRM access. Granting it to the app rather than pasting a key into it means it can be rotated or revoked without a redeploy.
- 4
Put a name on it
Every app carries a named owner and an entry IT can see, so the tool does not become nobody's problem when the person who built it changes role.
- 5
Know what it costs to run
Per-app spend visibility, so an internal tool cannot quietly become a line item nobody can explain.
Do this as a workflow instead
An app is only as good as the data in it. These build the integrations and automations that keep this one current, on the Tray platform. Same kind of guide, same kind of prompts.