Have you tried making a workflow to do this? It seems entirely possible by using conditions in the workflow to create branched logic and then using the data picker to select the fields to add as tags.
Hi Josh
I am using workflows - lots of them
struggling to find certain fields like size or colour within the criteria#
and do not understand the branch logic - tried it - but it failed
I currently have 43 working workflows on my site - but a lot of them are
copies of others I know have worked
I want to work smarter
I find the criteria within FLOW very tricky to replicate
It’s usually an anti-pattern to create a lot of workflows. Josh is suggesting consolidating them by trigger.
Regarding your use cases, there isn’t much detail in there about where you are stuck. I would suggest picking one and going deep on that as it may help you solve the other needs.
Vendor info is per product and on an order that is located:
order
lineItems
product
- vendor
OR:
order
lineItems
vendor (it’s copied from the product during order creation)
LineItems is a list, so you need to work with that list.
Answers and questions - sorry
It’s usually an anti-pattern to create a lot of workflows.
Q whats an anti-pattern?
Josh is suggesting consolidating them by trigger.
Q How do I that?
Regarding your use cases, there isn’t much detail in there about where you are stuck. I would suggest picking one and going deep on that as it may help you solve the other needs.
I have a lot of orders from Schools - and so I have set up 1 workflow for each school - but I think I should be able to se up one workflow for all Schools for the Flow to identify the school and then add the correct tag - when I first tried it - it added all the tags to the one school order
One main issue I have is with criteria and finding the first (working and correct) criteria in the drop down box -
e.g. Name
Order.lineItems.name
I just cannot replicate it in the drop down of criteria as NAME is not an option as a drop down
it would useful to have a Duplicate box to tick!!!
Vendor info is per product and on an order that is located:
order
lineItems
product
- vendor
I have found that one!!! so will try it out
LineItems is a list, so you need to work with that list.
Q but there are lots of line items and as a newbie - its confusing !
I’m not sure what data you are trying to find. There is a name field on line items, which is the same as the product’s display name (includes variant info). If you click “Add criteria” and then “Order / lineitems / name” you’ll find it. You can also search for “name” and it will narrow options.
I have tried that - but the second criteria I find, never looks like the first - I am trying to have multiple criteria in one workflow - minimising the amount of workflows I have
the first (from template) criteria says
NAME
order.lineitemsname
but if I try and create another criteria underneath this one - I cannot re-create the same syntax , it says
its really confusing and hard to explain - but I want to create a long work flow with multiple conditions and replicate the one I took from the browser is proving impossible
To do that, I would add a second condition and essentially the same logic again. You can connect that second condition directly to the Order created trigger so that the logic for 1 doesn’t affect the other.