metaobjectUpsert add multiple products

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’.”

1 Like

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.