I’m trying to create combined listing with linked metafield via API (v2025-04). This is the mutation that I’m using:
mutation AddChildProductsToCombinedListing(
$parentProductId: ID!,
$productsAdded: [ChildProductRelationInput!],
$optionsAndValues: [OptionAndValueInput!]
) {
combinedListingUpdate(parentProductId: $parentProductId, productsAdded: $productsAdded, optionsAndValues: $optionsAndValues) {
product {
id
combinedListing {
combinedListingChildren(first: 10) {
nodes {
product {
id
}
parentVariant {
selectedOptions {
name
value
optionValue {
linkedMetafieldValue
}
}
}
}
}
}
}
userErrors {
code
field
message
}
}
}
When I provide standard Shopify color metaobject in optionsAndValues.linkedMetafield
everything works fine:
{
"parentProductId": "gid://shopify/Product/10002719768888",
"productsAdded": [
{
"childProductId": "gid://shopify/Product/10002716229944",
"selectedParentOptionValues": [
{
"name": "Colour",
"value": "Black",
"linkedMetafieldValue": "gid://shopify/Metaobject/80745398584"
}
]
},
{
"childProductId": "gid://shopify/Product/10002716426552",
"selectedParentOptionValues": [
{
"name": "Colour",
"value": "Blue",
"linkedMetafieldValue": "gid://shopify/Metaobject/80745431352"
}
]
}
],
"optionsAndValues": [
{
"name": "Colour",
"values": [
"Black",
"Blue"
],
"linkedMetafield": {
"namespace": "shopify",
"key": "color-pattern",
"values": [
"gid://shopify/Metaobject/80745398584",
"gid://shopify/Metaobject/80745431352"
]
}
}
]
}
But if I’m trying to use my own custom metaobject in optionsAndValues.linkedMetafield
I get an error:
{
"parentProductId": "gid://shopify/Product/10002719768888",
"productsAdded": [
{
"childProductId": "gid://shopify/Product/10002716229944",
"selectedParentOptionValues": [
{
"name": "Colour",
"value": "Black",
"linkedMetafieldValue": "gid://shopify/Metaobject/99500130616"
}
]
},
{
"childProductId": "gid://shopify/Product/10002716426552",
"selectedParentOptionValues": [
{
"name": "Colour",
"value": "Blue",
"linkedMetafieldValue": "gid://shopify/Metaobject/99500196152"
}
]
}
],
"optionsAndValues": [
{
"name": "Colour",
"values": [
"Black",
"Blue"
],
"linkedMetafield": {
"namespace": "",
"key": "custom_color",
"values": [
"gid://shopify/Metaobject/99500130616",
"gid://shopify/Metaobject/99500196152"
]
}
}
]
}
The definition of my custom metaobject is similar to standard Shopify color, except taxonomy fields which I can’t add.
Not sure what’s causing an error. Also, namespace
and key
fields for linkedMetafield
are confusing as I don’t understand what they mean in context of metaobject - metaobjects have only type without namespace.
Is this a bug or combined listings are meant to be used only with standart Shopify metaobjects? If so, then why this limitation exists?