Access Customer B2B fields in Shipping Scripts

Topic summary

A developer seeks to implement differentiated shipping rates for B2B companies—similar to how pricelists work—such as varying minimum order values for free shipping.

Core Issue:

  • B2B-specific fields (like the “company” object available in Liquid) are not accessible in Shopify’s Shipping Scripts API
  • The Scripts customer object lacks native B2B data integration

Proposed Workarounds:

  • Using customer tags to identify B2B customers, then checking for these tags in shipping scripts (e.g., cart.customer.tags.include?('B2B'))
  • The original poster prefers avoiding customer tags to maintain alignment with native B2B values

Current Status:

  • No native solution exists; the discussion remains unresolved
  • One participant notes that with Shopify’s shift toward Functions, Scripts may not receive further development attention
  • Multiple users express frustration at the lack of engagement on this limitation
Summarized with AI on November 9. AI used: claude-sonnet-4-5-20250929.

We would like to provide different shipping rates to different B2B companies, similar to how pricelists work. For example, have different minimum order values for free shipping.

Since that type of functionality isn’t currently available, I was hoping I could approximate it with Shipping Scripts. However, it seems none of the B2B fields are available in the Scripts API?

Scripts customer object:

https://help.shopify.com/en/manual/checkout-settings/script-editor/shopify-scripts#customer

As opposed to, for example, the “company” object’s inclusion on “customer” in Liquid:

https://shopify.dev/themes/pricing-payments/b2b

Any advice on how one might achieve this?

The only thing I can think of to explore offhand is customer tags, but I’d really like to stay away from that and keep it aligned with native B2B values…

4 Likes

Surprised there aren’t more eyeballs and upvotes on this one!

I think with the move to Functions, no attention is being paid to Scripts.

So think I titled this post wrong. I should have named it something like “How to have shipping rate list similar to price list.”

Went with tagging b2b customers and used that for our situation.

cart.customer.tags.include?('B2B')