How to edit Shopify metafields in the bulk editor?
It happens when you’ve built so many customizations inside your theme that you have tens or even hundreds of metafields per resource type.
Now you need to change data in a lot of them or you just have a new build and you need to add data to them, but how?
Going on every resource type like: products, collections, variants, customers, orders, pages, articles and blogs will take many, many hours to open each page in part and type the data inside the metafield.
Huge waste of time if you ask me.
Even if you pay a data entry guy he can do it in one quarter of a time with the new feature added to your Shopify arsenal.
For this reason Shopify added a column to the bulk editor that allows you to edit metafields in bulk.
A feature like this will cut in less than half the time needed to populate the metafields fields.
If you wonder how many metafields you can have per resource type and what is defined as resource type, please check the “What is the shopify metafields limit?”.
For this tutorial I’ll assume that you have the metafields created and I’ll not show you how to create them nor assign them to the theme sections.
At the time I’ve written this blog post metafields bulk editing is available only for products resource type. I’m sure Shopify devs will integrate this functionality in the future to all resource types.
At this time metafields can be edited in bulk only on Chrome, Firefox and Safari. If you use Microsoft Edge this feature will not work correctly. So please consider using one of the 3 browsers.
Login to Shopify Admin
First you need to login to the Shopify admin. If you do not know how, please follow the: ”How to login into your Shopify store?”.
Select the products
Now we need to go to the products listing page in the Shopify admin to select the products for which we want to edit the metafields in bulk.
Click on the “Products” menu item (marked with 1 in the image below) and select all products by clicking the checkbox (marked with 2 in the image below) :
If you want to edit the metafields specific products select the checkbox in front of each product you want to edit.
In my example I’ll edit the metafields in bulk for all the products that I have in my store.
Once you’ve clicked the checkbox the actions menu will be displayed by Shopify to allow you to edit the products in bulk.
Click on the “Edit products” button to open the “Bulk editor”:
At this point in time you can see the “mighty” Shopify bulk editor.
I tell you this bulk editor is a huge time savior.
Coming as a developer from other CMS’s to Shopify, I tell you this one was one of the features that caught my eye.
As you see in the image below we have some columns in the bulk editor as soon as we open it.
We do not need these columns to edit the metafields, so in order to make it easier to edit the metafields and remove the clutter we need to remove the columns that are not needed for bulk editing.
The first column, the “Product title” column (marked with 1 in the image below) is fixed and can’t ever be removed. It is normal since this is a unique identifier column.
We can remove through all the columns to the right of the “Product title” column (marked with 2 in the image below).
To remove the columns (marked with 2 in the image below) we need to open the “Columns” pop-up to deselect them. To do that click on the “Columns” button (marked with 3 in the image below):
The columns selection pop-up will open allowing you to deselect or select columns as you please.
So go on and deselect all the columns listed by default by Shopify. See image below:
Now in the “Columns” pop-up go to the “Metafields” section and check all the metafields that you want to list in the bulk editor.
In my example I have only 2 metafields “Short description” and “Product subtitle” (marked with 1 in the image below).
In case you have more and are not visible you need to click the “Show all metafields” link (marked with 2 in the image below) to reveal them.
Now that the metafields columns are listed in the “Bulk editor” we can start to bulk edit them.
Edit the metafields
You can edit the metafields individually or all of them at the same time.
For example I have the “Short description” column and every field needs to have a different description for each product.
In this case you need to select each field in the “Short description” column and add your description like in the image below (marked with 1 in the image below) :
Where you see the “-” character (marked with 2 in the image above) that means that those products do not have the metafield assigned to them.
In my case my metafield is set up for the main product only and not for variants.
Field editing in the metafields bulk editor can be done only where the metafield is empty (marked with 3 in the image above).
As you see the “Short description” metafield is a multi-line text type, similar to a textarea field for those that understand coding and because of that a small pop-up is opened so you can type multiple lines of text if needed.
You can navigate the all column in the Shopify bulk editor with the ⇥ key on Mac or PC.
Edit multiple fields at once
On the other side I have the “Product subtitle” field in my example which is limited to 70 characters in which I want to add a subtitle to the products.
In this case I do not want to add different text for each metafield in part but rather I want to add the same text for all metafields in this column.
To do that I’ll want to select all fields in the “Product subtitle” column and edit them all at once.
In order to do that click on the first field in the column (marked with 1 in the image below), scroll down to the last field in the page, press the ⇧ key on your Mac or PC (keep it pressed) and select the last field in the column (marked with 2 in the image below) :
Now select again the first field (marked with 1 in the image below) and type the text that you need.
As you type the text in the first field of the column you’ll see how all other fields (marked with 2 in the image below) selected from the column will update and reflect the change in real time.
Typing in one field will fill all other fields with the same content.
A lot of time saved this way than doing it individually in every field.
Now that your fields are filled with content, do not forget to save the new settings (marked with 3 in the image above) and all is done.
This is one trick that you need to add to your developer or admin tools since it will save you tons of time.