SugarCRM SupportHelp ArticlesImport and ExportImporting Email Attributes and Multiple Email Addresses

Importing Email Attributes and Multiple Email Addresses

Overview

Sugar®'s import wizard allows users to easily create new records and update existing records using a CSV file. There may be occasions where you want to create or update records to have more than one email address. Users can include various email addresses (primary and secondary emails) in the import file and also specify if the email address should be marked as "Primary", "Invalid" or "Opted Out" on the record. This article covers how to prepare and import multiple email addresses to individual Sugar records.

Use Case

As an example, we will prepare an import file to add multiple email addresses to an existing contact record. For more information on importing records to Sugar, please refer to the Import documentation.

Steps to Complete

Preparing the Import File

When updating existing records via import, you will need to include the record's unique ID in order to locate the matching record in Sugar. You can easily obtain the record's ID by exporting via the module's list view or by creating a report. For more information on how to extract the record's ID field, please refer to the article Updating Records Via Import. For this example, we will export the contact record (e.g. Robert Kerrigan) from the list view.

The import file can include the following email-attribute fields when importing to Sugar:

  • Email Address : Enter the primary email address for the record.
  • Invalid Email : Enter one of the following values to indicate whether or not this email address is valid:
    • 1 : Mark this email address as invalid throughout Sugar.
    • 0 or [blank] : Mark this email address as valid throughout Sugar.
  • Email Opt Out : The Opt Out designation prevents an email address from receiving any campaign emails from Sugar. Enter one of the following values to indicate whether or not this email address is opted out of email lists:
    • 1 : Mark this email address as opted out throughout Sugar.
    • 0 or [blank] : Mark this email address as opted in throughout Sugar.
  • Non-primary emails : Enter any secondary email address(es) for the record according to the following guidelines:
    • To specify multiple email addresses in this cell, use a semicolon to separate each email address, as follows: john@example.com;jane@example.com.
    • To indicate whether each email address should be marked as invalid or opted out in this field,& use the format "email_address,invalid,opted-out", where the "invalid" and "opted-out" values are either a 1 (true) or a 0 (false). For example, if an email address should be marked as opted out but not invalid, you would enter john@example.com,0,1 in this cell.
    • Multiple email addresses for a single record can be imported with attributes by putting a semicolon after the attributes, as follows: john@example.com,0,1;jane@example.com,0,0;joe@example.com,1,1.

The following steps walk through preparing the import file to add multiple email addresses to a single contact record as an example. Keep in mind that multiple contacts can be updated in this fashion in a single import file by placing each contact's ID and values on separate rows.

  1. Delete any unnecessary fields from the exported CSV file. For this example, we will remove all fields except the First Name, Last Name, ID, Email Address, Invalid Email, and Email Opt Out fields. 
    Exported CSVFile Reduced
  2. Add the Non-primary emails field to the CSV file to include any secondary email addresses in the import. We will add this field to column G of the import file.
    Exported CSVFile NonPrimaryEmails
  3. Now, enter the contact's primary email address (e.g. robert.kerrigan@abcco.com) in the Email Address column (column D). For the Invalid Email and Email Opt Out columns, we will enter a "0" in both cells since the primary email address will not be marked as invalid or opted out. These two fields can also be left blank to default to 0".
    ImportFile PrimaryEmailAddress 
  4. Next, enter the secondary email address(es) you wish to include in the import. For the example, we will include two email addresses with a semicolon between them. One is specified as invalid, rkerrigan@abc.com,1,0, and the other is specified as opted out, robertk@example.com,0,1. The resulting cell value is rkerrigan@abc.com,1,0;robertk@example.com,0,1.
    ImportFile NonPrimaryEmails
    • Note: For more information on how to enter values in the Non-primary emails column, please refer to the bulleted list above.
  5. Save the file to preserve your changes. 

Importing the File to Sugar

Once you have prepared your import file, you are now ready to perform the import in Sugar to update the contact record.

Use the following steps to import your file to the Contacts module:

  1. Click the triangle in the Contacts module tab and select "Import Contacts".
  2. In Step 1, choose "a file on my computer" then click "Next". 
  3. In Step 2, click the Choose File button and select the appropriate import file. Then choose "Create new records and update existing records". Click "Next".
    Importing Step2
  4. Complete the import wizard per the instructions in the article Updating Records Via Import.
    • Note: In Step 4 of the wizard, ensure that the Non-primary emails header row we added to the import file automatically maps to the matching field in Sugar. 
  5. Once the import is complete, the View Import Results summary will display the total number of updated records. Check the results carefully for any errors then click "Exit" to complete the import process.
    Importing ViewImportResults

Application

Now that the contact record has been updated successfully via import, navigate to the contact's record view to confirm that all of the email addresses appear as expected. The primary email address will appear as a hyperlink at the top of the list in the Email field and any invalid email addresses will be crossed out with a strikethrough effect. To check if the email addresses are marked correctly, simply click the pencil icon in the Email field to view the Primary, Opted Out, and Invalid icons that are marked for each email address. 
ContactsRecordView Emails

Last modified: 2018-05-16 21:21:38