While Sugar provides the Mass Update utility to quickly update a set of records, you may find that updating records through a spreadsheet is much more efficient. This article will cover how to use Sugar’s import tool to update existing records.
We would like to update the Billing City and Billing Country fields on a number of account records via Sugar’s Import tool.
First, you must extract the ID field and the fields we wish to edit from Sugar. There are two ways to go about this: exporting from a report and exporting directly from the module’s listview.
- Create a Rows and Columns report based on the module that has the records you wish to edit.
- If you wish to modify only some of your records, add the appropriate filters.
- Add the ID, Name, and any fields you wish to modify as Display Columns.
- Save and Run the report.
- Open the Actions menu and select “Export” to create a .csv (spreadsheet) file of your data.
For more information on creating reports, please refer to the Reports documentation.
- Click on the Accounts module tab to open the Accounts list view.
- If you wish to modify only some of your records, create filters as necessary to find the desired records.
- Check the boxes for the desired records or select “Select All” from the Actions menu to select all results.
- Click the triangle to open the Actions menu and select “Export” to create a .csv (spreadsheet) file of your data.
Whether you choose to export from a report or the module’s list view, your .csv file may include some extra columns. It is best to reduce the file to only display any fields marked as required when importing and any others you wish to modify. In order to update records that are already in Sugar, you must also include the ID field on the spreadsheet since Sugar depends on unique IDs to know which existing record you wish to edit.
For this example, we only wish to update the Billing City and Billing Country fields. Begin by opening the .csv file in a spreadsheet application such as Microsoft Excel. To delete unnecessary fields, highlight or click the lettered column headers, right click the header, and choose “Delete”. By the end, you should only have the ID, Name, Billing City, and Billing Country fields.
Note: If updating records in a person-type module (i.e. Contacts, Leads, Targets), your export may include First Name, Last Name, Full Name, and Name fields. We recommend removing the fields “Full Name
and “Name”, making any changes only to the First Name and Last Name fields.
Now it is time to edit the data. For example, we will change all of the Billing City to say “Syndey” and all of the Billing Country to say “Australia”. Save the spreadsheet as a .csv file when finished.
- Click on the Accounts module tab and select “Import Accounts”.
- On Step 1 of the Import Wizard, click “Choose file…” and select your .csv file.
- Then, click the radio button for “Create new records and update existing records” and click “Next”.
- In Step 2, confirm that the file is being read correctly and click “Next”.
- In Step 3, map any necessary fields. Because the data was exported directly out of Sugar, the headers will map automatically to the correct field in Sugar. Then, click “Next”.
Note: All required fields, which will be indicated by the asterisk, must be mapped for the import to work successfully.
- In Step 4, leave the “Fields to Check” column blank. Adding fields to the duplicate check will prevent our updates from being imported since all the records already exist in Sugar. Then, click “Import Now”.
- When the import is finished, a message will display indicating that it updated your records along with any potential errors. For this example, the message “6 records updated successfully” confirms that we updated rather than created new records because we used the existing ID field.