Import/Export Stores Data

Users of Agile Store Locator can enter store data from the  “Import/Export Stores” section to add a large volume of store data at once.

You can upload the stores’ data with CSV files. Furthermore, the “Import/Export” section holds all the uploaded CSV files in the system, and these files are visible in a list format. In addition, any uploaded CSV files can be downloaded, deleted, or imported into the database.

Import/Export Stores Section
Import/Export Stores Section

Validating the Google Geocoding API Key #

Before you import a CSV file please make sure that you have a valid Google Geocoding API Key. 

You must have a valid API key to retrieve any coordinates (latitude and longitude) that might be missing from your CSV file. 

To fetch the missing coordinates from your CSV file, please click on the “ Fetch Missing Coordinates” button after you validate the Google Geocoding APKI key.

Validate API Key
Validate API Key

Uploading and Importing a CSV File #

To upload a CSV file with stores’ data onto AGile Store Locator, please follow the below steps:

  1. Go to the “Import/Export Stores” section on Agile Store Locator
  2. Click on the “Upload” Button
  3. Select the CSV file for uploading, and click on “Upload File”
Upload CSV File
Upload CSV File

Once you have uploaded a CSV file, you will now need to import it into the system for the store data to appear. Furthermore, to import an uploaded CSV file simply click on the “Import” button next to the file name, and you get an “X Rows Imported” message.

CSV File Imported
CSV File Imported

How to Export a CSV File? #

Click on the “Export All” button to export all the stores in the system, and retrieve them as CSV files.

How to Delete All Stores? #

The “Delete All Stores” button will prompt you to delete all the stores’ data from the system upon confirmation. Use this button with caution because the deleted data can’t be retrieved once gone.

How to reimport the Stores Data? #

Reimporting is a better way in case you have mistakenly made some problem such as duplicate data, wrong slug, or any other reason, the setups are pretty simple and don’t take more than a few minutes to do so, here are the steps for it.

  • The first and most important step is to export your stores data via the green “Export All” button and keep that CSV file safe, better to make a backup copy of it.
  • Make edits to your CSV file and make sure there is no update_id column in it, as that will look for update data instead of insertion.
  • Click on the red button “Delete All Stores” which will delete all the data of the stores, it will also reset the auto-generated IDs of the stores back to zero.
  • Import your CSV file that you have edited in the second step by uploading and clicking on the import button.
  • Once your file is imported all the new data that you have imported should start appearing on the store locator, if you still notice the old data, refresh or disable the JSON Cache.

By following the above step, you should be able to successfully import your updated CSV file data, in case of any issue, please contact us with your purchase code and the sample CSV file or any generated error.

Understanding and Preventing Store Duplication in CSV Imports #

When stores are getting duplicated during the import process, it’s crucial to understand how the import operations are performed and what conditions lead to duplication. Here’s an explanation:

1. Import Operations:

  • The import process involves three main operations: insertion, updation, and deletion.
  • Insertion: New records are added to the store database.
  • Updation: Existing records are updated based on specific criteria.
  • Deletion: Records may be removed from the database if required.

2. Importance of ‘update_id’ Column:

  • The presence of an ‘update_id’ column in the CSV file is crucial for determining whether a record should be updated or inserted.
  • If the ‘update_id’ column exists and contains data, the import process will attempt to update existing records based on this identifier.
  • However, if the ‘update_id’ column is missing or contains empty data for certain rows, the import process will proceed with insertion instead of updating existing records.

3. Causes of Duplication:

  • Missing or Empty ‘update_id’ Column: If the ‘update_id’ column is absent or contains empty data in the CSV file, the import process will treat each row as a new record, leading to duplication.