SugarCRM: Importing multiple contact emails

When importing contacts from CSV data, you may want to import more than one email into a contact. The default SugarCRM CE supports the import of two email addresses: a primary email address and one tertiary email address. More can be added manually later.

The primary email address is imported from column “Email Address” and the tertiary email address is imported from column “Other Email”. The “Email Address” will be marked as the primary in SugarCRM.

It is important to note that when importing email addresses into existing contact records, i.e. when updating contacts with new emails, all existing emails are deleted from the contact records. So a contact may start with five email addresses, but importing one email address will replace all five and not simply add to the list. This is not ideal behaviour, and is something I would hope to see improved in future versions of SugarCRM.

A Worked Example

This is the file I’m importing:

[text]
id,”Last Name”,”Email Address”,”Other Email”
4f7c04c5-eab2-2238-427d-5066a14c54ca,”vol”,”jason2@example.com”,”jason3@example.com”
[/text]

Even though I know the ID of the contact I’m updating, the last name still needs to be provided to prevent the importer complaining that a mandatory field is missing. IMO that needs to to be fixed in SugarCRM – if an ID is provided and you are merging (i.e. updating) then the last name should not be required.

Here is the first stage presented when importing. The mappings are all automatic; I have not needed to adjust what field each column gets mapped to.

After importing, here is the contact record, with the two email addresses on:

This is SugarCRM 6.2.0 which is a few versions behind the latest now.

5 Responses to SugarCRM: Importing multiple contact emails

  1. Jaume 2012-11-19 at 23:12 #

    Hi Jason,

    In SugarCRM CE 6.5.4 there is no such “Other email” field. There is “Email Address” and there is also “Any Email”, but when mapping a secondary address to the latter data is not imported. By the way, importing over “Email Address” is ok. Which version of SugarCRM were you talking about? Am I missing anything? Thanks!

    • jasonjudge 2012-11-20 at 10:22 #

      Sure, there is no “Other Email” on the input forms that you would normally use, but it should work when importing. There are many undocumented features of the importer that you get to find out as you use it. Finding one place where the import procedure is all fully documented is just about impossible.

      Edit: I’ve added a worked example now, so you can see how it compares to the version you are using.

  2. Jaume 2012-11-20 at 12:38 #

    Thank you for the quick and helpful answer, Jason!

    I just realized that this can be done in Contacts but not in Accounts, which is the module I was trying to fill by importing. No problem in the Contacts module, as you clearly explained.

    • jasonjudge 2012-11-20 at 13:47 #

      Yes, strange that. I can’t see an easy way around that. You cannot even load them in several stages, since each time you load a new email address to an account, it throws out the existing email.

      With other importers such as for WooCommerce, multiple values can be loaded “bar|separated”. I’ve tried bars and commas to put multiple emails into the field, but they just get rejected as invalid. This would be a great feature for SugarCRM to support.

      • Jaume 2012-11-20 at 14:34 #

        You’re right. Thank you again.

Leave a Reply