Skip to main content

CRM Test Data: A Labeled Duplicate Set for Testing Match, Merge, and Lifecycle Logic

A CRM test dataset that exercises dedupe and merge logic needs more than realistic contact fields. It needs a labeled duplicate group with the answer key attached, Salesforce-object-aware derived fields, and a HubSpot lifecycle stage enumeration. This page names all 15 CRM fields, provides a labeled survivorship table, and lists 5 CRM-specific test scenarios.

Salesforce-object derived-field side effects

When Opportunity.StageName changes, Salesforce recalculates ForecastCategoryName, IsClosed, IsWon, and Probability (Salesforce Object Reference, retrieval date 2026-08-01). Fixtures must assert those derived fields, not only the controlling StageName.

The silent-ignore Amount trap

When an opportunity has products, updates to Amount are silently ignored while other fields in the same update may still save (Salesforce Object Reference, retrieval date 2026-08-01). Assertion-free tests miss this. Model expected_revenue as derived/read-only in the sample schema and document the trap. Row 4 in the Opportunity table below is the fixture for that assertion.

Labeled survivorship answer key (duplicate group)

Intended survivor is contact 003SYN0000000001AA. EXACT and FUZZY rows share its master_record_id. Distinct from retail product dedupe: entity is a person; identifiers are name, email, phone.

CRM contact survivorship answer key
contact_idmaster_record_idduplicate_typefirst_namelast_nameemailmailing_streetphonelifecyclestagesurvivor
003SYN0000000001AAAverySynthfield[email protected]12 Placeholder Way+1 555 0100customerYES (intended master)
003SYN0000000002AA003SYN0000000001AAEXACTAverySynthfield[email protected]12 Placeholder Way+1 555 0100leadmerge into master
003SYN0000000003AA003SYN0000000001AAFUZZYAverySynthfeild[email protected]12 Placeholder Wy.555 0100marketingqualifiedleadmerge into master
003SYN0000000004AABrinTestworthy[email protected]88 Sample Road+1 555 0142salesqualifiedleaddistinct contact

Opportunity sample: StageName derived fields and Amount silent-ignore

crm_opportunity sample with derived-field expectations
opportunity_idnameStageNameAmountProbabilityExpectedRevenueIsClosedIsWonAssertion note
006SYN0000000001AASynthfield Co: Platform renewalQualification125000.001012500.00falsefalseStageName drives derived fields
006SYN0000000002AASynthfield Co: Seat expansionNegotiation/Review40000.007530000.00falsefalseexpected_revenue = amount × probability
006SYN0000000003AATestworthy Ltd: PilotClosed Won18000.0010018000.00truetrueIsClosed/IsWon from stage
006SYN0000000004AATestworthy Ltd: Add-on (has products)Closed Lost9000.0000.00truefalseAmount write silently ignored when products exist

HubSpot lifecycle stage internal values

HubSpot lifecyclestage internal values (not UI labels), from HubSpot property docs / community payload (retrieved 2026-08-01):

HubSpot lifecyclestage internal values
Internal valueCommon label
subscriberSubscriber
leadLead
marketingqualifiedleadMarketing Qualified Lead
salesqualifiedleadSales Qualified Lead
opportunityOpportunity
customerCustomer
evangelistEvangelist
otherOther

Test scenarios

  1. Exact duplicate contacts share Master ID (rows 1 and 2).
  2. Fuzzy duplicate contacts share Master ID (row 3; phone/street drift).
  3. StageName change updates IsClosed/IsWon/Probability (rows 1 to 3).
  4. Opportunity with products: Amount write silently ignored (row 4).
  5. CloseDate required validation; lifecycle forward-only guard (customer back to lead refused).

Generate a larger version

Use the free generator to expand the CRM schema with exact_matching and fuzzy_matching flags, then export for Salesforce-style lifecycle tests. Anonymous use is capped at 100 rows, 6 fields, 3 exports, and CSV only. Signed-in formats: csv, json, xml, parquet, xlsx, jsonl, hf-datasets.

Frequently asked questions

Can a merged contact be restored?

No. Native Salesforce merge is permanent: the non-master records are deleted and cannot be individually restored from the merge action. The surviving master record carries the merged field values. The massmailer.io guide confirms this behavior ([massmailer.io/blog/salesforce-merge-contacts](https://massmailer.io/blog/salesforce-merge-contacts/), retrieval date 2026-08-01). A test fixture that exercises the merge path should include a pre-merge snapshot so assertions can compare before and after states. This is general information about documented Salesforce behavior; it is not legal or compliance advice.

What happens to activities after a contact merge?

Salesforce re-parents related activities (tasks, events, emails) from the deleted records to the surviving master contact. The massmailer.io guide confirms this re-parent behavior ([massmailer.io/blog/salesforce-merge-contacts](https://massmailer.io/blog/salesforce-merge-contacts/), retrieval date 2026-08-01). A test fixture that exercises merge should include activity records attached to the non-master rows so the re-parent path is covered by assertions, not just the contact merge itself.

Do custom object records transfer during a contact merge?

Only standard related objects (activities, cases, opportunities, and others) are automatically re-parented. Custom object relationships behave differently depending on their relationship type: a lookup field on a custom object that points to the deleted contact may be set to null unless the merge is handled in custom code, while a master-detail relationship will delete the child record if the parent is deleted. A test fixture should include at least one custom object row attached to a non-master contact to exercise this path. Source for the general merge behavior: [massmailer.io/blog/salesforce-merge-contacts](https://massmailer.io/blog/salesforce-merge-contacts/), retrieval date 2026-08-01. Verify custom object behavior against your org's relationship types before writing assertions.

Generate a custom dataset · Back to all guides