Re: Update product metafield with metaobject entry through Shopify flow

Hi

I am trying below but getting an error

How do I get metaobject ID as value

Mutation had user errors: “Type ‘metaobject_reference’ must be consistent with the definition’s type: ‘list.metaobject_reference’.”

{
“metafields”: [
{
“ownerId”: “{{product.id}}”,
“key”: “or_see_more_choices_”,
“namespace”:“custom”,
“type”: “metaobject_reference”,
“value”: “{{ product.vendor | downcase }}-freestanding-washing-machine”
}
]
}

Your metaobject is a list of metaobjects, which would be more like [“gid://shopify/Metaobject/123”, “gid://shopify/Metaobject/122”]

I’m not sure why you are posting a mutation here, as this is using the Update product metafield action.

I have tried both update meta field flow and mutation

none of them get value using flow like this gid://shopify/Metaobject/123 like

do u know how to get object ID using flow

I don’t know what you are asking, but it’s different enough than this that you might need to start another thread and do you best to explain what you are trying to do.

Is there any way to get the metaobject ID I am using metaobjectUpsert to create/update metaobject entries once this is saved then I want to assign that Metaobject ID gid://shopify/Metaobject/123 to the meta field this is possible

No, can’t be done yet because the Send Admin API request action doesn’t yet return data from the mutation. This is planned work and in progress.

1 Like

Thanks Paul,

Any approx ETA so I can keep an eye

Hi Paul

Any ETA on it

Hi Gary07, this is planned work and in progress but we can’t comment on an expected date given the number of priorities we’re balancing across the team.

How do we get a notification once added to the
https://changelog.shopify.com/ ?

Hi @gary07 , the Send Admin API request action can now return data as of September 2024: https://changelog.shopify.com/posts/flow-use-returned-data-from-send-admin-api-request-action