Skip to main content

Import & Export Templates

Templates are portable. Export them as JSON files to back up your metafield structure, share it with other stores, or hand it off to a client. Import templates from JSON files whether they were exported from another store, generated by AI, or shared by a colleague.


Exporting Templates

Steps

  1. Navigate to the Templates section in the app menu
  2. Select the resource type containing the templates you want to export
  3. Click the "Export" button
  4. Select specific templates or click "Select all"
  5. Click Export

A JSON file downloads automatically with the filename format: metafield-templates-{date}.json

What Gets Exported

The export includes everything about your template structure:

  • Template titles and descriptions
  • Template status (active/disabled)
  • All fields with their types, labels, namespaces, and keys
  • Validation rules and configuration options
  • Field ordering
  • Filter conditions

Exporting a Built-In Pack

You can also export any of the 10 built-in template packs as JSON:

  1. Go to the "Install a Metafield Pack" tab
  2. Click "Export JSON" on any pack card

This gives you the pack in the same portable JSON format useful for sharing with stores that don't have Metafield Studio, or as a starting point for AI-assisted customization.


Importing Templates

Steps

  1. Navigate to the Templates section in the app menu
  2. Click the "Import" button
  3. Upload a JSON file:
    • Click the upload area to browse, or
    • Drag and drop the file
  4. Metafield Studio validates the file and shows:
    • Number of templates found
    • Export date (if available)
    • Any validation errors
  5. Filter by resource type if the file contains templates for multiple resources
  6. Select which templates to import (or click "Select all")
  7. Click Import
  8. A confirmation shows how many templates and fields were created

File Requirements

  • Format: JSON
  • Maximum size: 10 MB
  • Required structure: Must have a sets array containing template objects
  • Each template requires: resourceType, title, and fields array
  • Each field requires: label, namespace, key, and type

What Happens During Import

  • Templates are created in your store's Metafield Studio instance
  • Fields are added with all their configuration (validation, options, notes)
  • If a template with the same title already exists, the imported one is created as a new, separate template (no overwriting)
  • Field ordering is preserved from the source file

Common Use Cases

Multi-Store Consistency

You manage 3 Shopify stores and want identical metafield structures across all of them.

  1. Set up your templates on Store A
  2. Export them as JSON
  3. Import the same JSON into Store B and Store C
  4. All three stores now have the same metafield architecture

Time saved: Hours of manual recreation per store.

Agency Handoff

You're an agency setting up a client's store. You've built their metafield structure and want to document it.

  1. Export the templates as JSON
  2. Include the JSON file in your project handoff
  3. If the client needs to rebuild or set up a new store, they import the file and get the exact same structure

Backup Before Changes

Before making significant changes to your templates, export them as a backup.

  1. Export all templates
  2. Save the JSON file with a date (e.g., templates-backup-2026-03-25.json)
  3. Make your changes
  4. If something goes wrong, import the backup to restore your previous configuration

Community Sharing

Built a great template structure for your niche? Export it and share the JSON file with other merchants in your industry. They import it and get your expertise without the setup work.


Troubleshooting

"Invalid JSON format"

The file structure doesn't match the expected format. Make sure:

  • The root object has a sets array
  • Each set has resourceType, title, and fields
  • Each field has label, namespace, key, and type

"File too large"

The maximum import file size is 10 MB. If your file exceeds this:

  • Split it into multiple files by resource type
  • Remove any unnecessary whitespace or formatting

"Unknown field type"

One or more fields use a type value that Shopify doesn't recognize. Check the supported field types list and correct the type value in your JSON.