How to Import Customer Addresses to Magento 2 Without Data Duplication (Remove All Address Association)

- Magento 2, Our extensions

Importing Customer Addresses to Magento 2 is associated with a duplication issue. Since they don’t have exact IDs, Magento stores all the information that you provide via an import table even if this information is already available in your database. When you update customer data regularly, it may result in a situation when every customer account is overwhelmed with duplicated address information. Luckily, it is possible to avoid this situation. You only need to use the Improved Import & Export extension to import Customer Addresses. The module lets you import a Customer Addresses file ignoring all addresses available in your Magento database. You will no longer need to delete duplications manually every time the import process is complete. Follow our Developer’s Cookbook to discover more Magento 2 tips.     

How to Import Customer Addresses to Magento 2 Without Data Duplication, Removing Address Associations

The Improved Import & Export extension lets you transfer data between Magento 2 and external systems more precisely than the platform’s default solution. The module offers various options to alter your import and export processes, including the ability to ignore the same addresses you already have on your website. In this case, you can regularly run data updates while the module gets rid of duplicated content. So, follow these steps to import Customer Addresses to Magento 2, ignoring information available in your database: 

  1. Go to System -> Improved Import/Export -> Import Jobs and click the “Add New Job” button to create a new import job.

  2. While on the General Settings tab, enable your job, specify its title, and set the update frequency since we are talking about regular updates. It is also possible to enable an automated re-index here.
    magento 2 improved import general settings
  3. On to the Import Settings tab, select the import entity – Customer Addresses.
    import settings  for customer addresses in magento 2
  4. Find the “Remove all address association” option in the newly displayed selection of features. Turn it on to replace addresses from the import file similar to the ones already available on your website.
    import customer addresses and REmove all address associations
  5. Save your job after configuring other parameters.

Now, you can import customers to Magento 2 without creating duplicated addresses. For further information on how to import customers to Magento 2, read this guide: How to Import Customers & Customer Addresses to Magento 2.

Remove All Address Association: The Option’s Definition & Impact

The “Remove all address association” option is available for the Customer Addresses entity. Since customer addresses do not have a unique id type, you cannot import addresses replacing the existing ones. And it leads to a situation when lots of address duplications are stored per each customer account. 

However, the “Remove all address association” feature allows you to avoid data duplication. Enable this option if you update the database on a regular basis and it will delete all the addresses from the import table that match the existing ones in Magento 2.

Improved Import & Export Features

Removing address associations is not the only strong side of Improved Import & Export since it entirely revamps the standard import and export procedures of Magento 2. 

First of all, it offers a schedule section that is extremely useful for regular customer updates described above. The section lets you import data to your e-commerce website automatically at any predefined time. Only Adobe Commerce offers anything comparable to this feature. By default, Magento 2 Open Source does not support scheduling.

In addition, the plugin offers a wide range of mapping functions. If required, you may match third-party attributes to Magento 2 attributes or construct new attributes and values on the fly.

Improved Import & Export also allows you to avoid time-consuming and inconvenient file transformations. While Magento 2 only accepts CSV files, our plugin accepts a variety of file types. You can import and export CSV, XML, JSON, ODS, and XLSX files in their original format.

Support for numerous file sources is another strong feature that simplifies your data transfer routine. With Improved Import & Export, you can import data from Google Drive, Dropbox, and FTP/SFTP, use direct file uploads, or rely on URL uploads. Even moving data between Google Sheets and Magento 2 is possible. 

Magento 2 Products add edit import export

Also, don’t overlook API connections. The Improved Import & Export extension takes a whole different way to import and export operations between Magento 2 and external systems, essentially linking your e-commerce website directly to external services. Follow these links for further information: