It’s no secret that B2B (business-to-business) is an area of growth for ecommerce. In fact, Gartner estimates that 80% of B2B sales interactions will be happening in digital channels by 2025—and that’s a huge opportunity for merchants.
To help merchants capitalize on that opportunity, we’ve built dozens of B2B features directly into our core product. Merchants on Shopify Plus and Commerce Components plans now have a suite of tools available to sell both wholesale and DTC (direct-to-consumer) from the same store, and build advanced integrations.
We’ve also introduced more resources for developers building for B2B. Using our suite of B2B APIs, developers can build apps and solutions that directly integrate with B2B features on Shopify and reach a market of B2B merchants. In this article, you’ll learn about these APIs and what they mean for you.
Shopify’s B2B APIs
Let’s first review the suite of APIs available for developers building B2B solutions on Shopify.
1. Company API
When a merchant engages in B2B transactions, they sell their goods and services directly to other companies. When a company is the customer, there are often multiple contacts, locations, and pre-negotiated payment terms to manage. All of these factors complicate the process of expanding a business into the B2B space.
The Business Customers API provides a set of B2B primitives such as Company
, CompanyLocations
, and CompanyContacts
. These can be used to represent information about who makes a B2B purchase. When selling to B2B customers, merchants need to save different information than they would when selling to DTC customers. For example, a company location must be added to attach important information like tax exemptions and payment terms to the company.
Now, developers can add metafields to extend the Company
and CompanyLocation
resources. This creates a flexible way for your app to add and store additional information. This information can be surfaced to merchants or used by your app to create unique business logic such as order value minimums and maximums.
2. Catalogs API
A Catalog
is a set of rules that determine the available products and their prices in different contexts.
As an example, let’s imagine a merchant who sells packaged food products to other businesses in the US and Canada. This merchant may decide that based on regional tastes, some products don’t make sense to sell in the US or Canadian market. For this reason, a merchant would use Catalog
to curate the product selection a customer sees when they log into their B2B store, based on their geographical location. Canadian customers will be able to see and purchase some products that US customers will not, and vice versa. With Catalog
, we can tailor the buying experience for each customer to ensure they only see the products and prices that are applicable to them.
This feature can integrate with your B2B wholesale apps and workflows to curate product selections and customize B2B buyer experiences at scale. Start experimenting today and let us know how we can make it better.
3. PriceLists API
You can associate a PriceList
with a Catalog
to determine the prices that are shown to customers ordering for a specific B2B company location. PriceList
can have a relative price adjustment or a fixed price per product variant.
This allows app developers to create applications that can show different prices to different B2B buyers. For example, it is possible to use PriceLists
to decrease the base price of the product by 5% and Catalogs
to assign the discount to specific locations.
4. Publications API
The Publications API allows you to associate a Publication
with a Catalog
to determine which products are shown to B2B customers. If a Publication
isn't associated with a Catalog
, then no products are available for the customer.
Apps can create and manage a Publication
, allowing developers to build integrations with external systems and automatically sync what products specific customers can purchase.
5. Order and DraftOrder APIs
You may be familiar with Order
and DraftOrder
objects. An Order
is a customer's request to purchase one or more products from a shop, while a DraftOrder
is an Order
that a merchant initiates and sends an invoice to a customer to accept and pay.
The Order
and DraftOrder
objects have been updated to distinguish between DTC (direct-to-consumer) and B2B orders. An Order
can now return a PurchasingEntity
that represents the buyer (either a DTC customer or a B2B customer including a company and company location). Now, apps can pass in this crucial data if an Order
was created in a B2B context.
6. Payment Terms API
Payment terms enable you to set the length of time that a company has to pay for their order. You can set payment terms for any company location that you create. After payment terms are set for a location, any B2B customer for that location can enter payment information for the order. Apps can use this API to create solutions to automatically sync B2B custom payment terms from external systems. Now apps are able to query the associated Order
and DraftOrder
from the PaymentTerms
object.
Building B2B apps for large merchants
The addition of these APIs opens up opportunities for developers to reach and capture more Shopify Plus and Commerce Components by Shopify merchants by extending their current apps and solutions, or building new ones. In this section, we look at some example use cases.
B2B apps for Shopify Checkout
B2B resources are not only exposed on the Shopify Admin API, but also on the Shopify Functions APIs. Shopify Functions allow developers to customize the backend logic that powers parts of Shopify. Using the new B2B resources on the Delivery and Payment Customization APIs, developers can build apps that filter, rename, reorder, and sort the delivery and payment options available to B2B customers. For example, you can build an app that uses Delivery Functions to modify the shipping options available for B2B customers, and a UI extension to present an explanation of the change.
Loyalty apps for B2B
Apps for facilitating loyalty programs are popular for DTC merchants. Now, app developers can expand their user base by bringing this functionality to merchants offering B2B. Existing loyalty apps can use the Company
and CompanyLocation
resources and metafields to implement B2B loyalty programs. For example, you can build an app for tiering B2B buyers, and to associate unique perks such as no shipping fees for buyers with gold status.
Webhooks for B2B
New webhook events were added for B2B resources. Subscribe to the PAYMENT_SCHEDULES_DUE
topic to get notified when a payment is due according to the payment terms of the order or draft order. Apps can use these webhooks to create unique workflows and integrations.
New opportunities with B2B
A world of opportunity exists when merchants connect with other businesses to sell wholesale. This represents billions of untapped revenue.
To learn more about building B2B apps for Shopify, get started here and review our B2B developer documentation. You can watch our Shopify B2B demo to see how merchants use Shopify B2B or experience Shopify B2B first-hand as a buyer on our B2B reference theme, Trade. Or, if you already have an app that supportsCompany & CompanyLocations, Catalog,
and PriceLists
, on blended stores, check out our Selling B2B App Guide to see how you could be featured.