Introduction
Shopify Metafields allow you to store extra information (like a “Subtitle,” “Author Biography,” or “Product Color”) that doesn’t fit into the standard blog post fields. With Blog Importer, you can bulk import these extra data points using a simple CSV format.
Why Bulk Import Metafields?
Manual entry for hundreds of articles is time-consuming and error-prone. By using a CSV, you can:
- Migrate WordPress Custom Fields: Automatically convert ACF or other custom data to Shopify Metafields.
- Bulk Update: Rapidly update specific attributes across many articles.
- Maintain Consistency: Ensure data types and values match perfectly.
Step-by-Step Guide
Step 1: Create Metafield Definitions in Shopify
Before importing, you must define the metafields in your Shopify admin so the store knows how to handle the data.
- Go to Settings > Metafields & Metaobjects > Blog posts.
- Click Add definition.
- Enter the Name, Namespace and key (e.g.,
custom.color), and select the Type (e.g.,Single line text).
Step 2: Prepare Your CSV Header
In your CSV file, use the following format for your metafield columns:
metafield_[namespace]_[key]:[type]
For example, if your namespace is custom, the key is color, and the type is single_line_text_field, the header should be:
metafield_custom_color:single_line_text_field
Step 3: Match the Data Types Exactly
The “type” part of the header must exactly match the internal name used by Shopify.
- Correct:
metafield_custom_price:number_decimal - Incorrect:
metafield_custom_price:number(Must be specific)
Refer to the Supported Metafield Types page for a full list of type names.
Step 4: Add Your Data
Populate the rows under your new header with the relevant data.
- For text types: Just enter the string.
- For boolean types: Use
trueorfalse. - For references: Use the GID (e.g.,
gid://shopify/File/12345).
Step 5: Import with Blog Importer
Open the Blog Importer app in your Shopify admin, upload your CSV, and start the import. The app will automatically map these columns to your defined metafields.
Important Tip: If the metafield definition does not exist in Shopify yet, the import may fail or skip those fields. Always ensure the “metafield_namespace_key” and “Type” match your CSV header exactly.
FAQ
Does it support list types?
Yes, for list types, you can often provide comma-separated values or JSON arrays depending on the specific type. We recommend testing with a single row first.
Can I update existing articles?
Yes. If the handle in your CSV matches an existing article, Blog Importer can update the metafields for that article.
Related Guides
Supported Metafield Types
A complete list of supported Shopify metafield types and their CSV format names.
WordPress XML to CSV Conversion
Learn how to convert WordPress data (including custom fields) into this CSV format.
Editing with Spreadsheets
Best practices for managing your blog data using Google Sheets or Excel.