Inventory models
When a customer requests to purchase a line item, the inventory is checked to determine the product's availability. In this section, you will learn about inventory models and how to build one for each market in an organization.
What is an inventory model?
An inventory (also referred to as stocks) is the goods and raw materials that any business would hold and are ready (or will be prepared) for sale. An inventory model comprises several inventory stock locations ordered by priority. The priority order determines how the availability of SKUs gets calculated within a market.
- Inventory stock locations build a hierarchy of stock locations within an inventory model. They can be a physical warehouse, a retail store, or a virtual location that tracks your inventory in a given market. In cases where an SKU is available in more stock locations, it gets shipped from those with the highest priority during an order.
- Return stock locations build a hierarchy of stock locations within an inventory model. In cases where an SKU is available in more stock locations, it gets returned to those with the highest priority.
When a customer requests to purchase an item, the available inventory stock locations are checked with the required product and total required quantity. This is then used to determine the product's availability.
Different stock locations are checked in the order of priority predefined by the merchant until the customer's order is available. If an order contains line items from two or more stock locations, the order can be split into two or more shipments, one for each stock location. This happens according to the selected inventory model strategy.
You can import inventory from any stock location with tokens and get availability information for each SKU in every market. Using the availability information, you can display shipping costs and delivery lead times for each delivery option available.
Inventory strategies
Commerce Layer supports multiple inventory model strategies that you can choose depending on how you want your order items to be fulfilled. An inventory model strategy is responsible to decide how many shipments are generated and from which stock location each shipment will be shipped:
- No split — only one stock location is checked (e.g. primary) and only one shipment is created to fulfill the order's line items (default strategy).
- Split shipments — the order is split into as many shipments as needed based on their availability within the different stock locations.
- Split by line items — (at least) a separate shipment is created per each line item of the order.
- Ship from primary — all the order items are shipped from the primary stock location (the one at the top of the inventory model's hierarchy). If the primary stock location cannot fulfill all of them, the necessary stock transfers from the secondary locations to the primary are performed.
- Ship from first available (or primary) — the order items are shipped from the stock location that can fulfill them all first. If there's no such stock location, as a fall-back strategy, the necessary stock transfers from the secondary locations to the primary are performed. This strategy minimizes both the number of shipments and stock transfers.