metaobjectUpsert add multiple products

metaobjectUpsert add multiple products

gary07
Excursionist
65 0 12

Hello everyone,

I'm currently working on using the metaobjectUpsert mutation to assign product IDs within a workflow. Specifically, I need to update the brand_products field. This workflow is triggered when product statuses are updated from draft to active for multiple products simultaneously.

This task involves ensuring that the brand_products field accurately reflects the product IDs associated with each active product

 

I have tried the product.id, handle and product.variant.id but nothing seems to be working

 

I got error Mutation had user errors: "Value is invalid JSON: unexpected token at 'abc-asdf363-10kg-ring-machine'."

 

 

gary07_1-1728389825206.png

 

 

 

gary07_0-1728389562127.png

 

Reply 1 (1)

Kalen_Jordan
Shopify Partner
803 39 147

Can you drop in a pretty-printed version of the json? Will make it a lot easier to see what the error may be. Fine to redact some of those pieces but try to be careful to only redact the content itself and not any quotes around the content etc.