Generate CRM Test Data with MockHero
The Problem
CRM applications depend on rich, interconnected data: companies, contacts, deals at various pipeline stages, activities, and notes. Testing with "Acme Corp" and "John Doe" repeated 50 times makes it impossible to evaluate search, filtering, or dashboard analytics.
CRM data is also hierarchical. Contacts belong to companies, deals belong to contacts, and activities belong to deals. Maintaining this hierarchy with manual seeds is a constant source of bugs.
The Solution: MockHero API
MockHero generates realistic business data with proper relationships. Company names look real, contact names match diverse locales, and deal amounts follow realistic distributions, all linked through ref fields.
Quick Setup
curl -X POST https://api.mockhero.dev/api/v1/generate \
-H "x-api-key: mh_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"tables": [
{
"name": "companies",
"count": 15,
"fields": [
{ "name": "id", "type": "uuid" },
{ "name": "name", "type": "company_name" },
{ "name": "industry", "type": "enum", "params": { "values": ["Technology","Healthcare","Finance","Retail","Manufacturing"] } },
{ "name": "website", "type": "url" }
]
},
{
"name": "contacts",
"count": 40,
"fields": [
{ "name": "id", "type": "uuid" },
{ "name": "company_id", "type": "ref", "params": { "ref": "companies.id" } },
{ "name": "name", "type": "full_name" },
{ "name": "email", "type": "email" },
{ "name": "title", "type": "job_title" }
]
},
{
"name": "deals",
"count": 25,
"fields": [
{ "name": "id", "type": "uuid" },
{ "name": "contact_id", "type": "ref", "params": { "ref": "contacts.id" } },
{ "name": "title", "type": "catch_phrase" },
{ "name": "value", "type": "integer", "params": { "min": 5000, "max": 250000 } },
{ "name": "stage", "type": "enum", "params": { "values": ["lead","qualified","proposal","negotiation","closed_won","closed_lost"] } }
]
}
],
"format": "json"
}'
Step-by-Step Guide
1. Get your MockHero API key
Sign up at mockhero.dev/sign-up.
2. Design your CRM schema
Use the schema above as a starting point. Add tables for activities, notes, or tasks as needed.
3. Fetch the data
Use the curl command above or integrate it into your seed script in any language.
4. Insert into your database
The JSON response includes arrays for each table. Insert companies first, then contacts, then deals.
5. Verify in your CRM UI
Browse the pipeline view, check that deals are linked to contacts and contacts to companies.
Complete Example
The schema above generates 15 companies, 40 contacts, and 25 deals with full relational integrity. Extend it with activities and notes by adding more tables with ref fields.
Why MockHero vs Faker / Manual Seeds
- Hierarchical data — companies, contacts, deals linked automatically.
- Business-realistic values — company names, job titles, and deal values that look real.
- Pipeline distribution — enum fields give you deals across all stages for testing dashboards.
Get Started
Free tier, no credit card. Sign up at mockhero.dev and build a realistic CRM dataset in minutes.
MockHero Team
Guides and tutorials for generating realistic test data with the MockHero API.
Start generating test data for free
1,000 rows/month on the free tier. No credit card required.
Get Your API Key