$ man clay-wiki/formulas
Referenceintermediate
Clay Formulas Reference
Natural-language formulas for every common enrichment pattern
Why Formulas Still Matter
Clay's AI columns and Claygent get the attention, but formulas are where 80% of the actual work happens. Formulas cost zero credits. They run instantly. They don't hallucinate. Any time you can solve something with a formula instead of an AI column, you should. I see people burning 2 credits per row on things a formula handles for free. That's not clever — that's lazy in the expensive direction.
FORMULA
Name Merging and Formatting
Merge first_name and last_name into a single full_name column:
Merge {first_name} and {last_name} into a full name. Clay's natural language engine handles the spacing. For title-casing names that come in ALL CAPS from imports: Convert {full_name} to proper title case. For extracting just first names from a full name column (useful for email personalization): Extract the first word from {full_name}. These cost zero credits and run instantly across your entire table.FORMULA
Domain Extraction
Pulling a clean domain from a messy URL or email is one of the most common Clay operations. From email:
Extract the domain from {email} (everything after the @). From a full URL: Extract the root domain from {website_url} without www or paths. From LinkedIn company URLs: Extract the company name from {linkedin_url} — the part after /company/. Always extract domains to a dedicated column. You'll use it for deduplication, CRM lookups, MX checks, and account-level grouping. Domain is the universal join key in Clay.FORMULA
Title Deduplication and Normalization
Job titles are messy. "VP of Sales," "Vice President, Sales," and "VP Sales & Marketing" are all the same person tier. Normalize first:
Simplify {job_title} to its core role — remove "of," "and," commas, and abbreviate Vice President to VP. For deduplication: If {job_title} contains VP, SVP, EVP, or Vice President, return "VP-level". If it contains Director, return "Director-level". If it contains Manager, return "Manager-level". Otherwise return "Other". This creates clean persona tiers you can filter and score on. Don't try to handle every edge case — handle 90% and manually review the rest.FORMULA
MX Record Classification
After pulling MX records via the HTTP column, classify them for routing:
If {mx_record} contains "google" or "googlemail", return "Google". If it contains "outlook" or "microsoft", return "Microsoft". If it contains "proofpoint" or "mimecast" or "barracuda", return "Enterprise-Security". Otherwise return "Other". This is the formula that powers my entire email routing logic. Google → Instantly. Microsoft → HeyReach LinkedIn. Enterprise-Security → proceed with caution, possibly Woodpecker. Microsoft MX means enterprise — adjust your approach accordingly.FORMULA
Persona Mapping
Map job titles to persona tiers for campaign routing:
If {job_title} contains CTO, CIO, CISO, CEO, or Chief, return "C-Suite". If it contains VP or Vice President, return "VP". If it contains Director, return "Director". If it contains Manager or Lead or Head, return "Manager". Otherwise return "IC". I pair this with a scoring column — C-Suite gets 25 points, VP gets 20, Director gets 15, Manager gets 10, IC gets 5. The formula runs for free. The scoring happens downstream. Never pay credits for what a formula gives you.FORMULA
Scoring Bins
After your scoring column calculates a total, bin the scores for easy filtering:
If {total_score} >= 80, return "Tier 1 — High Priority". If >= 60, return "Tier 2 — Qualified". If >= 40, return "Tier 3 — Nurture". Otherwise return "Tier 4 — Disqualify". The bins should be self-explanatory at a glance. Anyone looking at the table should understand what Tier 1 means without reading documentation. That's the rule: if someone has to ask what the score means, your scoring system is broken. 5 points per data point is the default. Close-won data is the model. Score must read at a glance.ANTI-PATTERN
Anti-Pattern: Over-Engineering Formulas
Don't try to build your entire qualification logic in a single formula. I've seen tables with 300-word natural language formulas that combine persona mapping, scoring, routing, and enrichment status into one column. It breaks. It's unreadable. It's impossible to debug. Keep formulas single-purpose. One formula per transformation. Chain them across columns. Column A extracts the domain. Column B classifies MX. Column C maps persona. Column D scores. Column E bins. Each one is testable, readable, and free.
related entries