use shopify flow to get metaobject entries into metafield

Solved

use shopify flow to get metaobject entries into metafield

automaniaaaa
Tourist
5 0 0

Hi,

 

I run an auto parts store with products that fit certain vehicles only


I'd like to use a metaobject called "vehicle" and store all the different make, model, year etc combinations as entries and assign those entries to relevant product/s e.g. 2012-2018 toyota corolla hatchback (entry) assigned to products that fit only that vehicle

I'd like to also filter on collections for "make", "model" etc but need to pass the data in the object to unique metafields to do this. 

Can someone map how to do this with shopify flow so I don't need to also assign those manually? I have a lot of vehicles and a lot products so being able to assign the vehicle once will greatly reduce any chance of making data management errors.  Thanks in advance

Accepted Solution (1)
topnewyork
Astronaut
1513 186 248

This is an accepted solution.

Hi @automaniaaaa,

 

To set up Shopify Flow for this, create a workflow triggered when a product is updated or a metafield changes, then use the “Get metafield value” action to retrieve the linked vehicle metaobject data (make, model, year), and finally use the “Set metafield” action to copy each vehicle attribute into separate product metafields for filtering—this automates syncing vehicle details to product fields without manual entry.

Thanks!

Need a Shopify developer? Hire us at Top New York Web Design
Boost Your Store Sales with Volume/Tier Discount Try Big Bulk Discount
Create New Shopify Store For Just 1$/Month

View solution in original post

Replies 6 (6)

topnewyork
Astronaut
1513 186 248

Hi @automaniaaaa,

 

You can achieve this by using Shopify Flow to automate the mapping of metaobject entries (like "vehicle") to individual product metafields for filtering. First, create a metaobject definition for "vehicle" with fields like make, model, and year, and link it to products using a metaobject reference metafield. Then, in Shopify Flow, set up a workflow that triggers when a product is updated or a vehicle metaobject is assigned—this workflow can read the vehicle entry and automatically copy its fields (make, model, year) into separate metafields on the product. This way, those metafields become available for use in collection filters without needing to manually assign data each time.

Thanks!

Need a Shopify developer? Hire us at Top New York Web Design
Boost Your Store Sales with Volume/Tier Discount Try Big Bulk Discount
Create New Shopify Store For Just 1$/Month
automaniaaaa
Tourist
5 0 0

I've done the first part re create metaobject definition, referencing the object via a metafield and linking the entry/s to product

Any chance you could give me a step by step on the flow setup? What you said makes sense conceptually but I'm not sure how to practically do it

topnewyork
Astronaut
1513 186 248

This is an accepted solution.

Hi @automaniaaaa,

 

To set up Shopify Flow for this, create a workflow triggered when a product is updated or a metafield changes, then use the “Get metafield value” action to retrieve the linked vehicle metaobject data (make, model, year), and finally use the “Set metafield” action to copy each vehicle attribute into separate product metafields for filtering—this automates syncing vehicle details to product fields without manual entry.

Thanks!

Need a Shopify developer? Hire us at Top New York Web Design
Boost Your Store Sales with Volume/Tier Discount Try Big Bulk Discount
Create New Shopify Store For Just 1$/Month
automaniaaaa
Tourist
5 0 0

sorry can i be super specific, which one should be selected next?

lsamuels_0-1749108160608.png

 

automaniaaaa
Tourist
5 0 0

I've got it to work. thank you

paul_n
Shopify Staff
1814 199 430

None of these are real actions. Please don't post AI-generated responses here without double-checking they are accurate. 

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.