How can I transfer product tags to customer tags in Shopify Flow App?

Solved

How can I transfer product tags to customer tags in Shopify Flow App?

faraoneshop
New Member
9 0 0

Hello,

I would like to copy and paste the product's tags (all or better if I can choose too) to customer's tag.

I tried to active the existing flow "Segment customers by purchase behavior" but it didn't work. 

When order is in, no customer's tag are in.

Immagine 2023-01-26 095912.png

Accepted Solution (1)
paul_n
Shopify Staff
1295 148 297

This is an accepted solution.

Flow is event-based. We don't store events for things that happen before you turned on an automation. The easiest path to making it work is what I told you. Here's the doc page for it: https://help.shopify.com/en/manual/shopify-flow/manual

 

I can't tell you how to filter the tag because there could be many scenarios for how you might want to do that. You need to define what tags you actually need and if there is any pattern in those tags. The solution could be to adjust the liquid code in the Add customer tags action, or it could be to just add the tags you want in that action (and add a condition to check that certain product tags exist on the order). 

Paul_N | Flow Product Manager @ Shopify
- 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 10 (10)

paul_n
Shopify Staff
1295 148 297

Here's a template that adds product tags to customers. I recommend using this only if you don't have lot of product tags. Link requires you to login to your store to view and install the template.

https://shopify.com/admin/apps/flow/web/editor/templates/3490d8dd-0859-475a-939f-f22393276ed3

 

 

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
faraoneshop
New Member
9 0 0

Hello @paul_n,

Thanks for your reply. We do have about 60 tags each product.

Do you think they are too much?

Could it be possible to do for old order? 

paul_n
Shopify Staff
1295 148 297

Products has a limit of 250. I'm not sure about Customers, but assuming it has the same, you could very easily go over that limit if they order a few products. It's probably better to adjust the code in that example to only add tags you really need there.

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
faraoneshop
New Member
9 0 0

Hello @paul_n ,

Thanks for the reply. Could it be possible to do for old order? Not just the new 

paul_n
Shopify Staff
1295 148 297
Yes, go to Admin > Orders and select the order. Choose Run Flow automation
from the Actions menu and choose the workflow (it must be active)
Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
faraoneshop
New Member
9 0 0

Hello @paul_n sorry to bother you.

I see I can manually activate the automation for older orders.

Can you please tell me more:
- how can I automatically activate the automation for old oders
- how can I filter the tag I want to add?

paul_n
Shopify Staff
1295 148 297

This is an accepted solution.

Flow is event-based. We don't store events for things that happen before you turned on an automation. The easiest path to making it work is what I told you. Here's the doc page for it: https://help.shopify.com/en/manual/shopify-flow/manual

 

I can't tell you how to filter the tag because there could be many scenarios for how you might want to do that. You need to define what tags you actually need and if there is any pattern in those tags. The solution could be to adjust the liquid code in the Add customer tags action, or it could be to just add the tags you want in that action (and add a condition to check that certain product tags exist on the order). 

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
chipp-09
Tourist
5 0 3

Hi Paul,

I've installed the flow.  If i wanted to only pull through tags that contained a certain value.  eg Tag contains " leadtime "

How would i edit the code? 
Code this uses:
{% for li in order.lineItems %} {% for tags_item in li.product.tags %}{{tags_item}},{% endfor %},{% endfor %}

Thanks for your help

paul_n
Shopify Staff
1295 148 297
{% for li in order.lineItems %} {% for tags_item in li.product.tags %}{% if tags_item contains " leadtime " %}{{tags_item}},{% endif %}{% endfor %},{% endfor %}

 

You can instead use a loop to do this without code:

 

  • Order created
  • For each (order / tag)
    • Condition : If tag contains " leadtime "
      • Then Add customer tag (with tag_item from loop)
Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.

paulnguyen
Shopify Partner
45 0 3

Right now I just can copy the customer tags to the note by this one.
But if you need to edit product tags, you need some bulk tag editing app.