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’re providing B2B capabilities built directly in our core product. Shopify Plus merchants and merchants using Commerce Components by Shopify now have a suite of tools available to sell both wholesale and DTC (direct-to-consumer) from the same store, and build advanced integrations.
Today, as announced at the Shopify Winter ’23 Edition, we are introducing more resources for developers building for B2B, including updates to business customer primitives, and contextual pricing and publishing using the upcoming
Catalog feature. Using the new B2B APIs, developers can build apps and solutions that directly integrate with B2B features on Shopify and reach a new market of B2B merchants. In this article, learn about these new APIs and what they mean for you.
Catch up on the latest developer announcements from the Shopify Winter ’23 Edition
The Shopify Winter ’23 Edition was full of big announcements for developers who work with Shopify. Visit our roundup on the Shopify Partner Blog to get caught up on all the news.Read article
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
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
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 [Unstable]
Announced at the Shopify Winter ’23 Edition, 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 wholesale 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 new feature can integrate with your wholesale apps and workflows to offer unique wholesale product offerings and loyalty programs, with curated product selections to customize B2B buyer experiences at scale. It is available in an unstable API version now and we’re planning to make it available in the 2023-04 API version. 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
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.
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
DraftOrder from the
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
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.
Dig deeper into the developer products announced at Shopify Editions
Join our upcoming Shopify Editions-focused AMA sessions on our Discord channel. Learn from industry experts, including Shopify CEO Tobi Lütke, ask questions, and connect with other like-minded individuals.
You can RSVP to whichever AMA sessions interest you on our Discord channel in the ‘Events’ category at the top left of the channel list. Join our Discord channel at the link below.Join now
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, review our getting started guides and developer documentation. Or, if you already have an app that manages and supports
PriceLists, review our migration guide so your app can benefit from the latest B2B features.