It’s no secret that B2B (business-to-business) is an area of growth for ecommerce. In fact,Gartner estimatesthat 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 usingCommerce Components by Shopifynow 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 atthe 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 upcomingCatalog
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 articleShopify’s B2B APIs
Let’s first review the suite of APIs available for developers building B2B solutions on Shopify.
1.公司的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 asCompany
,CompanyLocations
,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 theCompany
andCompanyLocation
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 atthe Shopify Winter ’23 Edition, aCatalog
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 useCatalog
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. WithCatalog
, 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 andlet us knowhow we can make it better.
3. PriceLists API
You can associate aPriceList
with aCatalog
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 usePriceLists
to decrease the base price of the product by 5% andCatalogs
to assign the discount to specific locations.
4. Publications API
The Publications API allows you to associate aPublication
with aCatalog
to determine which products are shown to B2B customers. If aPublication
isn't associated with aCatalog
, then no products are available for the customer.
Apps can create and manage aPublication
, 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 withOrder
andDraftOrder
objects. AnOrder
is a customer's request to purchase one or more products from a shop, while aDraftOrder
is anOrder
that a merchant initiates and sends an invoice to a customer to accept and pay.
TheOrder
andDraftOrder
objects have been updated to distinguish between DTC (direct-to-consumer) and B2B orders. AnOrder
can now return aPurchasingEntity
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 anOrder
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 associatedOrder
andDraftOrder
from thePaymentTerms
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 Functionsallow developers to customize the backend logic that powers parts of Shopify. Using the new B2B resources on theDeliveryandPayment 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 aUI extensionto present an explanation of the change.
忠诚为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 theCompany
andCompanyLocation
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 thePAYMENT_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.
你可以回复任何AMA会议兴趣哟u 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新的机遇与B2B
一个世界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 ourgetting started guidesanddeveloper documentation. Or, if you already have an app that manages and supportsPriceLists
, review ourmigration guideso your app can benefit from the latest B2B features.