I am trying to call ‘order_add_tags’ to add multiple tags. I am calling ‘order_add_tags’ for each tag I want to add. However I am finding that every time its called it does not “add” each tag. Instead it creates one tag the first time its called and then “updates” this tag with every subsequent order_add_tags call. So it would appear that I can only create one tag with ‘order_add_tags’.
Questions:
-
Is this how the ‘order_add_tags’ is designed to work?
-
What is the difference between ‘order_update_tags’ and ‘order_add_tags’?
-
How do I call ‘order_add_tags’ to add multiple tags on the same order?
-
What is the character limit for your tags. Its not documented anywhere.
Thanks
Hey @bbarrett,
Thanks for reaching out! Looking into this now.
Let me know if there’s anything I can do to assist in the meantime.
Best,
RayanP
Thanks Ryan. I should also mention that when I try to add a second tag to an order in the shiphero app I get this error:
Also tried calling ‘order_add_tags’ one time passing in all tags as one comma delimited string. The service handler removed the commas and created it as one big tag. Also truncated it to 256 characters (which is probably the max char limit).
Hey @bbarrett,
That’s quite odd, could I snag that order id from that screencap from you as well?
Thanks!
Best,
RayanP
/orders/details/317427628
1 Like
This might help with debugging as well…
I tried to use ‘order_update_tags’ to append tags. Im not sure if this is how its designed to work, But it did not do anything and returned.
{“data”:{“order_update_tags”:{“request_id”:“63876935178da7c508074ae8”,“complexity”:5,“order”:{“id”:“T3JkZXI6MzE3NDI3NjI4”}}},“extensions”:{“throttling”:{“estimated_complexity”:5,“cost”:5,“cost_detail”:{“order_update_tags”:{“items_count”:0,“cost”:5,“total_cost”:5,“fields”:{}}},“user_quota”:{“credits_remaining”:1997,“max_available”:2002,“increment_rate”:30}}}}
Maybe you can use the request_id to look for server exceptions.
I figured out how to call order_add_tags to add multiple tags.
The “UpdateTagsInput.tags” is defined as a string in your service definition.
However, it can really be array of strings. If you set UpdateTagsInput.tags equal to an array of strings, the service will add each array element as a separate tag. This is actually what I would have expected but your service definition is incorrect and led me to try and use this function passing in a string as the Tags (not an array of strings). I would recommend you update the service definition and also tell us what the max char limit for a single tag is (i think its 256).
Thanks.
Hey @bbarrett,
Thanks for pointing that out regarding the order_add_tags. I’ll be sure to relay that to team so it’s gets looked at. I also believe you are correct regarding the character limit.
Regarding adding tags through the UI, I believe you need to click “Enter” after typing in the tag then save tags under that.
I’ll have an update for you regarding the difference between order_update_tags and order_add_tags as soon as I can.
Thanks for your patience here!
Best,
Rayan