# Measurement units

In fulfillmenttools, each article (identified by one `tenantArticleId` in a facility) is tracked in a unit. A unit commonly represents a physical unit like "g" or "kg" or for countable goods something like "pieces" or "pcs". Since each product is kept in just one measurement unit, operations like adding or moving stock do not need to validate or convert units between stocks.

Units can be defined in the `measurementUnitKey` in the [listing](https://docs.fulfillmenttools.com/documentation/by-pillar/global-inventory-hub/listing). The defined key will be displayed in the clients, for example, during picking if no [measurement unit](https://docs.fulfillmenttools.com/documentation/by-pillar/global-inventory-hub/measurement-units) is defined for the key. It is not required to define units for articles. When no unit is set in the [listing](https://docs.fulfillmenttools.com/documentation/by-pillar/global-inventory-hub/listing), no validation takes place and our clients will default to a localized version of "pieces".

{% hint style="info" %}
[Measurement units REST API documentation](https://fulfillmenttools.github.io/fulfillmenttools-api-reference-ui/#get-/api/measurementunits)
{% endhint %}

## Unit validation in inbound processes

When using the [inbound process](https://docs.fulfillmenttools.com/documentation/by-pillar/global-inventory-hub/inbound-process) it is recommended to define units for each product in the respective listing of this product's facility.

Since no conversion between units occurs automatically, it is essential to specify the correct unit when new goods are accepted into the system. This eliminates a common source of critical errors in stock levels.

When a `measurementUnitKey` is set on the corresponding [listing](https://docs.fulfillmenttools.com/documentation/by-pillar/global-inventory-hub/listing) each new line item in the requested items of the purchase order and the received items of the receipt is validated against it: All quantities must match the unit of the listing.

{% hint style="info" %}
Attention: When creating an InboundProcess with a PurchaseOrder with unit "xyz" and changing the `listing.measurementUnitKey` to something else ("qwe") the `inboundProcess.purchaseOrder` must now be patched/replaced to reflect the correct unit again before a receipt can be created in the inventory app. This is intentional and ensures the consistency of new stock levels in the facility. In general it is not advised to change the unit of a product in a facility without careful consideration, but in some cases it might be desired to start with no unit on the `listing` (= no validation) and transition to stricter rules later.
{% endhint %}
