Automatically fill out product metafields

Solved

Automatically fill out product metafields

tristanklavsen
Excursionist
18 1 2

Hi

 

Is it possible to automatically fill out a product metafield when products are added to store?

 

1. When products are added to store
2. If products has tag X

3. Fill out metafield X with text X

 

For example:

 

We have a material field as a metafield, and if the product has specific material tag, the description of the material should be filled out.


Is that possible?

Accepted Solution (1)
ryan_i
Shopify Staff
22 5 8

This is an accepted solution.

Hello again! Using the metafield you mentioned (custom.matrialebeskrivelse), the metafield namespace is "custom" and the key is "matrialebeskrivelse". What is configured for "Value" and "Type" depends on the metafield (just make sure the type matches what is set for the metafield).

- Finding Flow useful? Leave us a review.
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.

View solution in original post

Replies 6 (6)

tristanklavsen
Excursionist
18 1 2

Here is the metafield "materiale" i would like to get filled out automatically:

 

https://snipboard.io/A5qarJ.jpg

ryan_i
Shopify Staff
22 5 8

Hi There,

 

Yes, this can be automated with Flow! You can use the trigger "Product added to store", use a condition to check for the tag, and finally use the "Update product metafield" action. Here's a screenshot of what the condition would look like:

ryan_i_1-1709740784731.png

 

 

Thanks for using Flow!

 

 

- Finding Flow useful? Leave us a review.
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
tristanklavsen
Excursionist
18 1 2

Hi Ryan

Thank you for trying to help me!

It does not look like the same on my end.

Please have a look if i do anything wrong:

1:

tristanklavsen_0-1709799868391.png

 

2:

tristanklavsen_1-1709800060345.png

 


This is the name for the metafield: custom.matrialebeskrivelse

ryan_i
Shopify Staff
22 5 8

This is an accepted solution.

Hello again! Using the metafield you mentioned (custom.matrialebeskrivelse), the metafield namespace is "custom" and the key is "matrialebeskrivelse". What is configured for "Value" and "Type" depends on the metafield (just make sure the type matches what is set for the metafield).

- Finding Flow useful? Leave us a review.
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
tristanklavsen
Excursionist
18 1 2

Thank you very much! Is it true that it is not possible to do the same but with product templates instead of product metafield? Changing the template if the product has a specific tag.

ryan_i
Shopify Staff
22 5 8

Unfortunately, there are no actions to do this in Flow at this time.

- Finding Flow useful? Leave us a review.
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.