Copying prefixed tags to metafields in Shopify

It is common practice to use prefixed tags, like brand:Ablestar to store additional product data in Shopify. With Shopify's focus on metafields, and the new Search & Discovery app, you may need to move the data from these prefixed tags into metafields. For example, you may need to set a 'Brand' metafield to be the value of whatever comes after the 'brand=' part of a tag.

In this article we will show you how to set these metafields in a couple steps.

Creating a new metafield definition

If you haven't already, you'll need to create a new metafield definition in the Shopify admin. This is the name of the metafield where you'll store the value from the prefixed tags. To create a new metafield definition:

  1. Open up the settings section of the Shopify Admin and click on Custom Data 
  2. Click on Products to view your product metafield definitions
  3. Click on Add definition to create a new definition
  4. Fill out the name for the new definition (eg, 'Brand') and set the type to 'Single Line Text'
  5. Click on Save to create your new metafield definition

Refresh the metafield definitions in the Bulk Product Editor

If you've recently added the metafield you want to use you need to make sure that the app is aware of it. To do this, open up the Ablestar Bulk Product Editor and:
  1. Go to  Settings -> Metafields in the menu on the left
  2. Click on the Refresh button in the 'Shopify Metafield Definitions' section of the page
  3. Wait a second until the new metafield definitions appear

Edit the metafield using a prefixed tag

Now we are ready to run the actual edit. Go to the Home section of the app and search for the products you want to edit. Once you have them selected:

  1. Click on Edit Products at the top right of the screen
  2. Click on the button underneath 'Field to Edit' and choose the metafield that you want to set
  3. To add a dynamic value, click on Add placeholder and select Tag Suffix from the dropdown
  4. A window will open up asking for the tag prefix, enter the part of the tag like 'brand=' that you want to look for and click on Add placeholder
  5. Verify that the products look accurate in the preview and click on Run Edit
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.