Skip to content

Importing Contributions using Civi Import

This section outlines the process of importing contributions using Civi Import. It assumes you have installed the Civi Import extension which is shipped with CiviCRM.

Installing extensions

If you need more information about installing extensions check Extensions section

First you will navigate to Contributions>Import Contributions. This will take you to where you can start building your contribution import. You will need to have a data file prepared with the donations you would like to import. This could be a file that is provided by a third party or one that was created internally.

Import contributions

Here you will have to specify some configuration parts for your import.

First Screen

Choose Data Source

Here you can specify which data source you are going to use. In this section we will be using the Comma-Separated Values (CSV) option but you can also import from a spreadsheet (.odt or .xlsx files) or from a SQL Query.

Select your file

You can select the file you are going to import from your local computer or your network with the button next to Import Data File.

UTF8

Your CSV file (if you are using that format) needs to be UTF8 encoded if it has special characters, see Wikipedia definition for background.

You also need to specify the field separator used in your file.

Be careful with decimal values

Be careful with the import of decimal values in combination with your field separator. In some countries the comma (,) is used as decimal separator and if you then use the comma as field separator as well it will mutilate your amounts. To be on the safe side you might want to use ; as a field separator.

Import options

Here you select or specify:

  • which contact type you are importing the contributions for
  • if you are creating new contributions or updating existing contributions
  • what date format your import file is using
  • if you want use a field mapping you have saved in the past you can select one in the saved field mapping select box.

In this case we will import contact type Individuals since these contributions were made by individual people. Since we are importing new data we will select insert new contributions. In this example we are using the mm/dd/yy date format. As we have no saved template of mapped fields we will leave that blank.

Example screen

Match fields

Once you click continue this will take you to the Match fields page where you can set up the field mapping to match fields in the file to fields in CiviCRM.

There are a set of rules at the top under Import to that dictate the rules and structure of the import.

  • as we selected we are importing new contributions the Contribution box is automatically set to Create and we can not change this
  • the Contribution Contact box allows us to select what we are going to do with the contacts that we are importing with the contributions. In this example we selected to update or create contacts but we could also have selected to match existing contacts or update existing contacts
  • we selected the contact _type as Individual in the first screen but we could change it here
  • we have to specify the dedupe rule used when importing
  • we could also import soft credits but we will not in this example.

More background on dedupe and soft credits

More background on dedupe rules can be found at Deduplication. More background on soft credits can be found at Soft credits

Next will be the data mapping section. This is where the fields in the file will be matched up to the CiviCRM fields so they import to the right location in CiviCRM. Column Names shows what the fields are in the file and Matching CiviCRM Field will be the corresponding field in CiviCRM. You can select do not import if you do not want certain data in the file to be imported.

Mapping

You can also specify a Default value for a field in CiviCRM. This will be used whenever there is no actual data for the field in your input file. You can see in the example we have done this for the Financial Type where we have no data in the file but we use a default value. Note that the field has to exist in the import file but can be empty.

If you are happy with your mapping you can press Continue. Remember to tick the box for Save this field mapping if you want to use this mapping again, useful if you need to import more files with the same data layout.

Preview

You can preview what will happen and click Import now if you are happy.

Preview

If your import is successful it will show you how many rows in your file were imported and if not it will show you how many rows had errors. You can view the detailed results or errors by clicking the See rows link and you will see something like this:

Results

You can also navigate to the contribution by clicking on the hyperlinked contribution ID number and view a specific contribution to review the imported data.