Measurement Units

Define what each element of a stock represents.

In the fulfillmenttools platform each product (identified by one tenantArticleId in a facility) is tracked in one unit. The meaning of a unit is completely arbitrary but will commonly represent 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.

Defining measurement unit keys for a listing

Units can be defined in the measurementUnitKey in the Iisting. The key that is defined will be displayed in our clients, e.g., during picking if no measurementUnit is defined for the key. It is not required to define units for products. When no unit is set in the listing, no validation will take place and our clients will default to a localized version of "pieces".

Both a missing "measurementUnitKey" field and "measurementUnitKey: null" are treated as no unit.

If you want to track one product in different units (for example as bulk by weight and also by prepackaged quantity) please create two Listings with different tenantArticleIds: "xyz-123-bulk" and "xyz-123-packaged". Any such setup should reflect the reality of the goods handling in your warehouse / facility.

curl --location --request PUT 'https://<apiHostname>/api/facilities/8f5bd918-ad32-4800-9818-54d3f4209b03/listings' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <authToken>' \
--data '{
    "listings": [
        {
            "tenantArticleId": "flour",
            "price": 0.8,
            "version": 1,
            "title": "Sacks of flour",
            "scannableCodes": [],
            "attributes": [],
            "measurementUnitKey": "stone"
        }
    ]
}
'

Defining translations for measurement units

To localize the long-name and abbreviation of a unit for the client applications you can create MeasurementUnit entities corresponding to the listing.measurementUnitKey. If no MeasurementUnit is defined for a key, the key will be displayed in the apps.

curl --location 'https://<apiHostname>/api/measurementunits' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <authToken>' \
--data '{
    "key": "stone",
    "nameLocalized": { "de_DE": "Stone", "en_US": "Stone" },
    "abbreviationLocalized": { "de_DE": "st", "en_US": "st" },
    "requiresMeasurement": false
}'

Unit validation in inbound processes

If you are using our system for goods receipts, we highly recommend defining units for each product in the respective listing of this product's facility.

Since no conversion between units take place automatically it is important 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 each new line item in inboundProcess.purchaseOrder.requestedItems and inboundProcess.receipts.receivedItems is validated against it: All quantities MUST match the unit of the Listing.

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 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.

Last updated