Separate Stock for B2B & B2C Customers - Different Inventory

B2BKing allows you to separate stock levels and stock treatment for B2B and B2C users. You can set different stock statuses, backorder options, and actual stock quantities for both simple and variable products (optional).

These settings are found in B2BKing -> Settings -> Other -> Stock.

Always in stock for B2B #

The simplest way to separate stock quantities is to set products as always in stock for B2B users:

Always in stock for B2B setting

B2B users will then be able to order any products and see them as "in stock," regardless of stock quantity. Please note that inventory quantities will still be reduced when B2B users place orders.

If you would like B2B orders to not reduce inventory quantities, please add this PHP code snippet to your site:

add_filter('b2bking_b2b_orders_reduce_stock','__return_false');

Enable separate stock for B2B & B2C #

To enable this, go to B2BKing -> Settings -> Other -> Stock and enable 'Separate stock for B2B & B2C'.

Separate stock for B2B & B2C setting

Once this setting is enabled, you will find additional options in the inventory panel of each product.

Stock settings at the product level #

1. If stock management is disabled at the product level, you can set a different stock status for B2C and B2B (In stock / Out of stock):

2. If stock management is enabled at the product level, you can set a different stock quantity, as well as enable or disable backorders:

If 'Separate B2B stock' is set to 'Yes', you can set a different stock quantity. If it is set to 'No', then all users will share the same stock quantity, but you can treat backorders differently. For example, you can allow backorders for B2B users only:

3. The same options are available for each variation in the case of variable products:

Allowing backorders for B2B users only #

In WooCommerce, allowing backorders means that users can still place orders even if the product is out of stock. A common request is to enable backorders for B2B customers only, as these may be large orders where immediate availability is less important.

Here is a configuration example for a product:

In the above example, the product has gone out of stock, but backorders are enabled for B2B.

For B2C users, the product will appear as out of stock:

For B2B users, the product is still available for purchase:

How separate stock quantities work #

Using separate stock quantities is entirely optional — as mentioned, you can choose to use the same stock quantity and only enable backorders separately. If you do want to use separate stock quantities, the two stock levels will be treated entirely independently.

This means that, for example, when a B2B user makes a purchase, only the B2B stock level will be reduced. It is also possible for one of the two levels to go out of stock while the other remains in stock. For now, low stock threshold notifications only work for B2C stock levels.

Let's look at an example:

In the above example, there are 50 items in stock for B2C users and 10 items in stock for B2B users.

B2B users will see:

B2C users will see:

WooCommerce Stock Settings #

How stock is displayed is also controlled through WooCommerce settings, under WooCommerce -> Settings -> Products -> Inventory -> Stock display format.

If you want to show the exact amounts in stock (e.g., 50 in stock), you need to set it to 'Always show quantity remaining in stock'.

Hide stock quantity or precise quantity for B2C users #

It is also possible to hide the precise stock quantity seen by B2C users (or hide stock entirely). For example, this means you can show B2B users the exact quantity in stock (e.g., 150 in stock), while B2C users will simply see 'In Stock'. More details here.

WPML Compatibility #

Starting with B2BKing 4.3.30, this feature is also compatible with WPML (with the ability to automatically sync stock across languages).

Importantly, you may want to enable automatic syncing of stock settings when you edit a product.

To do this, go to WPML -> Settings and scroll down to 'Custom Fields Translation'. Click on 'Show system fields' on the left side, and then search for 'B2B'. You should then set the following keys to 'Copy':

  • _backorders_b2b
  • _separate_stock_quantities_b2b
  • _stock_b2b
  • _stock_status_b2b
  • variable_backorders_b2b
  • variable_separate_stock
  • variable_stock_b2b
(You can right-click -> Open image in new tab to view this image in full screen)

Powered by BetterDocs