Solved

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

thebestbackyard
Visitor
2 0 2

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!

Accepted Solution (1)

Alejo_Wunderlic
Shopify Staff
5 1 1

This is an accepted solution.

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: 

3099-35973-41878-88617-7020.png

Alejo 😄
Did my information help? please do not hesitate to let us know. Remember that you can reach out to our help center for more help

View solution in original post

Replies 4 (4)

Alejo_Wunderlic
Shopify Staff
5 1 1

This is an accepted solution.

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: 

3099-35973-41878-88617-7020.png

Alejo 😄
Did my information help? please do not hesitate to let us know. Remember that you can reach out to our help center for more help
thebestbackyard
Visitor
2 0 2

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! 

 

Alejo_Wunderlic
Shopify Staff
5 1 1

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

Order>lineItems>Product>vendor

Alejo 😄
Did my information help? please do not hesitate to let us know. Remember that you can reach out to our help center for more help
Stephan_HH
Shopify Partner
1 0 0

hmm not working here... is that Code outdated? 

https://community.shopify.com/c/shopify-flow-app/liquid-code/m-p/1904706