Skip to main content

How to Clear Shopify Fields with an Import: What Blank Cells Do

Which fields a blank cell clears when you update items with an import, which fields keep their value, and how to clear them.

Goal: Remove a value from existing products, variants, customers, blog posts, pages, or collections with an import. Find out which columns clear the value when you leave the cell blank, and what to do for the columns that keep the existing value.

Prerequisites:

How blank cells work

When an import updates an existing item (Command is UPDATE or MERGE), a blank cell usually keeps the existing value. Altera skips the cell, so you can import a full export file after you change only some cells.

A small number of columns clear the value when the cell is blank. These columns clear only when the column is in your file. If you remove a column from the file, the import does not change that field.

There is no special value (such as NULL or [blank]) that clears a field. Excel error values such as #N/A count as blank cells.

Columns that clear the value when the cell is blank

Products and variants (Product fields):

  • Variant SKU - removes the SKU.

  • Variant Barcode - removes the barcode.

  • Variant Compare At Price - removes the compare-at price, for example at the end of a sale.

  • Variant Cost - removes the cost per item.

  • Variant Image - removes the image from the variant. The image stays on the product.

  • Image Alt Text - removes the alt text of the image in Image Src on the same row. Image Src must be in the file.

  • Variant Inventory Tracker - turns off inventory tracking for the variant.

  • Inventory Available: [Location] - removes the variant from that location (unstocks it).

  • Variant Packed Length, Variant Packed Width, and Variant Packed Height - when all three cells are blank, the packed dimensions are removed. When only some are blank, the blank ones keep their value.

  • Variant Unit Price columns - when all four unit price cells are blank, the unit price is removed.

Customers (Customer fields):

  • Note - removes the customer note.

Collections (Collection fields):

  • Published: [Sales Channel] - a blank cell removes the collection from that sales channel.

Metafields (all data types) - a blank metafield cell clears the metafield only when the Delete metafields with blank cells import option is on. Product SEO title and SEO description are metafields, so the same option applies to them. See Deleting metafields.

Columns that keep the value when the cell is blank

All other columns keep the existing value when the cell is blank. For example:

  • Products: Title, Body HTML, Vendor, Type, Status, Template Suffix, Category, Variant Price, Variant Weight, Variant HS Code, Variant Country of Origin, Variant Inventory Policy, Image Src, and Published columns.

  • Blog posts: Title, Body HTML, Summary HTML, Template Suffix, Image Src, and Published.

  • Pages: Title, Body HTML, Template Suffix, and Published.

  • Collections: Title, Body HTML, Template Suffix, Sort Order, Image Src, Image Alt Text, and the SEO columns.

  • Customers: First Name, Last Name, Email, Phone, Locale, Tax Exempt, the marketing columns, and the address columns.

  • Tags (all data types) - a blank Tags cell adds no tags and removes no tags.

Step 1 - Clear tags with Tags Command REPLACE

To remove all tags from an item, add a Tags Command column, set it to REPLACE, and leave Tags blank. With REPLACE, the Tags cell becomes the complete list of tags, so a blank cell removes every tag.

ID

Command

Tags

Tags Command

8012345678901

UPDATE

REPLACE

Variant Barcodes works the same way: with Variant Barcodes Command set to REPLACE, a blank Variant Barcodes cell removes all barcodes of the variant.

Step 2 - Clear metafields with the import option

  1. Put the metafield column in your file and leave the cells blank for the metafields that you want to remove.

  2. Upload the file.

  3. In the import options, turn on Delete metafields with blank cells.

  4. Click Start import.

With the option on, every blank metafield cell in the file removes that metafield. Remove the metafield columns that you do not want to change.

Step 3 - Clear the other fields in the Shopify admin

For a column that keeps its value when the cell is blank, you cannot clear the value with an import. Change it in the Shopify admin.

Template Suffix is an example. A blank Template Suffix cell does not set a blog post, page, product, or collection back to the default template. To use the default template again, open the item in the Shopify admin and select the default template in Theme template.

The REPLACE command deletes the item and creates it again from the row, so blank cells are empty on the new item. Do not use it only to clear a field: the new item gets a new ID, and data that is not in your file is lost.

Outcome

The values that you cleared are empty in the Shopify admin. All the other values of the items stay as they were.

Next steps

Did this answer your question?