Knowledge and practice

Importing Contacts: Linking Individuals and Organisations

Contact data is often held in spreadsheets that list both individuals and the organisations they work for. In CiviCRM, however, individuals and organisations can be managed as separate contacts and linked through relationships.

This guide shows how to transfer such a spreadsheet into CiviCRM's data structure with minimal effort.

Contents

  1. Starting point
  2. Preparation
  3. Importing organisations
  4. Importing individuals
  5. Checking the results
  6. Limitations of the method
  7. Importing further data
  8. Further reading

1. Starting Point

Suppose you have a list of people who work for different organisations.

Organisation First name Last name Email
Müller GmbH Erika Mustermann
Müller GmbH John Doe
Schmidt AG Anna Weber

Both the organisations and the individuals are to be created as separate contacts and linked through an “Employee of” relationship.

Use the same file for two successive imports:

  • In the first import, create the organisations.
  • In the second import, create the individuals and link them to their organisations.

There is no need to split the spreadsheet into two different import files.

Back to contents

2. Preparation

Save the spreadsheet as a CSV file using UTF-8 character encoding.

Check the deduplication rules under Contacts → Find and Merge Duplicate Contacts.

For organisations, an automatic (Unsupervised) deduplication rule is needed that identifies organisations by their full name alone.

For individuals, choose an appropriate deduplication rule, for example one requiring a match on first name, last name and email address.

The deduplication rules serve two purposes in this procedure:

  • They prevent existing contacts from being created again.
  • When importing individuals, they make it possible to identify the relevant organisations by name.

Bear in mind that the Unsupervised deduplication rule is also used in other CiviCRM operations. Any changes to this rule should therefore be considered carefully.

It is advisable to test the procedure with a small number of records first.

Back to contents

3. Importing Organisations

Open the contact import under Contacts → Import Contacts.

  • Select “Organisation” as the contact type.
  • Upload the CSV file.
  • Select the deduplication rule for organisation names.
  • Select “Skip” when handling duplicates.

Map the columns in the import file to the CiviCRM fields as follows:

CSV column CiviCRM field
Organisation Organisation Name
First name Do not import
Last name Do not import
Email Do not import

Then run the import.

Duplicate checking takes into account not only the contacts that existed before the import, but also those created during the same import.

If, for example, ten people work for the same organisation and its name is identical in all ten rows, the organisation will be created only once. The other nine occurrences will be recognised as duplicates and skipped.

There is therefore no need to remove repeated occurrences of the same organisation from the import file beforehand.

Back to contents

4. Importing Individuals

Open the contact import again.

  • Select “Individual” as the contact type.
  • Upload the same CSV file.
  • Select an appropriate deduplication rule for individuals.
  • Select “Skip” for duplicates if only new individuals are to be imported.

This time, map the columns in the import file to the CiviCRM fields as follows:

CSV column CiviCRM field
Organisation Employee of → Organisation Name
First name First Name
Last name Last Name
Email Email

Then run the import.

The Unsupervised deduplication rule for organisations is used to identify the relevant organisation contact. The relationship between the individual and the organisation is established automatically.

There is no need to look up CiviCRM IDs or assign external identifiers.

If existing individuals are also to be linked to their organisations, choose an appropriate update mode rather than skipping those individuals. Consider which existing contact details may be changed by the import.

Back to contents

5. Checking the Results

Starting with an empty contact database, the example above creates five contacts and three relationships:

  • two organisations,
  • three individuals,
  • three relationships of the “Employee of” type.

Müller GmbH exists only once as a contact, even though it appears twice in the import file. Both Erika Mustermann and John Doe are linked to that organisation contact.

To check the results, open a few individual contact records and verify the link to the relevant organisation on the “Relationships” tab.

Conversely, from an organisation contact record, the individuals linked to that organisation can be viewed on the “Relationships” tab.

Review the reports from both imports as well. In particular, distinguish between duplicates that were skipped as expected and actual import errors.

Back to contents

6. Limitations of the Method

This procedure requires organisation names to be written consistently and to identify the respective organisations unambiguously.

Different spellings, such as “Müller GmbH”, “Mueller GmbH” and “Müller Gesellschaft mbH”, may result in the same organisation being created more than once.

Conversely, different organisations may share the same name and therefore be incorrectly treated as identical.

If organisations cannot be identified unambiguously by name, unique technical identifiers are recommended. This makes the matching process independent of how the organisation name is written.

Back to contents

7. Importing Further Data

If the source file contains additional information alongside the contact details, such as telephone calls, conversations or other interactions, these details can be left out of the first two imports.

In a third import, this information can be brought into CiviCRM as activities and assigned to the individual contacts created earlier.

The procedure is described in the follow-up guide Importing Individuals with a Contact History: Adding Activities.

Back to contents

8. Further Reading

Further guides on polbeo.de:

Official CiviCRM documentation:

Back to contents

Comments

No comments yet. Be the first to join the conversation.

Write a comment

By submitting your data, you agree that all entered data may be saved and displayed as a comment.
GDPR compliant
AI compliant
Secure hosting