If you just want to flip a switch and enrich your company data with canned rules, this isn’t the guide for you. But if you’re tired of generic enrichment and want to squeeze real value out of your data, keep reading. This guide is for advanced users who want to create custom enrichment rules in CompanyEnrich—not just stick with the defaults.
Let’s get into what actually works, what’s a waste of time, and how to set up enrichment rules that fit what you care about.
Why bother with custom enrichment rules?
You already know CompanyEnrich can pull in firmographics, tech signals, and contact info. But out-of-the-box enrichment only gets you so far—especially if you have unique processes or weird edge cases (and who doesn’t?).
Custom rules let you: - Set your own data quality standards (not someone else’s) - Automate fixes for the stuff you always have to clean up by hand - Flag what’s “good enough” for your team, not just what the vendor thinks is “enriched” - Mix in your own third-party data or internal signals
Bottom line: If you’ve ever groaned at a half-baked “industry” field or wanted to route leads based on something niche, custom rules are your friend.
Before you start: What you actually need
Here’s what you should have in place before attempting custom rules. Otherwise, you’ll just end up frustrated.
- Admin access to CompanyEnrich (you can’t edit rules otherwise)
- A clear sense of what “better” data means for you (don’t build rules just to build them)
- A backup/export of your current mapping and rules (in case you break something)
- Test records (never test on live data first)
- Patience—some of this stuff is trial and error
Pro tip: Don’t try to boil the ocean. Pick one or two high-impact fields and start there. It’s easy to overcomplicate things and end up with a rule spaghetti you can’t debug.
Step 1: Get familiar with CompanyEnrich’s rule engine
CompanyEnrich offers a rule engine that lets you create conditional logic for handling, transforming, or flagging data as it’s enriched. It’s not quite programming, but it’s not just point-and-click, either.
- You’ll be working with if-this-then-that logic, using a mix of prebuilt functions and your own criteria.
- You can chain rules, set priorities, and create exceptions.
- Most enrichment happens at the field level (e.g., “If Industry is blank, try to infer from website keywords”).
- The UI is decent, but some advanced stuff may require YAML or JSON snippets.
Where to find it:
Navigate to “Settings” > “Enrichment Rules.” If you don’t see it, you probably need admin rights.
Step 2: Map out what you want your rules to do
Before you even touch the interface, sketch out: - Which fields you want to enrich or transform (e.g., Industry, Employee Count, Domain) - What’s wrong with the default enrichment (e.g., too generic, inconsistent formats, missing values) - What “good” looks like for each field (specific values, formats, or sources) - Any exceptions that matter (e.g., “If company is in the US, do X; if not, do Y”)
Example: - Field: Industry - Problem: Too many companies labeled “Other” - Goal: Infer industry from company description if “Other” is returned - Exception: If company is a government entity, override as “Public Sector”
Write this out. Otherwise, you’ll end up fiddling endlessly in the rule builder.
Step 3: Create a basic custom rule
Let’s walk through a simple example to get your feet wet.
Example: Normalize website URLs
Suppose your data is full of www/no-www, trailing slashes, and uppercase domains. You want every company website to look like company.com
.
How to do it:
- Go to Enrichment Rules
- Click Create Rule
- Choose your field:
Website
- Set your condition:
- If
Website
is not blank
- If
- Set your action:
- Transform value:
- Remove “http://”, “https://”, “www.”
- Lowercase everything
- Remove trailing slash
- Transform value:
This is usually a “Transform” type rule. CompanyEnrich has common string manipulation functions—use them. If you need more, drop into “Advanced” and use a regex.
Honest take:
Don’t try to handle every weird edge case in your first rule. You can always add more rules or exceptions later. Otherwise, you’ll get stuck in endless “what-if” scenarios.
Step 4: Add conditional logic for real-world messiness
Here’s where custom rules actually start to matter. You can set up rules that only trigger under certain conditions.
Example: Enrich employee count only for US companies
- Field:
Employee Count
- Condition: If
Country
equals “United States” - Action:
- Pull employee count from LinkedIn API
- If unavailable, fallback to last known value
How to set it up: - Use the “Add Condition” button to specify country - Use “Data Source Priority” to prefer LinkedIn, then fallback to internal data - Set a fallback (e.g., leave blank, or use default “Unknown”)
Pro tip:
Chaining too many conditions makes rules hard to debug. Keep your logic readable—future you will thank you.
Step 5: Use external data or custom functions (if you really need to)
Advanced users sometimes want to mix in data from APIs, internal databases, or other enrichment vendors. CompanyEnrich supports this, but it’s not always smooth sailing.
- You’ll need API keys and some basic scripting chops.
- Most integrations are via webhooks or custom connectors.
- You can write custom functions in JavaScript (or YAML-defined logic blocks) to process incoming data.
Example: Assign NAICS code using a third-party API
- Field:
NAICS Code
- Condition: If
NAICS Code
is missing or generic - Action: Call your external API with the company domain
- Transform the API response to the right format
- Write it to the
NAICS Code
field
What to watch out for: - Rate limits and API failures—always build in error handling - Data mapping headaches (external data rarely matches your format exactly) - Latency: external calls can slow enrichment jobs
Honest take:
Unless you have a real need, stick to built-in data sources. External APIs can be fragile and require a lot of maintenance.
Step 6: Test your rules (seriously—don’t skip this)
Testing isn’t optional. One bad rule can mess up thousands of records in a heartbeat.
- Use CompanyEnrich’s “Test with Sample Data” feature (if available)
- Try edge cases: blanks, weird formats, junk data
- Check for silent failures (e.g., rules that don’t fire, or overwrite good data)
If you find problems: - Tweak your logic and retest - Roll back to a previous version if you really mess up (you did export a backup, right?)
Pro tip:
Keep a changelog of your rules and why you created them. It’s boring, but it makes undoing bad decisions much easier later.
Step 7: Deploy, monitor, and refine
Once your rules pass muster, turn them on for your live data. But don’t just set and forget:
- Monitor enrichment logs for errors or unexpected results
- Periodically review which rules are working (and which aren’t)
- Be ruthless about pruning old or redundant rules—clutter creeps in fast
- Solicit feedback from people actually using the data
What doesn’t work:
- Creating a million micro-rules for every possible scenario. Focus on the 20% of rules that get you 80% of the value.
- Ignoring feedback. If sales or ops keeps complaining, something’s off.
A few pitfalls to avoid
- Don’t blindly trust “AI-powered” enrichments. They’re often just pattern matching with a fancy label.
- Don’t let rules become a black box. Document what each rule does, and why.
- Don’t skip error handling. External data will fail you at the worst time.
- Don’t assume your rules are future-proof. Company structures, data sources, and business goals change.
Wrapping up: Keep it simple, iterate often
Custom enrichment rules in CompanyEnrich are powerful—but complexity is your enemy. Start small, solve your actual pain points, and resist the urge to automate every single thing. Test, iterate, and keep your rules easy to understand. The more you tailor enrichment to your real-world needs, the more useful your data will actually be. And don’t forget: sometimes, “good enough” really is good enough.