Secrets of the Shopify Bulk Editor

Secrets of the Shopify Bulk Editor
Shopify Bulk Editor

If you've ever customized a Shopify theme or used the Shopify API, you might be familiar with metafields. Metafields are extra pieces of data that apps can attach to products, customers, orders, and other objects in the Shopify universe. They are useful for storing information that doesn’t otherwise have a home in the Shopify admin — like part numbers, customer titles, or blog post summaries.

When we launched metafields, we announced that there would be a way to edit metafields in the Shopify admin further down the road. That time has come. Now you can edit metafields using our new bulk editing feature.

Here are some insights into this new feature.

Metafields have three components: a namespace, a key and a value. Once you know the namespace and key for your metafield, you can display it in the bulk editor by making small changes to the URL of the bulk editing page in the Shopify admin.

You might also like: Using Metafields in Your Shopify Theme

Editing an ISBN metafield

Here is an example URL that allows you to edit the ISBN metafield on the bulk editing page of the admin:

https://shopify.com/admin/bulk?resource_name=Product&edit=metafields.global.isbn:string

In this URL, global is the metafield’s namespace and isbn is its key. You can replace those with values to match your use case. The string part of the URL tells Shopify about the type of data that we want to store in the metafield. The bulk editor is able to display five types of metafields – string, money, boolean, select and number.

Two metafields and the variant SKU

You can display more than one metafield in the bulk editor by separating them with commas. This URL combines the ISBN metafield with a cost metafield and the product variant SKU:

https://shopify.com/admin/bulk?resource_name=Product&
edit=metafields.global.isbn:string,metafields.josh.cost:money,variants.sku

What else can I do?

The bulk editor has other options too. You can use any of the fields below as a parameter in the bulk editor URL. These settings allow you to customize the headers, filter objects and define an app URL to return to after saving.

Shopify Bulk Editor: Table of Parameters

This is a complex example that uses almost all of the above options:

https://shopify.com/admin/bulk?
resource_name=Product&
edit=metafields.global.ibsn:string,metafields.global.hardcover:boolean,
metafields.global.genre:select&
metafield_titles[metafields.global.ibsn]=ISBN%20%F0%9F%94%96&
metafield_options[metafields.global.genre][1]=Horror&
metafield_options[metafields.global.genre][2]=Romance&
metafield_options[metafields.global.genre][3]=Fantasy&
metafield_options[metafields.global.genre][4]=Sci-fi&
metafield_titles[metafields.global.genre]=Genre%20%F0%9F%8E%A8&
metafield_titles[metafields.global.hardcover]=Hardcover%20%F0%9F%93%9A&
return_to=/admin/apps/elite-bookseller

Shopify Bulk Editor: Find Bulk Editor in Shopify Admin

What will you use the bulk editor for? Let us know in the comments! 

You might also like: The Essential List of Resources for Shopify Theme Development

About the Author

Josh Brown is a developer advocate at Shopify.

Grow your business with the Shopify Partner Program

Learn more