Error when trying to use metafields in productSet

Topic summary

Issue: Users encounter the error “Owner subtype does not match the metafield definition’s constraints” when using the productSet API operation with metafields.

Root Cause: The error occurs when metafields are assigned to specific product categories but the product either:

  • Has no category assigned yet
  • Belongs to a category that doesn’t have access to that metafield

Solutions:

  • Assign a product category before setting category-specific metafields
  • Edit the metafield definition to include the relevant product category
  • Change metafield settings to “apply to all products” instead of specific categories

Note: One user found that adding “uncategorised” to metafield category assignments didn’t resolve the issue. An image showing the metafield configuration interface is included in the discussion.

Summarized with AI on October 27. AI used: claude-sonnet-4-5-20250929.

I’m trying to create a product using the productSet API operation, I provide this metafield:

[{ namespace: “custom”, key: “material”, value: “["TestMaterial"]”, type: “single_line_text_field” }]

on the ProductSetInput.metafields. I have also tried using “list.single_line_text_field”.

I get this error that I can’t find anything about: “Owner subtype does not match the metafield definition’s constraints.”.

On the “Product metafield definitons” page, this metafield is under “Assigned to categories”.

How can I solve this?

The reason was that I needed to assign a category first. Not a good error message at all.

1 Like

Hi Team,

I am also facing a similar issue where the metafield type is a Metaobject (List). How to fix this?

FYI for others who run into this error, you can also get it if the metafield is a category metafield and the product has a category that doesn’t have that metafield available.

For example, this error can appear in Shopify Flow automations when the automation is trying to assign a value to a category metafield. Let’s say that you have a metafield “wheel size” that is available only on vehicles, and you’re trying to add a value for “wheel size” to a bike trailer. You will need to edit the metafield to make it available on the bike trailer category, otherwise the workflow will return that error.

1 Like

thanks - saved me some time today this comment
tried including uncategorised on the metafield category assignments - but that didn’t seem to work
but changing metafield to apply to all products worked for me