Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
How can I identify if an order is B2B or web from order JSON payload?
I utilize Shopify Flow to auto-tag all B2B Orders with "wholeseller" and filter from there.
WHEN order is created THEN Check IFCompany is not empty and exists THEN add "wholeseller" tag to the order
Contains order tag "wholeseller" = B2B
Doesn't contain order tag "wholeseller" = WEB
I liked this idea because it would help with other things we were doing. But when I went to flow I could not see the field "Company". Are you sure it exists?
{
"order": {
"id": 5626252099639,
....
"company": {
"id": 84410423,
"location_id": 85491767
}
....
}
If the "company" field has and "id" and "location_id" then it is a B2B order. Otherwise, it is retail, and "company" has a null value.
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025