Re: Looking for guidance on building a flow that will update metafields and variant metafields

Solved

Looking for guidance on building a flow that will update metafields and variant metafields

Dave135
Tourist
4 1 2

Hello, I am struggling to get past a few basics to try to build what I believe is possible with the right guidance.

I load multiple Products with up to 100 variants each on a daily basis. After I load these products into Shopify, I must manually, or in bulk, make a number of updates that I believe can be mostly updated automatically with Shopify Flow. Below is the scope of what I am trying to do, some Flows are more basic than others and I am also adding screenshots of my first partially successful test.

 

I would be grateful for any any guidance on any of the below items I am trying to incorporate into this flow.

 

Basic Updates:

1. Update Product Status to: "Draft" - This is the only one I have working correctly so far.

2. Update Variant Metafield: mm-google-shopping.condition [single_line_text_field] to: "new" - in my example, I did not get any errors but nothing seems to have happened. I would expect each variant under the product to be updated with "new" in this field.

3. Update Metafield: mm-google-shopping.custom_product [boolean] to: "TRUE". This action crated a new unstructured metafield with the TRUE status. I believe this is because I can't seem to put the right values in Name Space and Key.

 

Update based on lookups or mapping:

1. Update the Variant Metafield: mm-google-shopping.size [single_line_text_field] with the value from "Option2" which is a variant level field that has the size of the product, for example, S, M, L, XL, etc.

I have several others which I could replicate the logic for if I can figure the first one out.

 

Update based on if statement:

1. Update Variant Metafield: mm-google-shopping.gender [single_line_text_field] - Logic would be (If Option1Value = "Men's T-Shirt", then set value to "male", else if option1Value = "Unisex T-Shirt", OR "Sweatshirt" or "Hoodie" then set to value to "unisex")

2. Update Category: ID based on if statement (If Option1 Value = "Sweatshirt", then set value to "14326", else if option1 value = "Men's T-shirt" then set value to "174". I have several others but just looking for help getting the syntax working correctly.

 

Current Flows Images:

Screenshot 2024-09-11 at 12.51.37 AM.png

Screenshot 2024-09-11 at 12.56.20 AM.pngScreenshot 2024-09-11 at 12.56.26 AM.png

Screenshot 2024-09-11 at 12.56.46 AM.png

Accepted Solution (1)
Dave135
Tourist
4 1 2

This is an accepted solution.

FYI for anyone else trying to do this, I think I have all the flows working smoothly now. Anytime a new product is created or updated, I have about 15+ fields that all update for Google Merchant center. This includes description, meta objects, variant meta fields, product category and product meta fields. I was able to leverage Kalen for help on a couple of the harder ones.

View solution in original post

Replies 4 (4)

PaulMartin
Shopify Partner
597 59 143

Hi Dave.


@Dave135 wrote:

Basic Updates:

1. Update Product Status to: "Draft" - This is the only one I have working correctly so far.

2. Update Variant Metafield: mm-google-shopping.condition [single_line_text_field] to: "new" - in my example, I did not get any errors but nothing seems to have happened. I would expect each variant under the product to be updated with "new" in this field.

3. Update Metafield: mm-google-shopping.custom_product [boolean] to: "TRUE". This action crated a new unstructured metafield with the TRUE status. I believe this is because I can't seem to put the right values in Name Space and Key.


1. No problem there.
2. Your namespace looks correct, just change your key. I assume it would just be googlecustomproduct. No product. and no .value
3. Similar problem to #2

For the others


@Dave135 wrote:

Update based on lookups or mapping:

1. Update the Variant Metafield: mm-google-shopping.size [single_line_text_field] with the value from "Option2" which is a variant level field that has the size of the product, for example, S, M, L, XL, etc.

I have several others which I could replicate the logic for if I can figure the first one out.

 

Update based on if statement:

1. Update Variant Metafield: mm-google-shopping.gender [single_line_text_field] - Logic would be (If Option1Value = "Men's T-Shirt", then set value to "male", else if option1Value = "Unisex T-Shirt", OR "Sweatshirt" or "Hoodie" then set to value to "unisex")

2. Update Category: ID based on if statement (If Option1 Value = "Sweatshirt", then set value to "14326", else if option1 value = "Men's T-shirt" then set value to "174". I have several others but just looking for help getting the syntax working correctly. 

I have no idea how to build each of them. Terribly sorry.

I do know someone who can help you with Flow. You might want to contact Kalen at Shopify Automation As A Service | Flow (flow-helper.com). His work focuses on building Shopify flow so he's very good at it, and I mean very very good. Send him a quick email regarding your problem and he should be able to assist you. Oh, and if you contact him, tell him I sent you.

contact@paulmartinlopez.com
Feel free to email me! 😄
I'm open to conversations or work ʕ •ᴥ•ʔ
Dave135
Tourist
4 1 2

Thank Paul,


I was able to get items 1 and 3 under Basic Updates so far.  I have been very confused by the Name Space and Key but I think I finally understand an easy way to look at this is simply that the "." separate them in the field name. 

Dave135
Tourist
4 1 2

This is an accepted solution.

FYI for anyone else trying to do this, I think I have all the flows working smoothly now. Anytime a new product is created or updated, I have about 15+ fields that all update for Google Merchant center. This includes description, meta objects, variant meta fields, product category and product meta fields. I was able to leverage Kalen for help on a couple of the harder ones.

leeprkr
Visitor
1 0 0

Great news @Dave135 

Can you share with the community, so we can try ourselves?

I am also looking to find out how to automate:

 

Age Group

Gender

Size

Condition

Custom 

 

Google Shopping metafields automatically