Globale namespace custom fields and productSet

Hi there,

I have migrated our app to use productSet api. When setting custom fields on products and variants we need to include “all the custom fields that should be there”.

However, some custom fields are generated by Shopify (I think) namely global.title_tag and global.description_tag on products and global.harmonized_system_code on productVariants

If we attempt to include global.title_tag and global.description_tag custom fields in productSet mutation we get the error “Key must be unique within this namespace on this resource”

If we attempt to include global.harmonized_system_code in productSet mutation we get the error “Setting Harmonized system code (‘harmonized_system_code’) as metafield on Product Variant is no longer supported. Update ‘harmonized_system_code’ on inventory item instead.”

So I thought I would just exclude any “global” namespace custom fields from my productSet request. This seems to work fine for global.title_tag and global.description_tag, but when done for global.harmonized_system_code the custom field is removed from the variant

  • What is the correct way to handle these global namespace custom fields? Should we filter out all global namespace custom fields, or only the ones mentioned here?

  • Does it matter that global.harmonized_system_code is removed by productSet? Is it a bug?