How to programmatically add a TAG to an ORDER upon purchase?

Solved
Highlighted
Excursionist
31 0 6

I have a very simple requirement.  Upon completion of an order, if a customer has a given tag, I want to also append that tag to an order.   (i.e. customer has a "specialdude" tag, add "specialdude" tag to the order).  

I'm a developer.  How would I go about this?  Can I do this through these theme (ideally in the same way I auto append tags to Customer during account registration)?

 

I know there is an app for this, but I really don't want to shell out $15/m for something (what should be) rather straightforward.  

0 Likes

Success.

Explorer
63 13 17

Hello, @Ryan_Mc 

You can create private app for this - listen to appropriate webhook https://help.shopify.com/en/api/reference/events/webhook and modify your order 👀

Thanks for reading, don’t forget to like and subscribe!
Wrong outro - Click Like and Accept as Solution if it was helpful and help other to find the answer ?
1 Like
Shopify Expert
2138 356 446

Hi @Ryan_Mc 

As @Yurіі  said you have to create private app then you can add tag in order by Order_create webhook.

You have to set callback url in order_create webhook and get customer tag in response so you can add this tag in order by "order update" API 

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
2 Likes