A bulk order is a temporary list of items and quantities that is maintained outside of the shopping cart. Bulk orders are useful for shoppers who want to create a list of items without committing them to the cart and for shoppers who maintain an offline list of items that they repurchase regularly.
For example, a B2B shopper maintains an Excel sheet of frequently ordered part numbers and quantities. The shopper exports the list in the required format and copies the formatted list into a bulk order form. The shopper can edit the quantities or add another part to the order. When the bulk order list is complete, the shopper adds all the items in the list to the cart.
As a shopper adds items to a list, the items are stored as an array in the
You can find an example of a bulk order UI component in the B2B React PWA (Progressive Web Application) Storefront. This version of a bulk order component has a Quick Order tab and a Bulk Order tab. Both tabs use the same Cortex APIs.
Quick Order tab
In the Quick Order tab, shoppers can add up to ten items to the list. A shopper can copy and paste an item number from the catalog, use the drop-down list, or scan a bar code.
Bulk Order tab
In the Bulk Order tab, shoppers can paste an unlimited, formatted list of items from another source. The format is one
itemSKU,quantity pair per line.
Use the following API resources to retrieve the array of items from the
additemstocartform form and then add the items to a cart:
- Read Add Items to Cart Form - Retrieve the array of items from the form
- Add Items To Cart - Add the array of items to a cart
The API resources do not replace the Batch Add to Cart accelerator. The API resources support only item name and quantity. With the accelerator, shoppers can define other properties when adding items.