Tag order by shipping method does not work

Solved

Tag order by shipping method does not work

kub
Pathfinder
138 3 45

Hi all.

 

I try to tag my orders by the shipping method chosen at checkout.

 

I get it working until the shipping method is a single word like "courier" i get the tag "courier" written.

 

I have shipping methods written like "courier shipping 4-6 days" and i cannot get them tagged.

 

this is written in the action to create the tag

{% for shippingLines_item in order.shippingLines %} {{shippingLines_item.title}},{% endfor %}

Schermata_20240724_161029.png

 

i cannot rename my shipping methods so i wonder if there is some solution for this.

 

Thanks in advance

Accepted Solution (1)
paul_n
Shopify Staff
1509 163 352

This is an accepted solution.

It's tell you the tags you are trying to insert are invalid. 

 

I'm not sure what you are showing there, but you can use liquid to find and replace characters, and also to truncate long strings. 

https://shopify.github.io/liquid/filters/replace/

https://shopify.github.io/liquid/filters/slice/ 

 

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 4 (4)

paul_n
Shopify Staff
1509 163 352

It's possible they are either too long or contain invalid characters. Hard to say without seeing an error message from a workflow run

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.
kub
Pathfinder
138 3 45

Thanks @paul_n for your reply.

 

The first thing i was looking was the error message but it wasn't really helpfulSchermata_20240726_221856.png

 i think it is or the "-" or " the "(" ")"  i use in the text.

because they are like this:

Schermata_20240726_221933.png

 

So i made a test without brackets and it works.

Is there a workaround to get the old ones tagged because i cannot export/import orders changing the text

 

Thanks in advance

paul_n
Shopify Staff
1509 163 352

This is an accepted solution.

It's tell you the tags you are trying to insert are invalid. 

 

I'm not sure what you are showing there, but you can use liquid to find and replace characters, and also to truncate long strings. 

https://shopify.github.io/liquid/filters/replace/

https://shopify.github.io/liquid/filters/slice/ 

 

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.
kub
Pathfinder
138 3 45

Great. That's exactly what i need. Thanks a lot