"Order tags is invalid" error when order created from draft.

Solved

"Order tags is invalid" error when order created from draft.

harryAtTIDE
Shopify Partner
3 0 1

Hi, and thanks in advance for any guidance.

 

An agent at my business created an order in the Shopify backend from a draft. It was paid, and triggered the below Flow:

harryAtTIDE_0-1709820374515.png

harryAtTIDE_1-1709820500457.png

This Flow handles orders that are created in Shopify itself, and not those from connected 3rd party marketplaces. It has been adding tags and reaching the end of the Flow when a sale has been created by the online store. This is the first order from draft, and the first time I have seen this error.

Here are the tags I'm trying to add:

{{order.riskLevel}}
{{order.customer.id}}
{{order.app.name}}
{{order.discountCode}}
{{order.note}}

I'm interested to know if it's a particular tag that is throwing the error, the order object being incompatible with drafts, or perhaps something else.


I would expect that if one of the values that I'm trying to pass in as a tag is not present, then the tag would be null and not be created.

 

Would be very grateful for advice.

Many thanks,

Flexible eCommerce Automation with TIDE!
Accepted Solution (1)

paul_n
Shopify Staff
1188 144 279

This is an accepted solution.

A tip - put those variables into a Log output action to see what values they contain. 

 

I think that at least one of them contains invalid characters for tags (def the id field, but note probably is too long) 

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

paul_n
Shopify Staff
1188 144 279

This is an accepted solution.

A tip - put those variables into a Log output action to see what values they contain. 

 

I think that at least one of them contains invalid characters for tags (def the id field, but note probably is too long) 

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.
harryAtTIDE
Shopify Partner
3 0 1

Hi Paul,

 

Thank you very much for your helpful reply. In this particular instance, the {{order.note}} was the culprit; it would explain why Flow worked in some cases but not others.

 

Noted on the invalid characters; I will use Liquid to strip or replace them.

 

All the best!

Flexible eCommerce Automation with TIDE!