---
name: ravn-enrich-inbound-lead
description: Use when a new sign-up or form fill arrives with just an email and someone wants to know who it is, what company, and whether it fits the ICP.
title: Enrich and Score an Inbound Lead — Ravn
---
# Enrich and score an inbound lead

When a new sign-up or demo request comes in with only an email address, verify the address, look up the person and their company, and score how well they fit the user's ideal customer. The result is a routing decision: fast-track, nurture or ignore.

## When to use

- A sign-up form, demo request or trial sign-up gives you an email and little else.
- The user wants to triage a batch of new sign-ups each morning.
- The user asks "is this lead any good?"

## Before you start

1. Check the connection: call `get_account` with `{}` or run `npx ravn whoami`.
2. `reverse_email_lookup` and `domain_to_company` need your own provider key connected — run `ravn keys add pdl` first; these tools run on your own provider account. If a tool returns 403 `provider_key_required`, stop and tell the human to add their key. `validate_email` is ours and needs no key. Every call is one lookup; misses are free.
3. Get the ICP from the user once: target industries, company size (`employee_range` values such as 11-50 or 51-200), countries and buyer titles or seniority. Write it down as a short scoring rule before you start.

## Steps

1. Verify the email first. It is the cheapest check and filters out junk.

```json
{ "email": "sam@brightpath.io" }
```

   - `invalid` or `disposable: true`: score 0, stop. Do not run the provider lookups.
   - `free_provider: true` (Gmail and similar): there is no company domain. Run `reverse_email_lookup` only if the user wants personal sign-ups enriched.
   - `role_account: true`: note it; it is a shared inbox, not a person.
2. Look up the person.

```json
{ "email": "sam@brightpath.io" }
```

From `reverse_email_lookup`, take `full_name`, `title`, `seniority`, `country`, `linkedin_url` and `company`.
3. Look up the company from the email domain (or `company.domain`):

```json
{ "domain": "brightpath.io" }
```

From `domain_to_company`, take `industry`, `size`, `employee_count`, `country` and `founded`.
4. For a batch, put the emails in a CSV and run each step with the CLI. `reverse_email_lookup` also takes up to 100 emails at once over MCP with `{ "emails": [...] }`.

```bash
npx ravn enrich signups.csv --tool validate_email --column Email --out step1.csv
npx ravn enrich valid-business.csv --tool reverse_email_lookup --column Email --dry-run
```

5. Score each lead from 0 to 100 using the ICP rule, for example: industry match 30, size match 30, seniority match 25, country match 15. Show your weights to the user.
6. Route: 70 and above fast-track to sales, 40 to 69 nurture, below 40 no action. Adjust the cut-offs if the user has their own.

## Output

Per lead: `email`, `rw_verdict`, `rw_risk_score`, `full_name`, `title`, `seniority`, `company_name`, `company_domain`, `industry`, `employee_count`, `country`, `fit_score`, `route`, and `reasons` (one line saying which ICP rules matched). For CSV runs, each step also adds `rw_status` (`ok`, `not_found`, `error`, `dropped`).

## Rules

- A person who signed up asked to hear from the user's product, not from anyone else. Do not pass their data to third parties.
- If someone unsubscribes or opts out, stop enriching and contacting them. See [/privacy#optout](https://askravn.com/privacy#optout).
- Never score leads to decide credit, employment, insurance or housing (FCRA uses are forbidden).
- Skip the provider lookups for invalid and disposable emails.
- On a 429 `fair_use_exhausted` or a 403 `provider_key_required`, stop and tell the human.

## Example prompt

> We got 60 new trial sign-ups overnight (signups.csv). Tell me which ones are real companies in our ICP (B2B SaaS, 50-500 people, US or Canada) so sales can call them today.
