Sanity Connect for Shopify: Import Shopify Metafields Into Sanity

Sanity Connect can now bring your Shopify metafields across to Sanity. Product and collection metafields arrive on the synced documents as a store.metafields array, so custom data you already keep in Shopify — care instructions, specifications, size charts, or an external ID for updating Shopify resources — is queryable in GROQ alongside the rest of the product.

Each entry is keyed by namespace.key and carries the namespace, key, Shopify type, and value.

Values are deserialized, so structured types come through as real arrays, objects, and numbers instead of JSON-encoded strings:

{
"store": {
"metafields": [
{
"_key": "custom.care_instructions",
"namespace": "custom",
"key": "care_instructions",
"type": "multi_line_text_field",
"value": "Hand wash only"
},
{
"_key": "specs.dimensions",
"namespace": "specs",
"key": "dimensions",
"type": "dimension",
"value": {"value": 24.5, "unit": "CENTIMETERS"}
}
]
}
}

You choose what comes across in the Metafields tab, at the namespace level. Selecting a namespace imports every metafield in it; clearing your selection turns import off. Changes apply to each document as it next syncs — run a Resync to apply them everywhere at once, whether you are adding metafields or removing them.

The same tab also configures syncing Sanity content out to Shopify as metafields — the two directions are set up independently.

Imported metafields are owned by Shopify and read-only in Sanity. Each sync overwrites them, and your Sanity-authored fields stay separate and untouched.

Variant metafields and metaobjects are not included in the import yet.