Calculate pre-purchase shipment assignments using infinite capacity windows

The Calculate shipment assignments API provides the ship date, delivery dates, and shipment breakup information for a cart or checkout that consists of one or more multi-quantity order lines. The API supports both the ship and the pick delivery methods.

The checkout page is a page in an online shopping experience that is displayed when the shopper commits to the request order in the cart page.

A cart holds items that the user intends to order, which is displayed on a cart page. The cart page is the summary page in an online shopping experience that displays all the items and item quantities that the shopper selected from product detail pages. Each order line contains a unique SKU identifier with multiple quantities.

The Calculate shipment assignments API calculates the best solution that is based on the item and the capacity availability across all SKUs for the order. If the full order line quantity cannot be fulfilled from one ship node, this API breaks up shipment lines to fulfill from multiple ship nodes. This action ensures that the full order line quantity is fulfilled. During the shipment breakup process, multiple delivery estimates are given for each order line. A first and last delivery estimate is also provided for the cart.

In addition to the delivery dates, the shipment date is also provided on each shipment so that the shopper is aware when a particular SKU is shipped from an assigned ship node. For more information, see the Calculate shipment assignments API.

Important: You must pass one shipping group as an input to the Calculate shipment assignments API.

The estimated delivery dates are calculated both by order line and by shipment. This API returns the first delivery date, which is the earliest delivery date for the entire cart, and the last delivery date, which is the last delivery date for the entire cart.

Important: The Calculate shipment assignments API expects that each SKU request line is unique and is not repeated within a multiple line order.

Transit duration between zones

The transit duration is the amount of time a carrier service, for example, Shipping Company Ground, takes to deliver the package from the source address to the destination address after pickup. Configure this parameter to calculate the estimated delivery date and shipment assignments during a pre-purchase request cart by using parameters, such as your tenant information, item identifiers, destination information. The application considers details like inventory distribution, available capacities, and carrier service pickups, before making an intelligent promise date. For more information, see the Calculate pre-purchase shipment assignments API.

Checkout view options

The Calculate shipment assignments API can provide two alternative views on an e-commerce checkout page. The data set is returned both by order lines and by shipment lines. 
Order line format
In the order line format, each order line includes one or more shipment assignments that are sourced from a ship node, with the associated fulfillment quantity. The total of the fulfillment quantities for each order line comprises the total requested quantity. 
Shipment line format
In the shipment line format, the shopper can understand which SKU or SKUs are included in each shipment. A shipment might consist of more than one SKU, each with various fulfillment quantities.

Handling shortage quantities

The Calculate shipment assignments API also accounts for possible inventory and capacity shortages. In this case, Sterling Intelligent Promising attempts to locate a ship node that can provide partial quantities and reports any shortage amount. The shortage amount is the difference between the requested SKU quantity and the SKU quantity that cannot be fulfilled by the seller.

Cart use cases

In addition to supporting multiple order lines, calculate shipment assignments can be modeled to handle a single order line request in a cart use case. In a standard cart use case, the seller might want to list a separate delivery date estimate for each order line. This action can be perform by using the Calculate shipment assignments API with a single order line request.

Calculate shipment assignments example

Consider a typical shopper checkout workflow on an e-commerce site. The shopper adds two items to the cart, each with a different request quantity. In the example, it is assumed that availability exists for both inventory and capacity for each requested SKU.

Assume that a shopper wants to purchase the following items in the specified quantities, and adds the items to their online cart.
Table 1. Shopper cart request
Order line number Item Quantity
001 sku01 5
002 sku02 2
The Calculate shipment assignments API yields the following results.
Table 2. Order line and shipment assignments
Order line number Shipment number Ship node Delivery date Item Assigned quantity
001 1 node01 1 July sku01 2
001 2 node02 10 July sku01 3
002 1 node01 1 July sku02 1
002 3 node03 5 July sku02 1

Result summary

None of the ship nodes have sufficient quantity, which leads to a shipment breakup that consists of three shipment assignments.
  • Node01 can fulfill sku01 and sku02 in one shipment. However, it does not have all of the requested inventory, so the remaining inventory must be sourced from alternative ship nodes.

    Node02 can fulfill the remaining quantity for sku01 but does not have availability for sku02, so a second shipment is formed.

    Node03 can fulfill sku02 and it does not have inventory for sku01, so a third shipment is formed to fulfill the remaining sku02 requested quantity.

As a result, the first delivery date is 1 July and the last delivery date is 10 July. The shopper is going to receive three separate deliveries that together fulfill the requested order lines. No shortages were encountered in this scenario.

The seller can use the Calculate shipment assignments API alternative shipment view to display the result by shipment view.
Table 3. Shipment view
Shipment number Order line number Ship node Delivery date Item Assigned quantity
1 001 node01 1 July sku01 2
1 002 node01 1 July sku02 1
2 001 node02 10 July sku01 3
3 002 node03 5 July sku02 1