Updating new JSON metafield via CSV import

Good evening to you all,

Question regarding the new JSON metafield. Is it also posssible to import JSON into our store using the CSV import for this metafield? I’m scraping some data from a site and I want to parse the resulting as JSON schema to a new JSON metafield I have set up.

I have created the metafield, configured a product, added some liquid to my product template so the output looks good and I’m now trying to figure out how to duplicate this for the other 800+ products where I need this.

I have tried adding the namespace + key to the .csv and pasting a certain JSON snippet from a dummy product I’ve configured to the respective column.

I then tried to upload it and rewrite the existing JSON and it was successful but didn’t add the JSON to the product nor did it throw any error. I then deleted the old JSON from the product metafield, saved and tried to reimport again. Success again but the JSON wasn’t populated this time.

So far I have not been able to get this to work. Is this only possible via GraphQL?

I’ve only experimented with a few custom apps for metaobject definitions and values but not yet for something like this.

If anyone can point me in the right direction, that would be awesome.

Thanks

Hey @Maxplaining,

I just exported a product and the json field was not exported with the CSV. Then digging deeper, I can see here that json is not currently a supported field for the product csv. You can see the supported metafields here: https://help.shopify.com/en/manual/products/import-export/using-csv#:~:text=columns%20for%20International.-,metafields,-Product%20metafields%20that

So in this case, the API is going to be the best route forward for applying this in bulk.