Can I create a flow to tag orders with the product vendor/s ordered? mine isn't working!

I am trying to create a flow which automatically tags an order with a tag based on the vendor/s of the products the customer orders. E.g. if the customer orders a product which is Vendor1 and another product called Vendor 2. Two tags would be added “Vendor1” and “Vendor2”

I setup a flow for each vendor but right now it is adding all the tags to every order - even when the products in the order are not from that vendor. What am I doing wrong?

Here’s an example:

Start When: Order Created
Then
Check If: productVendors_item equal to KidKraft
Then
Do this: Add Order Tags: KidKraft

many Thanks!

Hi!
yes, it is possible, you can create a flow to add the vendor’s name, by adding the tag in the form of the liquid variable, by selecting it in the variable option.

Here is an example:

Thank you so much for your helpful reply. I can’t see how to add the Check if “Vendor is not empty and exists” .

Also I only want to add the vendor name as a tag for some vendors (about 5) but we have about 20 all together.

Could it be done without the check if and using an if statement in the Add Order tags? How would you write this if statement for specific vendors?

Start When: Order Created
Do This: Add Order Tags
{% for lineitems_item in order.lineitems %} {{lineitems_item.product.vendor}},{% endorfor %}}}

Really appreciate your help!

From the Check step, and once you have selected “add criteria”:

Order>lineItems>Product>vendor


![38087-27975-37219-17379-86176.png|638x571](upload://3uV5C1b5PkovqkZSmU2jSSRiDRf.png)

hmm not working here… is that Code outdated?

https://community.shopify.com/post/1904706