Shopify Plus

Implementing Advanced B2B Features in Shopify Plus

By Mohd Baquir Qureshi
Business meeting and analytics

For years, Shopify merchants had to rely on complex, heavy third-party applications to run B2B wholesale portals. With the recent release of native B2B on Shopify Plus, developers now have access to powerful GraphQL APIs to construct custom wholesale experiences natively.

1. The Company Primitive

In B2B, you don't just sell to a Customer; you sell to a Company, which can have multiple Company Locations and multiple Company Contacts (the actual users logging in). Understanding this relationship is critical.

Using the GraphQL Admin API, you can programmatically create a B2B company profile:

mutation companyCreate($input: CompanyCreateInput!) {
  companyCreate(input: $input) {
    company {
      id
      name
      locations(first: 1) {
        edges {
          node {
            id
            name
          }
        }
      }
    }
    userErrors {
      field
      message
    }
  }
}

2. Catalogs and Price Lists

A B2B store rarely has a single price for an item. Price lists are assigned to a Catalog, which is then assigned to a Company Location. When a B2B customer logs into the storefront, Liquid automatically handles displaying the contextual price list.

However, if you are building headless or need to fetch prices dynamically, you must query contextual pricing using the Storefront API by providing the customer's buyer context token.

3. Net Payment Terms

B2B businesses run on credit. You can configure Net 15, Net 30, or custom payment terms for specific companies natively. The checkout process dynamically adapts, allowing approved B2B buyers to complete checkout without entering a credit card, generating a vaulted "payment due" order in the admin.

Conclusion

By leveraging the new native B2B primitives, Shopify Plus developers can build incredibly deep, complex wholesale portals that previously required entirely separate ERP-driven frontends, dramatically lowering the total cost of ownership for merchants.