Does anyone know of a way to use Shopify Flows to automatically tag orders and draft orders that are created where the customer is a buyer from a B2B “company” profile? I know that customers associated with a B2B “company” can either place an order for themself or for their company, I’d like only these company orders to be tagged with a B2B tag automatically.
Also, separate question, is there a way to use Flow to tag draft orders and orders based on what staff member created the order/draft order? I see lots of available values in Flow, but none of the Staff email related items have seemed to work in my testing.
Thank you so much for helping! I’ve been stuck on this longer than I care to admit.
1 Like
Hi @jobrien ,
Lesle this side from Dollarlabs, please correct me if I missed any of the requirments
- Tag an order as “B2B” when it’s placed by a customer who is part of a Company (B2B profile)
- Tag draft order based on the staff member who created the order.
For (1) you can setup a flow that goes a bit like the one I shared below. It checks if the customer has any company associated with them - and if yes, tags the order as “B2B”
For (2) - you can do this by checking the “events” variable under the draft order. You can then create a code module inside the flow to extract the text before “created” and then use that to tag the draft order. Here’s an example without that so you can see how the variables are getting printed out in flows.
Hope this helps point you in the right direction - feel free to reach out for any questions and I’d be happy to assist.
Thanks 
@jobrien Since quite some time has passed since you raised this thread, I’m assuming you’ve already reached at a solution 
If so - can you please share the same (or mark my reply as solution if helpful) and close this thread out so that others who stumble here might also find value.
Best,