Knowledge and practice

Importing Individuals with a Contact History: Adding Activities

If a contact list contains not only organisations and individuals but also details of previous telephone calls, conversations, correspondence or other interactions, both the contacts and the associated activities can be imported into CiviCRM.

This transfers not only the contact details but also the existing contact history into the new system.

The procedure described in the guide Importing Contacts: Linking Individuals and Organisations is extended by a third import.

Contents

  1. Starting point
  2. Preparation
  3. Importing organisations
  4. Importing individuals
  5. Importing activities
  6. Checking the results
  7. Limitations and potential errors
  8. Further reading

1. Starting Point

Suppose you have a spreadsheet that contains both contact details and information about previous activities.

Organisation First name Last name Email Activity date Activity Subject
Müller GmbH Erika Mustermann 01.12.2026 Phone Call Initial contact
Müller GmbH Erika Mustermann 02.12.2026 Email Documents
Müller GmbH John Doe 03.12.2026 Phone Call Follow-up enquiry
Schmidt AG Anna Weber 04.12.2026 Meeting Collaboration

Organisations and individuals may appear more than once in the spreadsheet. In this example, each row describes an activity.

The data is to be transferred in three successive imports:

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

Do not remove repeated occurrences of individuals and organisations by deleting entire spreadsheet rows. While each organisation and individual should be created only once, every activity is to be imported separately.

In principle, the same CSV file can be used for all three imports.

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.

Choose an appropriate deduplication rule for individuals.

Before the first import, also decide how the individuals are to be identified during the subsequent activity import.

The advanced Civi-Import tool offers, among others, two ways of doing this.

Option A: Identification Using a Deduplication Rule

During the activity import, the individuals are identified by their contact details, such as their first name, last name and email address.

This requires an appropriate deduplication rule that can identify each individual unambiguously.

If, for example, a match on first name, last name and email address is required, the rule must be configured so that all three values have to match.

There is no need to add any columns to the source file.

This approach is particularly suitable for manageable datasets with complete and unambiguous contact details.

Option B: Identification Using an External Identifier

Add a column called “External Identifier” to the spreadsheet. Assign a unique identifier to each individual.

For example:

First name Last name External Identifier
Erika Mustermann P-0001
Erika Mustermann P-0001
John Doe P-0002
Anna Weber P-0003

Two rules must be observed when assigning external identifiers:

  • The same individual must be assigned the same identifier on every row.
  • Different individuals must not be assigned the same identifier.

If external identifiers already exist, such as customer numbers or identifiers from a database system that is being replaced, they should be reused.

Newly assigned identifiers must not conflict with other identifiers already in use in CiviCRM.

External identifiers are particularly useful when individuals cannot be distinguished unambiguously by their contact details or when further data imports are planned.

The advantage is that an individual can still be identified reliably if, for example, their last name or email address changes.

If the CiviCRM version or import interface in use offers neither of these two methods, activities can instead be assigned using internal CiviCRM contact IDs. Look these up after importing the contacts and add them to the import file.

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 only the “Organisation” column to the “Organisation Name” field.

CSV column CiviCRM field
Organisation Organisation Name
All other columns Do not import

Then run the import.

Repeated occurrences of organisations are recognised by the duplicate check and skipped.

In the example above, only two organisation contacts are therefore created from the four rows in the import file.

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 created.

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
External Identifier (Option B only) External Identifier
Activity date Do not import
Activity Do not import
Subject Do not import

Leave all activity details out of this import for now.

If relationships or external identifiers are to be added to existing contacts, choose an appropriate update mode rather than skipping those individuals.

Take care not to overwrite existing contact details or external identifiers unintentionally.

Then run the import.

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

In the example above, three individuals are created. Erika Mustermann is created only once as an individual, even though she appears twice in the import file.

If Option B was chosen, make sure that all the individuals concerned have been assigned their intended external identifiers before the next import.

Back to contents

5. Importing Activities

The activities can be imported once all the required individual contacts exist in CiviCRM.

Open the activity import under Contacts → Import Activities.

  • Upload the same CSV file.
  • Select the date format that matches the import file.
  • Configure the import to create new activities and assign them to existing target contacts.

The field mapping depends on the method chosen earlier for identifying individuals.

In this context, a target contact (Target Contact) is the individual to whom an activity is to be assigned.

Option A: Matching Using a Deduplication Rule

For the target contact, select the contact type “Individual” and the appropriate deduplication rule.

Then map the contact fields required by the rule, together with the activity details.

CSV column CiviCRM field
First name Target Contact → First Name
Last name Target Contact → Last Name
Email Target Contact → Email
Activity date Activity Date
Activity Activity Type
Subject Subject

The example assumes that first name, last name and email address are used to identify an individual unambiguously.

Using these details, the existing individual contact is identified for each row and the activity is assigned to that contact.

Option B: Matching Using an External Identifier

For the target contact, select matching by a unique identifier.

Map the columns as follows:

CSV column CiviCRM field
External Identifier Target Contact → External Identifier
Activity date Activity Date
Activity Activity Type
Subject Subject

First name, last name and email address are no longer needed in this import. The activities are assigned solely on the basis of the external identifiers imported earlier.

Activity Details

With either option, leave all columns that are not needed unmapped.

The activity types used in the import file must already exist in CiviCRM.

Depending on the import tool and the available field, use either the labels or the corresponding activity type IDs.

Additional activity types can be configured under Administer → Customize Data and Screens → Activity Types.

When documenting past activities that have already been completed, it is advisable to import the activity status as well or to set an appropriate default value in the import tool, if this is available.

For example, the import file can be extended with an “Activity Status” column.

Activity date Activity Subject Activity Status
01.12.2026 Phone Call Initial contact Completed
02.12.2026 Email Documents Completed
03.12.2026 Phone Call Follow-up enquiry Completed
04.12.2026 Meeting Collaboration Completed

Other information, such as notes from conversations, the duration of an activity or the individuals responsible for it, can also be included where needed, provided that the relevant import fields are available.

Review the import preview and then run the import.

Back to contents

6. Checking the Results

Starting with an empty contact database, the example above creates a total of:

  • two organisations,
  • three individuals,
  • three relationships between individuals and organisations,
  • four activities.

Müller GmbH exists only once as an organisation contact. Two individuals are linked to it.

Erika Mustermann also exists only once as an individual. However, two activities are assigned to her contact record: a telephone call and an email.

The result can be represented as follows:

Organisation Individual Number of activities
Müller GmbH Erika Mustermann 2
Müller GmbH John Doe 1
Schmidt AG Anna Weber 1
Total 4

To check the results, open several individual contact records and review both the “Relationships” and the “Activities” tabs.

In particular, check that:

  • individuals have been linked to the correct organisations,
  • all expected activities are present,
  • activities have been assigned to the correct individuals,
  • the date, activity type, subject and, where applicable, activity status have been imported correctly.

Review the reports from all three imports as well.

While skipped duplicates are to be expected in the first two imports, all the intended activities should be imported successfully in the third import.

Back to contents

7. Limitations and Potential Errors

Uniqueness of Organisation Names

As with the simple import of individuals and organisations, the procedure requires organisation names to be written consistently and to identify each organisation unambiguously.

If this cannot be ensured, unique technical identifiers should also be used for the organisations.

Uniqueness of Individual Contacts

When using a deduplication rule, make sure that the contact details used for identification really do allow unambiguous matching.

If this cannot be ensured, external identifiers are recommended.

Even when external identifiers are used, unambiguous matching must be ensured during the individual contact import itself. Otherwise, an unsuitable deduplication rule may result in different individuals being incorrectly treated as identical.

Repeated Activity Imports

Unlike contact imports, repeated occurrences of activities are not necessarily recognised as duplicates.

Running the same activity import again may create additional, identical activities.

An activity import that has already been completed successfully should therefore not be repeated without checking the results first.

Differences Between CiviCRM Versions

The available ways of identifying target contacts may vary depending on the CiviCRM version and import tool in use.

The matching options described here are available in the advanced Civi-Import tool. If necessary, check whether this extension, which is distributed with CiviCRM, is enabled.

The labels of import fields may also differ slightly between versions and translations.

Test Import

Particularly with larger datasets, it is advisable to test the entire procedure with a few records in a test environment first.

Such a test should deliberately include individuals and organisations that appear more than once in the import file.

This makes it possible to check that the deduplication rules and activity matching work as intended.

If the test import is carried out directly in the production system, make sure that activities already imported successfully are not created again during the subsequent full import.

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