For the complete documentation index, see llms.txt. This page is also available as Markdown.

Overview

B2B manages a brand's wholesale sales. Wholesale differs from retail: the brand's divisions (dealers, franchisees, stores) order large quantities, and headquarters reviews and approves every order before it ships. To keep this flow separate from the retail order flow, B2B runs as its own application next to Commerce.

B2B users collect products in a B2B basket and submit the basket as a quotation. A quotation is a draft for a group of orders. After it is approved, B2B creates the orders in Commerce: at least one for each division in the quotation.

How B2B Works

B2B works together with three other systems:

System
Role

Storefront

B2B users shop on the brand's storefront, which has the B2B plugin. The B2B basket and quotation screens call B2B through Commerce.

Commerce

Forwards the storefront's requests under /b2b/ to B2B, for signed-in B2B users only. After approval, it receives the orders that B2B creates.

B2B

Stores divisions, users, baskets and quotations, and creates the orders.

Omnitron

Headquarters staff manage divisions, users and quotations from the B2B menu, and sign in with their Omnitron accounts. B2B reads products, prices, stock and segments from Omnitron.

The storefront sends /b2b/ requests to Commerce, which forwards them to B2B. B2B reads data from Commerce and creates orders in it.
Requests and orders between Commerce and B2B

A quotation becomes orders as follows:

  1. A B2B user adds products to the B2B basket on the storefront and submits it as a quotation.

  2. If the user belongs to a sub-division, the main division approves the quotation first.

  3. Headquarters reviews the quotation in Omnitron. It can edit quantities, add a discount, approve the quotation, reject it, or send it back to its owner, who then approves or rejects the edited quotation.

  4. When the quotation is approved, B2B splits it into orders: one per division, and more than one when a division orders more than 500 units (the default batch size of the installation).

  5. For each order, B2B signs in to Commerce as the quotation owner and completes a checkout with the B2B shipping option and the B2B payment option. Commerce applies the quotation's discount through the B2B promotion gateway.

  6. The orders reach Omnitron like any other Commerce order.

To set up these connections, follow Tutorials > B2B > How to Set Up B2B from Scratch.

Key Concepts

Divisions

A division is a business that orders from the brand. A main division can have sub divisions, for example a dealer and its stores. Each division has a unique ERP code and an address. Orders are delivered to the address of the ordering division.

A main division has a monthly order limit. It is compared with the totals before discount of all quotations created in the current month by the main division and its sub-divisions, whatever their status, plus the new quotation. A quotation that would exceed the limit can't be created.

Users and Staff

B2B users belong to a division. They don't register on the storefront: headquarters staff create them in Omnitron, and B2B creates their Commerce accounts with the same email address and password. Headquarters staff don't need B2B users, because they sign in to the B2B screens with their Omnitron accounts.

Baskets and Segments

B2B keeps a separate basket for each segment. When a B2B user switches to another segment on the storefront, they see the basket and the prices of that segment. A user can also save a basket as a draft and load it later.

Assortment Packs

In wholesale, a style is often sold only in assortment packs, also called prepacks or lots: a fixed mix of sizes sold as one unit, for example one S, two M and two L. The buyer orders packs, not single sizes.

Akinon builds assortment packs with the standard product structure. Each pack is a separate product (SKU) with its own price and stock, and the assortment type is a variant attribute that the buyer selects on the product page like a size. In B2B, the quantity of a pack is the number of packs, and the order reaches the ERP with the pack SKU. B2B doesn't check the size breakdown of a pack.

To set up assortment packs, follow Tutorials > B2B > How to Sell Assortment Packs in B2B.

Example: From Quotation to Orders

The following quotation contains products for two divisions:

Product
Division
Quantity

SKU01

Division A

30

SKU01

Division B

20

SKU02

Division A

10

When it is approved, B2B creates two orders, one for each division:

Order
Product
Quantity

Order of Division A

SKU01

30

Order of Division A

SKU02

10

Order of Division B

SKU01

20

Quotation Statuses

Status
Meaning

request_approval

Created by a sub-division user and waiting for the approval of the main division.

pending

Waiting for headquarters. Quotations of main divisions start here.

draft

Being edited by headquarters.

sending_approval_request

Edited by headquarters and waiting for the approval of its owner.

approved

Approved by headquarters, or by its owner after headquarters edited it. B2B creates the orders. Omnitron shows this status as Confirmed.

rejected

Rejected by headquarters, by the main division, or by its owner after headquarters edited it.

cancelled

Cancelled by its owner.

expired

Expired. B2B doesn't set this status automatically.

Whether sub-division quotations need the approval of the main division depends on the IS_SUB_DIVISION_QUOTATION_APPROVAL_REQUIRED setting.

Order Statuses

After approval, B2B creates the orders of a quotation in Commerce one at a time.

Status
Meaning

pending

Waiting to be created.

created

Created in Commerce. The order number is shown on the order.

failed

Couldn't be created. The failure reason is shown on the order. B2B retries failed orders automatically, and staff can retry right away with Recreate Order on the quotation.

Last updated

Was this helpful?