Overview
Metafields is a feature in Shopify. It is comparable to custom fields in other applications. You can store extra information about your products, variants, customers, collections, orders, blogs and shop. Read more about Metafields here.
We offer two apps for metafields.
Metafield Editor has a free subscription to start with. Bulk import/exporting metafields through csv files is available in paid subscriptions.
You can sign up for the Metafields Editor for free by going to here.
Metafields Pro is a Shopify application that is a monthly paid version of the free Metafields Editor that allows you to import and export metafields from comma separated values (csv) files and many other features.
You can sign up for the Metafields Pro by going to here
Import Metafields
File formats
There are 6 import file formats you can choose from. File must be in CSV(Comma separated value ) format. (not in Excel xlsx or xls format). If you use MS Excel, you can do a Save as or Export to save the file into CSV format. We also work with Google Sheet. Create a file and make sure the file is set to shared with public with the link.
value_type can have the following values. string, intege,r json_string, single_line_text_field, multi_line_text_field, number_integer, number_decimal, date, date_time, url, json, boolean ,color, weight, volume, dimension. See here for explanation of the different fields types.
In order to process large metafields properly, the app does the import in the background. When you start an import, you are required to provide an email address which we will send the final status of an import to. The status email will list all the rows in your csv file and the status of each row (Either success or failure). If you do not receive an email from the app, you can also check the status from within the app and download the log from the app.
By Resource Id:
This allows you to put one metafield per line for any resources in Shopify that supports metafields. You would need to know the id of the resources in order to import. The resources supported are products, variants, smart collections, custom_collections, pages, blogs, orders and customers.
A sample format is included below. Download a sample CSV file here
The possible values for owner_resource column is product,customer,smart_collection,custom_collection,variant,page,blog,order
owner_resource | owner_id | namespace | key | type | value |
product | 342 | location | bin | string | 232 |
customer | 333 | customer_region | region | string | north |
Product by handle:
This is for product metafields. You can use the product handle( Shopify field) as the identifier to locate products to add/modify the metafields for. To find out how to get the handle of a resource in Shopify, see here.
Download a sample CSV file here
If you use the special value of _ALL_ in the product_handle field, this means you want to add the metafield to all the variants in the store.
A sample format is included below
product_handle | namespace | key | value_type | value |
my_handle | my_store | 21.33 | string | cars |
Variant Sku:
Note: This is to store metafields with Variants (not Products)
This allows you to put one metafield per line and variants are identified used the sku number in Shopify. If you do not have sku for your variants, use the by resource id file format.
If you use the special value of _ALL_ in the sku field, this means you want to add the metafield to all the variants in the store.
A sample format is included below. Download a sample CSV file here
variant_sku | namespace | key | type | value |
2FH36 | my_store | 21.33 | string | cars |
Variant Multi-key:
Note: This is to store metafields with Variants (not Products)
This format allows you to import multiple metafields in one line where all the metafields will have the same namespace.
Select import type as Variant Multi-key and enter the name space to use for all metafields.
If you use the special value of _ALL_ in the sku field, this means you want to add the metafield to all the variants in the store.
A sample format is included below. Download sample CSV file here
sku | namespace | product_cost | product_supplier_price | product_type |
9812 | my_shop | 231.33 | 200.23 | regular |
In this example, product_cost, product _supplier_price, product_type are metafields for the variant identified by Sku number 9812. They will all have the common namespace my_shop. An optional column value_type can be provided which will be used for all metafields in the each row. If value_type is not provided, the metafieleds will all have the type of single_line_text_field
Product Multi-key. New Format Added Feb 2023
Similar to Variant multi-key, this format allows you to import multiple metafields in one line where all the metafields will have the same namespace.
Select import type as Product Multi-key and enter the namespace to use for all metafields.
A sample format is included below. Download sample CSV file here
product_handle | namespace | product_cost | product_supplier_price | product_type |
sample_product | my_shop | 231.33 | 200.23 | regular |
In this example, product_cost, product _supplier_price, product_type are metafields for the product identified by handle sample_product. They will all have the same namespace my_shop. An optional column value_type can be provided which will be used for all metafields in the each row. If value_type is not provided, the metafieleds will all have the type of single_line_text_field
Product Multi-key with Details. New Format Added Feb 2023
Similar to Product multi-key, this format allows you to import multiple metafields in one line for one product. You will specify the namespace, key , type all in the header. Get the correct type to use from here here.
A sample format is included below. Download sample CSV file here
product_handle | number_decimal.my_shop.product_cost | number_decimal.my_shop.product_supplier_price | single_line_text_field.my_shop.product_type |
sample_product | 231.33 | 200.23 | regular |
The format for the second columns and subsequent column is metafield type.namespace.key . In the example above, the second column is for a metafield with the type of single_line_text_field, namespace of my_shop, key of product_cost. Use alpha-numeric characters for namespace and key and reduce issues with importing.
Export Metafields
Click on CSV import/export at top menu and choose Metafields Export.
Click on start a new metafields export and select if you want to export metafields for product, variants, customer, smart collection, custom collection, pages, blogs or orders. Click on start export to complete the process. Depending on the number of metafields, the export time varies. The export result will be emailed to you. You can also download the exported file from the export listing page.
For products, the exported format is in Product by Handle import format. So you can edit the exported file and import them again using the Product by Handle format.
For variants, the exported format is in Variant by SKU import format. So you can edit the exported file and import them again using the Variant by SKU format.
Comments
0 comments
Article is closed for comments.