# Enrichment & Formulas

> Fill in missing data with waterfall enrichment, AI research, and computed formula columns — like a spreadsheet that enriches itself.

Source: https://docs.graph8.com/data/enrichment/

graph8's enrichment engine lets you fill in missing contact and company data automatically. Chain multiple data providers, run AI research prompts, and build formula columns — all from the list grid, with results streaming in live.

## Enrichment Types

| Type | What It Does | Credits |
|------|-------------|---------|
| **Waterfall** | Queries data providers in sequence until a value is found | Per provider per record |
| **AI Enrichment** | Uses an LLM to research, analyze, or generate data | Per record (token-based) |
| **Formula** | Computes a value from existing fields using expressions | Free |
| **Find People** | Searches for contacts at specific companies | Per search |

## Waterfall Enrichment

Waterfall enrichment queries multiple data providers in order. If the first provider doesn't return a result, the next one is tried — like a fallback chain.

### How It Works

1. Open a list and click the **+** column header to add an enrichment column
2. Select **Waterfall** as the enrichment type
3. Choose what you want to find (work email, phone, company data, etc.)
4. Select and order your providers — graph8 tries them top to bottom
5. Click **Run** — results stream into the grid in real time

### Available Providers

graph8 integrates with 15+ data providers:

| Category | Providers |
|----------|----------|
| **Email & Phone** | Apollo, Hunter, Prospeo, RocketReach, LeadMagic, Lusha, IcyPeas |
| **Company Data** | Clearbit, BuiltWith |
| **Verification** | ZeroBounce, DropContact, EmailListVerify |

Each provider has different strengths. For example, Apollo is strong for B2B work emails, while BuiltWith reveals a company's technology stack.

### Provider Ordering

The order matters. graph8 stops at the first provider that returns a result, so put your most reliable (or cheapest) provider first. You can drag providers to reorder them.

### Optional Parameters

Some providers offer extra options:

- **Reveal phone numbers** — enables direct dial discovery (additional credits)
- **Reveal personal emails** — includes personal email addresses
- **Email verification** — automatically verify found emails as a post-enrichment step

### Running Enrichment

When you click **Run**:

1. graph8 validates you have enough credits
2. Records are queued and processed in batches
3. Cells update in real time as results arrive via live streaming
4. Click any enriched cell to see which provider returned the value

### Updating Waterfall Configuration

When you update and save a waterfall configuration, it replaces the existing provider chain for that column.

It does not create duplicate columns.

> **Tip:**
> Set up **auto-enrichment** on a list so new contacts added via import or prospecting are automatically enriched with your saved configuration.

## AI Enrichment

AI enrichment uses a large language model to research, analyze, or generate data for each record in your list. Think of it as having a research assistant process every row.

### Column Behavior

- Each AI column runs independently — adding a new AI column does not overwrite or remove existing columns
- Custom columns remain unchanged when running additional enrichment

This allows you to layer multiple enrichment strategies on the same dataset.

### Use Cases

| Use Case | What It Does | Credits |
|----------|-------------|---------|
| **Web Research** | Searches the web to find information about a contact or company | 7 per record |
| **Content Generation** | Generates personalized copy based on contact/company data | 1 per record |
| **Create / Modify Content** | Transforms or reformats existing field values | 1 per record |

### Setting Up AI Enrichment

1. Open a list and click **+** to add a column
2. Select **AI Enrichment**
3. Write your prompt using **field variables** — type `@` to insert any column as a variable

**Example prompts:**

- `Research COMPANY_NAME (COMPANY_DOMAIN) and write a one-sentence summary of what they do and who they sell to.`
- `Based on FIRST_NAME's role as JOB_TITLE at COMPANY_NAME, write a personalized opening line for a cold email.`
- `Look up recent news about COMPANY_NAME from the past 30 days and summarize the most relevant item.`

Field variables appear as interactive pills in the prompt editor — type `@` to insert any column from your list.

4. Define the output columns — one AI prompt can populate multiple columns
5. Click **Run**

### Viewing AI Results

Click any AI-enriched cell to open the results panel, which shows:

- The full AI response
- Sources and citations (for web research)
- The reasoning behind the output
- Token usage

## Formula Columns

Formula columns compute values from existing fields using JavaScript expressions. They're free to run and update instantly — no credits required.

### Using Formula Templates

graph8 includes built-in templates for common calculations:

**Contact formulas:**

| Template | Output |
|----------|--------|
| **Lead Score** | 0–10 score based on company size, industry, and title |
| **Seniority Level** | Categorizes job titles into Executive, Senior, Mid, Junior |
| **Contact Quality Score** | 0–100 completeness rating based on filled fields |
| **Email Validation** | Classifies emails as Personal, Professional, or Missing |
| **Full Name Formatter** | Combines first and last name |

**Company formulas:**

| Template | Output |
|----------|--------|
| **Company Size Category** | Startup, Small, Medium, Large, or Enterprise |
| **Revenue Category** | Early Stage, Growth, Scale, or Enterprise |
| **Industry Tech Score** | 0–10 rating of technology focus |
| **Growth Stage Analyzer** | Seed, Early, or Growth based on size and founding year |

To use a template:

1. Click **+** to add a column → select **Formula**
2. Browse the template library
3. Select a template — the formula is pre-filled
4. Click **Run**

### Writing Custom Formulas

Write your own JavaScript expressions using field name placeholders:

```
// Score leads based on employee count
const size = parseInt(COMPANY_EMPLOYEE_COUNT) || 0;
let score = 0;
if (size >= 50 && size <= 500) score += 3;
if (size > 500) score += 5;
return score;
```

Field references like `COMPANY_EMPLOYEE_COUNT` are replaced with actual values at runtime. The formula editor highlights available fields as you type.

Formula outputs can be **text**, **number**, or **boolean**.

### AI-Generated Formulas

Don't want to write JavaScript? Describe what you want in plain English and graph8's AI will generate the formula for you.

Example: *"Score contacts 1-10 based on how senior their job title is, giving C-suite a 10 and individual contributors a 2"*

graph8 generates the JavaScript, lets you preview results on sample rows, then saves and runs it.

> **Tip:**
> Formula columns are free and recalculate instantly. Use them to score, categorize, or flag records before running paid enrichment on the best matches.

## Find People

Find People searches for contacts at specific companies in your list.

1. Open a list that contains company data
2. Click **+** → select **Find People**
3. Set filters for the contacts you want (job title, seniority, department)
4. Choose which company column to search against
5. Select a destination list for found contacts
6. Click **Run**

graph8 searches each company and returns matching contacts. Review the results, select the ones you want, and import them to your destination list.

## List Routing

List routing lets you automatically move or copy contacts between lists based on rules.

### How It Works

1. Define filter conditions (e.g. job title, industry, enrichment results)
2. Select a destination list
3. Apply routing manually or via automation

You can also use AI to suggest routing rules based on your data.

### Use Cases

- Route high-quality leads into a sales-ready list
- Separate contacts by persona, industry, or score
- Automatically organize enriched data into segmented lists

## Credits

Enrichment runs on a credit system:

| Enrichment Type | Credit Model |
|----------------|-------------|
| **Waterfall** | Fixed credits per provider per record (varies by provider) |
| **AI — Web Research** | 7 credits per record |
| **AI — Content Generation** | 1 credit per record |
| **Formula** | Free |
| **Find People** | Credits per search |

Before any enrichment runs, graph8 shows you the estimated credit cost and validates your balance. Credits are held during processing and charged as results come in. Unused holds are released when the job completes.

Check your credit balance in **Settings → Credits & Billing**.

## Real-Time Updates

All enrichment types stream results live into the grid using server-sent events. You don't need to refresh the page — cells update as each record is processed. This means you can watch results flow in and stop a job early if the data quality isn't what you expected.

## Next Steps

- [Prospecting →](https://docs.graph8.com/data/prospecting/) — Search the database to find new prospects
- [Managing Lists →](https://docs.graph8.com/data/managing-lists/) — Organize and filter your lists
- [Import & Export →](https://docs.graph8.com/data/import-export/) — Upload contacts or download lists
