Are you enjoying the extensions? Did you like the support? Help others decide.

Leave a review
Information
Print

Importing contacts

Information
Trombinoscope Contacts

Pro
Trombinoscope Contacts Pro offers an extra tool to help import contacts into the Joomla! core Contacts component.

Go to the menu Components -> Trombinoscope Contacts Pro -> Import Contacts

File The .csv or .txt file to use for import
Delimiter The column delimiter of the file
Update existing If set to 'yes', the contacts are going to be updated with the new data. Otherwise, new contacts are created. You cannot mix new contacts and updated ones
Publish all Publish all contacts or none of them
Category Select the category all imported contacts will be included in. This way, the catid column is unnecessary if all contacts belong to the same category. If contacts need to be imported into separate categories, add the catid column in the file and select Data in file
Linked user Link the selected user to all imported contacts. Leave blank if no linking is necessary. If contacts need to be linked to different users, you need to add the user_id column to the file

There are a few sets of rules to follow for a successful import:

  1. The first line of the file must contain the column names,
  2. column names of the file must match the column names found in the following table,
  3. the catid column is required UNLESS it is not an update and you have selected the category in the category field. catid is the contact category id the contact will belong to (from the core Contacts component),
  4. name is a mandatory column, UNLESS the columns firstname and lastname BOTH exist. In that case, the name will be created from those two columns instead,
  5. to separate meta keys or tags, or if the data contains commas, choose a different delimiter for the columns (; or |) or escape the data with ". For instance, "Company X, Inc" is safe to use in conjunction with coma-separated columns.

When errors occur, logs are created under the file syw.errors.log in the site's logs folder. Use that file to find out what problems prevent the file to be imported.

Supported columns Examples Default Notes *
name John Doe firstname lastname  mandatory column unless both 'firstname' and 'lastname' columns exist
firstname John   mandatory column if column 'name' is missing
lastname Doe   mandatory column if column 'name' is missing
alias john-doe auto generation if column is missing aliases are unique in a category.
In case of duplicates, the second alias will be called name-1, the third name-2 and so on.
Mandatory column when updating contacts already in the system
user_id 42 id of a user linked to the contact

catid 13   Contact component category id the contact belongs to.
Mandatory column unless the category has been selected in the category field ON CREATION ONLY. On update, the column is required
con_position Developer    
address 4520 N. Martin Drive/n#3   adding /n creates a new line
suburb Chicago    
state IL    
country USA    
postcode 60640    
telephone 773 400 2133  
fax 773 400 2134    
mobile 312 966 3453    
email_to [email protected]    
webpage http://johndoe.com   the path must start with http:// or https://
misc <p>A <i>great</i> developer!</p>   can contain basic html formatting
image images/johndoe.jpg   the path must start with images/. The image must be present in the media manager at the specified path
published 1 publish all parameter value from the import form  
linka_label ... linke_label Facebook    
linka ... linke http://facebook.com/...   the paths must start with http:// or https://
access 1 1 (means 'public') for the list of available values, go to the User Manager -> Viewing access levels
sortname1 Doe   recommended for accurate sorting of contacts
sortname2 John  
sortname3    
language en-GB * (means 'all')  
metakey developer, computing    
metadesc A great developer    
featured 1 0 1 is featured, 0 is not featured
tags staff, board   tags must exist prior to import (in the core Tag component)

* unless mandatory, all columns are optional

Additional fields

These fields come from the content plugin Add key contact fields. The plugin and the corresponding columns must be enabled prior to import.

Supported columns Examples Notes
gender m m for male, f for female, c for other
birthdate 1975-11-03 the format YYYY-MM-DD is required
company Company, Inc.  
department Accounting  
map goo.gl/maps/uPUaO  
summary A <i>great</i> developer!  
facebook jdoe  
twitter jdoe   
linkedin jdoe  
googleplus jdoe  
skype jdoe  
youtube jdoe  
instagram jdoe  
pinterest jdoe  
Joomla 3.7+

Custom fields

It is possible to import data into custom fields (the custom fields must have been created prior to import).

There are a few conventions for the naming of the column:

  • start the column name with customfield:
  • use the custom field's name as second part of the column name
Supported columns Examples Notes
customfield:name value  
customfield:name value1,value2 for list, imagelist, checkboxes, New radio and New sql field types

Other than the mandatory columns, just use the columns that are necessary for your requirements.

  • A compatibility issue with files saved on Mac (IOS) has been reported. Saving files as text solves the problem.
  • Encoding of the imported file is important. UTF-8-BOM encoded files will fail to load (to save your file with proper encoding, a tool like Notepad++ will help you determine if the file is encoded the right way).
  • The importing may not work when K2 is installed in Joomla! 3.1+ (when clicking on 'import', nothing happens). Disable the system plugin System - k2 just for the time needed for import. Re-enable the plugin once the upload of contacts has been terminated successfully.

Related tutorials and topics

Featured Blogs