Metafields

Shopify Metafields: Export and Import

Last updated

Use the standalone Metafields resource when you want one row per metafield and one spreadsheet that can cover several Shopify resource types at once. Each row identifies an owner, namespace, key, type, and value.

This is different from selecting a Metafields column group inside a Products, Customers, Companies, Pages, or Shop export. Those resource sheets keep one item per row and put metafields in columns. The standalone Metafields sheet puts every metafield in its own row.

EditEngine follows the Matrixify row-based Metafields import format, then extends it with a direct owner-spanning export and an optional Command column. Matrixify primarily exports metafields on their owner sheets; EditEngine's standalone export is designed to round-trip through EditEngine Advanced Import.

Before you start

  • Use Advanced import, not Guided import, for the exported file.
  • Keep one untouched, access-controlled export. Advanced imports do not have one-click undo.
  • Start with one namespace or key and a small set of owners.
  • Keep the required identity and payload columns unchanged.
  • Treat every blank Value cell as a delete instruction.
  • Grant only the read and write scopes required by the selected owner types.

Metafield export must be included in your EditEngine plan. Shopify also restricts app-owned namespaces such as app--<app_id>--...; only the owning app can manage those values.

Step 1 — Select the Metafields resource

Open EditEngine → Export, choose Metafields, and select CSV or Excel format.

Metafields selected as the EditEngine export resource

The standalone export produces a sheet named Metafields. Every data row represents one metafield on one Shopify owner.

By default, EditEngine selects Products, Variants, and Collections as owner types. At least one owner type must remain selected or the export cannot run.

Step 2 — Keep the round-trip columns

EditEngine always includes these six columns because removing any of them can make the file unsafe to re-import:

  • Owner
  • Owner ID
  • Namespace
  • Key
  • Type
  • Value

Owner Handle and Command are optional but selected by default.

Required Metafields columns and the default owner types in EditEngine

The exported columns are:

ColumnPurpose
OwnerThe Shopify resource type that owns the metafield.
Owner IDThe owner's numeric Shopify ID. A full Shopify GID is also accepted on import.
Owner HandleA readable secondary identity used when Owner ID is unavailable or removed for a cross-store import.
CommandExported as MERGE; can also be changed to DELETE or IGNORE.
NamespaceThe first part of namespace.key. Blank imports default to global, but keep the exported value.
KeyThe second part of namespace.key; required.
TypeThe Shopify metafield type, such as single_line_text_field or list.product_reference.
ValueThe value to set. A blank cell deletes the metafield.

For a safe same-store round trip, leave all eight columns in place.

Step 3 — Choose owner types and permissions

Open Owner Types and select only the resources you need. The 14 switches can produce these canonical Owner values:

Owner type in ExportOwner value in the sheetExtra export scopeImport write scope
ProductsproductNonewrite_products
VariantsvariantNonewrite_products
CollectionscollectionNonewrite_products
Customerscustomerread_customerswrite_customers
Pagespageread_online_store_pageswrite_content
Blogsblogread_online_store_pageswrite_content
Blog Postsarticleread_online_store_pageswrite_content
Ordersorderread_orderswrite_orders
Draft Ordersdraft_orderread_draft_orderswrite_draft_orders
Companiescompanyread_companieswrite_companies
Company Locationscompany_locationread_companieswrite_companies
Locationslocationread_locationswrite_locations
Marketsmarketread_marketswrite_markets
ShopshopNoneNo separate Shop write scope

If EditEngine shows an access banner, grant the requested scope before continuing. The Advanced Import preview derives scope banners from the sampled Owner rows. For a mixed-owner file, review the whole Owner column and make sure every required write scope in the table above is granted, even when an owner type is outside the preview sample.

Without Shopify's protected read_all_orders scope, Order metafield export is limited to the order data Shopify exposes to the app, normally the most recent 60 days.

Step 4 — Filter the export before downloading

Use filters to reduce the file to the exact namespace, key, type, or value you intend to work with. Select owner families in Owner Types; do not use a text filter as a substitute for owner selection.

The EditEngine Metafields filter panel with Namespace selected

Useful focused exports include:

  • Namespace equals custom
  • Key equals care_instructions
  • Type equals product_reference
  • Value contains a known handle or label

The badge shows metafield definitions, not the number of rows that will be exported. Metafields without definitions are still included when they match. The displayed badge total is not reduced by filters; the exported file is.

An empty filter condition matches everything. Remove unused filter rows instead of leaving them blank.

Step 5 — Understand owner identity

For a same-store update, keep Owner ID. It is the fastest and least ambiguous identity. If both Owner ID and Owner Handle are present, EditEngine uses the ID.

For a cross-store copy, source-store IDs are not portable. Clear or remove Owner ID, keep Owner, and use the destination owner's exact handle format:

OwnerOwner Handle formatExample
productProduct handlewinter-jacket
variantproduct-handle.Variant Titlewinter-jacket.Small / Blue
collectionCollection handlewinter-sale
customerCustomer emailbuyer@example.com
companyExact Company nameAcme Wholesale
company_locationCompany Name.Company Location NameAcme Wholesale.Main Office
pagePage handlecontact-us
blogBlog handlenews
articleblog-handle.blog-post-handlenews.launch-update
orderOrder name#1001
draft_orderDraft Order name#D42
locationExact Location nameSnow City Warehouse
marketMarket handlecanada
shopCurrent destination ShopThe export shows its .myshopify.com domain

EditEngine also accepts product_variant, custom_collection, smart_collection, and blog_post as import aliases, but its standalone export uses the canonical values shown above.

Names and emails are matched case-insensitively, but they still need to resolve to one unambiguous destination record. If a handle or name is missing or matches more than one owner, that row fails rather than guessing.

Step 6 — Create or update values with MERGE

Keep Command as MERGE and enter a nonblank Value:

Owner,Owner ID,Owner Handle,Command,Namespace,Key,Type,Value
product,123456789,winter-jacket,MERGE,custom,care_instructions,multi_line_text_field,Wash cold
customer,,buyer@example.com,MERGE,custom,tier,single_line_text_field,Gold
shop,,,MERGE,custom,support_url,url,https://example.com/support

If the metafield already exists, Shopify updates it. If it does not exist, Shopify creates it when the type and value are valid. Keep an explicit Type for new metafields and preserve the type from an export when updating existing ones.

Use the value structure required by the type. Lists should remain valid list data; EditEngine's export keeps structured list values losslessly. Reference values must resolve in the destination store, so review Product, Variant, Collection, Page, File, Metaobject, Order, Customer, Company, and Blog Post references before a cross-store import.

For values close to Excel's 32,767-character cell limit, use CSV and avoid opening and re-saving the file in Excel, which can truncate the value.

Step 7 — Delete only intentional metafields

There are two deletion forms:

Owner,Owner ID,Command,Namespace,Key,Type,Value
product,123456789,DELETE,custom,old_label,single_line_text_field,anything-here
product,123456789,MERGE,custom,obsolete_note,multi_line_text_field,
  • Command=DELETE deletes the identified metafield regardless of the Value cell.
  • A blank Value also deletes the identified metafield, even when Command=MERGE or the Command column is absent.

To leave a metafield unchanged, remove its entire row. Do not clear its Value cell.

Avoid duplicate rows with the same owner, namespace, and key. EditEngine runs set operations before delete operations, so a duplicate delete row can remove a value another row set in the same import.

Step 8 — Use only supported commands

CommandBehavior
MERGESets a nonblank value; deletes when Value is blank. This is the default.
DELETEDeletes the metafield identified by owner, namespace, and key.
IGNORESkips the row and counts it as intentionally ignored.

Do not use resource commands such as NEW, UPDATE, or REPLACE in the standalone Metafields sheet.

Step 9 — Upload through Advanced Import

Open EditEngine → Import, select Advanced import, and upload the edited CSV or XLSX file.

The EditEngine Advanced Import upload area for a Metafields spreadsheet

After analysis, verify:

  1. The detected resource is Metafields.
  2. Only the intended sheet and rows are selected.
  3. The supported commands show MERGE, DELETE, and IGNORE.
  4. Destructive mode is enabled only because every blank value and DELETE row is intentional.
  5. Previewed write scopes match the sampled owner types, and you have checked the whole Owner column for any additional scopes.
  6. Same-store rows still have their correct Owner ID, or cross-store rows have a resolvable Owner Handle.
  7. There are no duplicate owner + namespace + key identities.

Run a small test first. Review the results file before importing the remaining rows. A bad identity, invalid value, missing scope, or Shopify validation error is reported against the affected row so you can correct and re-import it.

Step 10 — Verify with a fresh export

Create another focused Metafields export after the import:

  1. Select the same owner types.
  2. Filter to the changed namespace and keys.
  3. Compare the fresh values and types with your intended file.
  4. Confirm that only planned blank values or DELETE rows removed data.
  5. Keep the results file with the untouched pre-import export.

The original export is your manual recovery source, not an automatic rollback. To restore a deleted or incorrect value, put its saved type and value back into a new MERGE row and import again.

Common mistakes

Using the wrong metafield workflow. Use an owner sheet when you want metafields alongside that resource's normal fields. Use the standalone Metafields sheet for one-row-per-metafield work across owner types.

Assuming the definition badge is the export row count. It counts definitions and does not change with filters.

Deselecting every owner type. At least one Owner Type is required. Products, Variants, and Collections are the defaults.

Leaving an unrelated Value blank. Blank means delete. Remove the whole row to leave it unchanged.

Keeping source IDs during a cross-store import. Clear Owner ID and use a destination-store Owner Handle.

Using a display name where a handle is required. Products, Collections, Pages, Blogs, Articles, and Markets use handle-based identity; Variants and Company Locations use a two-part identity.

Ignoring optional scope banners. Export needs read access and import needs the owner resource's write access.

Expecting all historical Orders. Without read_all_orders, older Order metafields may be absent from the export.

Expecting one-click undo. Advanced import has no automatic undo. Keep the untouched export and test a small batch.


About EditEngine: EditEngine Bulk Product Editor helps Shopify merchants bulk edit, import, and export store data from spreadsheets. Install on Shopify →

Previous
Inventory policy (continue/deny)