# Inventory models

<figure><img src="/files/3Z1G0vUz3Iotj6cFphsw" alt=""><figcaption></figcaption></figure>

{% hint style="info" icon="lightbulb" %}
An inventory model groups stock locations in a priority order that determines SKU availability. The chosen strategy controls how many shipments are generated and from which locations they are fulfilled.
{% endhint %}

## What is an inventory model?

An [inventory model](/core-api-reference/inventory_models.md) comprises several stock locations ordered by priority. The priority order determines how SKU availability gets calculated within a market.

Two types of stock locations make up an inventory model:

* **Inventory stock locations** — build a hierarchy of stock locations used for fulfillment. They can be a physical warehouse, a retail store, or a virtual location. When an SKU is available in multiple locations, it is shipped from the one with the highest priority.
* **Return stock locations** — build a hierarchy of stock locations used for returns. When an SKU is available in multiple locations, it is returned to the one with the highest priority.

When a customer purchases an item, the available inventory stock locations are checked against the required SKU and quantity to determine availability. You can also retrieve availability information for each SKU in every market, including shipping costs and delivery lead times for each delivery option.

## Inventory strategies

The [inventory model strategy](/how-tos/inventory/strategies.md) controls how many shipments are generated and from which stock location each shipment will be fulfilled:

* **No split** — only the primary stock location is checked and one shipment is created to fulfill all line items (default strategy).
* **Split shipments** — the order is split into as many shipments as needed based on availability across stock locations.
* **Split by line items** — at least one separate shipment is created per line item.
* **Ship from primary** — all items ship from the primary stock location. If it cannot fulfill all of them, the necessary stock transfers from secondary locations to the primary are performed.
* **Ship from first available (or primary)** — items ship from the first stock location that can fulfill them all. If no such location exists, stock transfers from secondary locations to the primary are performed as a fallback. This strategy minimizes both the number of shipments and stock transfers.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.commercelayer.io/data-model/inventory-management/inventory-models.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
