i have so far 4 Metafileds under products and i am looking to automated this process
if somone can help me on how to create the workflow
Brand Name - (product.metafields.custom.brand_name) look at the Vendor Fileds in shopify and move it to Mefailed called Brand with a specific rule, making each word first letter capital and the rest lower case
Gender - (product.metafields.custom.gender) Look at the product type if the word Women appear match it preset metafiled (we sent up preset definition in metafiled for all gender Women, Men , Youth, etc..
Categories - (product.metafields.custom.product_types) same as above just with categories
Size Chart - (product.metafields.custom.size_chart) look for the brand name and search under pages for the brand name and the word size chart
Ok that helps. This is somewhat complicated, so first I would test things by using a workflow like:
Product added to store
Log output (one for each metafield you want to set to test out the Liquid code)
The final workflow would be something like:
Product added to store
Check condition
Update Product Metafield (Brand)
Update Product Metafield (Gender)
Update Product Metafield (Categories)
Update Product Metafield (Size)
Iâm not sure if you always want to set those metafields or only when certain values are present. If the latter, you might put all of these branches in parallel (you can drag a connection from the trigger multiples times) and add a condition per branch.
In the update actions (testing via Log output), you will write a bit a of Liquid to get the values you want. The Liquid Flow uses it here: https://shopify.github.io/liquid/
For the âPresetâ metafields, I think you mean that they are defined as single line text strings that can only be one of several present choices? You may have to hard-code those presets into Flow as accessing them through a MetafieldDefiniton looks very complicated in the API (possible but more work than just hard-coding).
To give you a head start on the Liquid, for brand I think you want something like:
{{ product.vendor | capitalize }}
// "pROducT Title" would become "Product title"
If you want to capitalize each work, I think you need to split by space, loop over the words, capitalize the same way, and then join again with a space.
I think (2) and (3) are possible.
For (4):
look for the brand name and search under pages for the brand name and the word size chart
What do you mean by âsearch under pagesâ? I donât think there is an API for searching pages this way if you mean pages on the storefront.
Thatâs a lot, so Iâll leave it there. Give it a try and let us know where you get stuck.
i use an inventory source that push inventory to shopify
once the product being created , we use metafields to create better filters for my products , so the brand name being pushed with all capitals, however i would like to show it with first letter capital and the the rest lower case to make it more nice
the gender and the category are all being pushed together to the product type field
so if a Product Type is Women Shoes , it will take the women for the gander and Shoes for the Categories
as to the number 4 , i created for each brand a Size Chart page under Online stores > Pages , so if the Brand is Adidas , i create a page called Adidas Size Chart and in Metafields under product.metafields.custom.size_chart i normaly would search for a page called Adidas Size Chart , so it would be the brand name withe word Size Chart
I put the triggers and actions you need above and the process for creating/testing it.
The below workflow template has a similar structure and the same trigger, if you want to use it as a starting point. I would start with the brand name one and test it again a product that doesnât have the metafield set yet.
item in shopify inventory > That the product type include the word Women > add the word Women to Metafield
so under the metafiled namespace i put product.metafields.custom.gender but i dont know what to put under the fallowing Key, Value, Type
i also want to know if instead of " Inventory Item Create" i can select âInventory Item that have no value under Metafiled " Genderâ to update the value with the above flow
The namespace in your example is âcustomâ and the key is âgenderâ. The type depends on what you set of the metafield, but is probably a single line text.
I followed your instruction and added a test product to see if its adding the value, and it did not , i normally catch on fast , for some reason i do not understand the concept here ,
You changed your condition. I donât think there is any scenario where you should use brackets. When inputting what data is expected in a condition, you definitely need to use the right operator and understand how itâs checking the value you put in there. See docs here: https://help.shopify.com/en/manual/shopify-flow/reference/conditions
To troubleshoot, look at the workflow run. My guess is that it didnât even get to the Update product metafield step.
i did with the old way and i also did with the new way , with and without the brackets (i did not put the brackets , it did it on its on) , again i do not understand the logic
this is a very confusing way to do the rules
i asked you to create one logic according my specification and you send me an example that have nothing to do with what i am trying to create
if you give me one Flow logic , i can follow the logic from that and do all the rest
you sending links to tutorials that i do not understand and not resolving my issue
if you can create one flow Triger with the following that would be appreciated
if a product type have the word âWomenâ populate the Metafiled called Gender with the word Women (regardless if its a new product or not, if the filed in metafiled is empty )
i am adding screenshot of my metrafileds how they appear in my product page
i also adding the new trigger without the brackets , i did not try with âbegin withâ
Got error updating metafield: âType âsingle_line_text_fieldâ must be consistent with the definitionâs type: âlist.single_line_text_fieldâ.. Value does not exist in provided choices: [âMenâ, âWomenâ, âInfantâ, âKidsâ, âYouthâ, âAccessoriesâ].â For value: â[,âWomenâ]â, Type: single_line_text_field