Knowledgebase: CSV Export-Import

Can I remove Products through a CSV Import?

 

There may come a time when you need to delete your products en masse. The most common method to do this is by selecting all of the products that you'd like to remove from your Online Store Manager's Products List page (Products >Product List) and selecting "Delete" from the Batch Action menu located at the bottom.

Another method is to remove the products via a CSV export. This second method can be useful if you have hundreds (if not thousands!) of products that need to be removed and going through the Shift4Shop Online Store Manager is not a feasible method for your needs.

This article will illustrate how to delete products via the CSV.

Note
The following information is being provided as a courtesy for merchants with larger stores that require mass deletion of products.

Please exercise CAUTION when attempting the following instructions as your products will not be recoverable after deletion except via a complete site restore.

Shift4Shop assumes no responsibility for misuse of the information contained in this article.


Exporting your Products

The first step is to export a CSV of your existing products from your store. The basic process of removing Products via CSV import involves adding a simple minus sign (-) to the catalogid of the products you'd like to remove. Normally, a product's catalogid will be listed as a whole number such as 1234 but to remove the product from your store's database upon import, you will need to list the catalogid as -1234 for the import.

What we will be doing in this case is creating a custom export set that lists your product catalogid data with the hyphen already populated on it. After generating the CSV export, you will simply need to remove the products you'd like to keep from the CSV file (thereby only having the products set for removal in the CSV) and importing the resultant file to your store.

Note
Again, please be sure to exercise caution when attempting this function. Be sure to work with and import a CSV that contains ONLY those products which you wish to remove.

Custom Export Set

Log into your Shift4Shop Online Store Manager and use the left hand navigation menu to:

  1. Go to Products >Product List
  2. Look towards the top right of the page and click on the "Export/Import" button
  3. Next, click on the + icon next to products on the "Export" side of the page
    (The left hand side of the page)

You should see an area (under the Manufacturer and Distributor fields) called "Custom Export Sets." At the bottom of this area, you'll see a link marked "Manage."

  1. Click on the "Manage" link
  2. Then, look to the top right of the next page and click on the "+Add New" button

These next steps will allow you to create a customized export set containing only the columns we need for the product removal.

  1. Specify a Name for your new Custom Export Set
  2. Click "Save"
  3. Click on the "Add New Field" section, and select "catalogid" from the drop down
  4. Click "Add New" to insert it.
  5. Repeat the above steps for "id" and "name" in the "Add New Field" drop down menu.
  6. Click "Save"

The above steps will generate a CSV file with only 3 columns on it:

  • Catalog ID
    The store's database ID for the product.
  • ID
    The product SKU/ID information
  • Name
    The Product names so you can identify them more easily.

As mentioned before, to remove items from the store using CSV, the file needs to have the catalog ID listed with a minus (-) sign. So in the next step, we'll have the store generate the file with the minus sign already in place!

  1. Look at the "Prefix" field for catalogid, and enter a minus sign in it
  2. Then, click "Save" at the top right.
  3. Repeat steps 1 through 3 above to get back to your Export page.

This time, place a dit in the button to select the custom export you just created. Then click on "Export Data" to generate your CSV file.

You should now have a CSV export file containing your product data with 3 columns: catalogid, id, and name. Furthermore, the catalogid listing on the products will contain a minus sign to the front of them.

Important
Do not import this file yet!

This file - if imported as is - will remove all of your items. Therefore, you will need to edit the file to remove those products which you intend to keep!


Editing your Exported CSV file

The next step will be to edit your CSV file so that it contains ONLY those products which you wish to remove from the store.

  1. Open the CSV file in your favorite spreadsheet program
  2. Using the Product ID and/or Name columns, select and delete the product rows for products which you intend to keep on your store.

Note
Don't forget! The goal is to create a CSV file that will only contain the products you wish to REMOVE!

So while editing the CSV file, only take out the rows of products from the CSV for products that you intend to keep on your Shift4Shop store.

After making your needed changes you should now have a CSV list of products which you'll be removing from your store. Save this file after editing, and you're all set. You may now import this special CSV file to your store and it will remove the listed products upon import. Just be sure that - when you import the file - it is imported as an Update (rather than insert).

Additional Information
The actual import/export process takes place "behind the scenes" of your store's software to prevent it from interfering with your store's active processes. By allowing the function to work in the background, you can go to other pages of the admin and still work on your store while importing or exporting large files.

During the process, you will be taken to the Import/Export Status page which will display a grid layout of your recent imports and exports. The progress column will show you the progress of the import.

At the far right of each grid item will be an action wheel that contains the following options:

  • Download: Allows you to download the CSV file after a successful import/export
  • Notify Me: For larger, more time consuming files; this option will let you input your email address so that you will receive a notice once the import/export is complete.
  • View Log: Allows you to review the log of the import/export so you can see how many items were updated, inserted or if any records failed.
  • Cancel: Allows you to cancel an impending import/export
  • Retry: If for some reason the import/export fails, you may use this option to attempt a retry of the file.
  • Delete: Use this to delete the record altogether from the status page.

This will be present in all of the store's Export/Import functions.


Help Desk Software by Kayako fusion