# Inventory traits

Traits provide information on how [storage locations](https://docs.fulfillmenttools.com/documentation/by-pillar/global-inventory-hub/storage-locations-and-zones) and [stock](https://docs.fulfillmenttools.com/documentation/by-pillar/global-inventory-hub/stock) are to be handled in operational and order processes. Traits can be set both on storage locations and stocks. If set on storage locations, they affect the handling of both storage locations and the [stock](https://docs.fulfillmenttools.com/documentation/by-pillar/global-inventory-hub/stock) located on them. Each stock placed on a location (by assigning it a `locationRef`) will inherit the traits of its storage location if nothing is specified in the stock's traitConfig.

Traits can, for example, be used to mark a location and its stock as pickable or to [lock locations](#locking-storage-locations-or-stocks) along with their stock. When only using stocks (and no locations) traits can be used to mark stock as pickable or lock it.

## Available traits

By default, each storage location has the traits `PICKABLE` and `ACCESSIBLE`, unless otherwise specified.

<table><thead><tr><th>Trait</th><th width="103" data-type="checkbox">Default</th><th>Description</th><th data-hidden>Function</th></tr></thead><tbody><tr><td><code>PICKABLE</code></td><td>true</td><td>Stock on these locations can be picked for fulfilling orders.<br>Only stock marked as <code>PICKABLE</code> can be considered for incoming orders.</td><td><p>Stock on these locations is used to fulfill orders.<br>For example, stock may be offered in an online shop (after adjusting the quantity for other factors like reservations, channel-, and safety-stock).</p><p>To represent this stock class, you need both traits. This allows you to temporarily block access to the location by removing the <code>ACCESSIBLE</code> trait while keeping it assigned to the picking storage area.</p></td></tr><tr><td><code>ACCESSIBLE</code></td><td>true</td><td>The <code>ACCESSIBLE</code> trait indicates that stock can be removed from and new stock can be put on this location. Removing the <code>ACCESSIBLE</code> trait from a location locks it for picking and triggers a notification during stowing processes. Only stock marked as <code>ACCESSIBLE</code> can be considered for incoming orders.</td><td>The <code>ACCESSIBLE</code> trait indicates that stock can be removed from and new stock can be put on this location. Removing the <code>ACCESSIBLE</code> trait from a location locks the location for all operational processes.</td></tr><tr><td><code>KEEP_ON_ZERO</code></td><td>false</td><td>Normally, stocks are deleted when they reach <code>0</code> through operations like picking or stock movements. To change this behavior, add the <code>KEEP_ON_ZERO</code> trait to the location. See <a href="../stock#stocks-with-amount-0">stock entities with amount 0</a>.</td><td>By</td></tr><tr><td><code>OUTBOUND</code></td><td>false</td><td>The <code>OUTBOUND</code> trait marks storage locations for items that have already been picked and are ready to be handed over to a shipping provider. When configured in the <a href="../configurations#outbound-stock-configuration">outbound inventory tracking</a>, stocks and reservations are automatically booked to the defined outbound location after picking has been completed.</td><td></td></tr><tr><td><code>IN_MOTION</code></td><td>false</td><td>The <code>IN_MOTION</code> trait marks stock that is currently being moved as part of a stow job. This stock should be filtered out during a stock update via the <a href="https://fulfillmenttools.github.io/fulfillmenttools-api-reference-ui/#put-/api/stocks">stocks REST API endpoints</a>.</td><td></td></tr></tbody></table>

## Interacting with traits

Each trait has a default value. When nothing else is specified, the enabled traits are processed on both the storage location itself and the stocks on it. The default value (whether it is enabled or not) can be overwritten **individually** for each trait by setting it in the `traitsConfig` field on the storage location or on the stock. Traits set on stocks overwrite the traits set on storage locations. All unspecified traits keep their defaults. This means that if a trait is enabled via the trait config, `PICKABLE` and `ACCESSIBLE` are set by default unless explicitly set to false.

{% hint style="warning" %}
The `traitConfig` should be used to write to traits. Don't use the trait array for that purpose.
{% endhint %}

The `traitConfig` can specify each trait as enabled, disabled or unset. The final trait config is determined in a cascading manner:

<table><thead><tr><th width="185">Trait</th><th width="125">Default</th><th width="167">Storage location</th><th>Stock</th><th>Final config</th></tr></thead><tbody><tr><td><code>ACCESSIBLE</code></td><td>true</td><td>false</td><td>true</td><td><strong>true</strong></td></tr><tr><td><code>PICKABLE</code></td><td>true</td><td>true</td><td>false</td><td><strong>false</strong></td></tr><tr><td><code>KEEP_ON_ZERO</code></td><td></td><td>true</td><td></td><td><strong>true</strong></td></tr></tbody></table>

### Locking storage locations or stocks

To lock a storage location including the items placed on it, the `ACCESSIBLE` trait must be removed. As a consequence, the items on the location are not considered for incoming orders (i.e. picking). It is still possible to remove items from the location or put new items on it. Additionally, users are notified about the locked status when moving items from the location via [App](https://docs.fulfillmenttools.com/documentation/apps/inventory-app) or [Backoffice](https://docs.fulfillmenttools.com/documentation/backoffice/facility-view/inventory/storage-locations). Similarly, stocks can be locked by removing the `ACCESSIBLE` trait from them.

To unlock the storage location, the `ACCESSIBLE` trait must be set (again).

### Traits in order routing and fulfillment

Storage locations and stock with the traits `PICKABLE` and `ACCESSIBLE` or with no traits are considered for fences and ratings during [order routing](https://docs.fulfillmenttools.com/documentation/by-pillar/advanced-order-routing) and calculating [stock availability](https://docs.fulfillmenttools.com/documentation/by-pillar/global-inventory-hub/stock/stock-availability).

The following storage locations and stocks are ignored in order routing and fulfillment:

* With an empty array of traits
* With only the trait `PICKABLE`
* With only the trait `ACCESSIBLE`
