Change metafield

AI-generated summary

Automating assignment of a metaobject reference metafield via Shopify Flow, based on a product’s existing string metafield (brand-name) populated by an external import.

  • Context: Each product has a string metafield with the brand’s name. A metaobject contains all brands. Goal: populate a separate metafield (brand-name-metaobject) that references the correct brand metaobject.

  • Feasibility: One participant says it should be possible to change/swap the metaobject referenced in a metafield using Flow.

  • Attempt/issue: The requester tried to set the reference by writing the brand-name value into the metaobject reference metafield, noting the metaobject’s display name/handle matches the brand-name. This approach did not work.

  • Status: No concrete Flow setup or steps were provided; no resolution yet.

  • Open questions:
    • Can Flow map a string value to a metaobject reference automatically?
    • What exact value/identifier must be written to the metaobject reference metafield (e.g., specific ID vs. display name/handle)?

  • No code or attachments provided; guidance on configuration remains pending.

Hi I might have asked this before but got a bit confused in my wording.

Is it possible to change the value of a Metafield (that is referencing a metaobject)?


All my products and their data gets fetched externally.
All my products have a metafield(string) where the name of their brand is written.
I have made a metaobject with all the brands in, and would like to automatically connect it to the right products.
Is this something flow can do ? and how would I go around this?

Do you mean to change one metaobject with another in the Metafield? - If so, I think yes, you can do that.

Yes.
Per default my products have a metafield with not metaobjects attached.
I would like to change that based on the content of another metafield.


My products gets imported with a brand name in a metafield(brand-name).
Based on that brand name, I would like to add a metaobject to another metafield (brand-name-metaobject).

The “display name” and “handler” for metaobjects are the same as brand-name. Is it just a simple matter of adding in brand-name in the metafield (brand-name-metaobject)? I have tried that and can’t seam to get it to work properly.