Skip to content

CSV format

The fixture generator and migrations expect CSVs with specific columns and type values. This page describes the required format and how types map to D7 bundles and relation types.

contact.csv

The header row must include at least:

Column Description
id Contact identifier.
contact_type One of: person, household, organization.
name Display name.
first_name First name (for persons).
middle_name Middle name (for persons).
last_name Last name (for persons).
title Title (e.g. job title).

Contact types map to D7 CRM Core bundles as follows:

CSV contact_type D7 bundle
person individual
household household
organization organization

Other columns may be included and will be mapped if the migration or fixture generator supports them.

relationship.csv

The header row must include at least:

Column Description
id Relationship identifier.
relationship_type Relationship type (see below).
contact_id_a Source contact ID.
contact_id_b Target contact ID.
status Relationship status.

Relationship type mapping

The CSV type employee is mapped to the D7 relation type crm_employee. All other relationship types are used as-is and must exist in the base fixture’s relation_type and relation_bundles (or in the D7 site’s Relation configuration).

When generating a fixture, ensure the base D7 fixture or the target database defines any relation types you use other than employee.