Units of Measure (UOM)
Liferay DXP 2023.Q4+/Portal 7.4 GA98+
Businesses can have different ways of maintaining and selling their stock. This is commonly known as Units of Measure (UOM). Some of the commonly used units of measure are
- meter/centimeter/millimeter
- ton/kilogram/gram
- pallet/case/unit
Units of Measure (UOM) was released behind a release feature flag in Liferay DXP 2023.Q4/Portal 7.4 GA98. It was made Generally Available (GA) in 2024.Q1/GA112.
You can define your own units of measure to manage, price, and sell your inventory by these defined units. You can also use UOM to sell stock in decimal quantities.
Units of measure link to SKUs. After creating the first unit of measure, all existing inventory and pricing information for the SKU gets mapped to the new unit.
The first unit of measure you create adopts the pricing and inventory information related to the SKU. If you are introducing units of measure to previously traded SKUs, you must define the unit corresponding to the existing SKU first, and then create any additional UOMs.
-
Open the Global Menu () and navigate to Commerce → Products.
-
Select the product for the new unit of measure.
-
Go to the SKUs tab and select the SKU.
-
Select the Units of Measure (UOM) tab and click Add ().
-
Enter the given information to create a new unit called Meter:
Unit of Measure: Meter
Key: meter
Decimal Allowed (Precision): 1
Base Unit Quantity: 0.5
Base Price: $3.99
Base Promotion Price: 0.00
Priority: 1
Purchasable: Enabled
Field Description Unit of Measure Name of the unit of measure Key Unique key used to identify the unit of measure Decimal Allowed (Precision) Specifies the decimal increments by which you can purchase the SKU. Default value of 0 specifies decimal quantities are not allowed. Base Unit Quantity Specifies the increments by which you can purchase the SKU. Default value is 1. Base Price Base price of the unit Base Promotion Price Base promotion price of the unit Priority Determines the default unit selected on the product details page. The highest priority eligible purchasable unit of measure appears by default. Purchasable Toggle whether the unit is purchasable. NoteIf you set the base unit quantity to a decimal value like 1.2, you must set the Decimal Allowed (Precision) field to 1. The number of decimal points in the Base Unit Quantity field must reflect in the Decimal Allowed (Precision) field for the unit to work correctly.
-
Click Add.
This creates a new unit of measure called meter and maps all the existing inventory and pricing information to this new unit.
Unit of Measure Display Price
After creating a unit of measure, you can set its display price. The display price specifies a multiple of the base unit quantity that appears on the product details page. It doesn’t change the price of the base unit in the price list.
For instance, if you’re selling rope with the unit of measure as meter and the base unit as 0.5m, you may want customers to see the price per meter rather than per 0.5m. To achieve this,
-
Select the created unit.
-
Enter a value for the Pricing Quantity as 1.
-
Click Save.
Even though the base unit price is $3.99 for 0.5m of rope, the product details page shows the pricing quantity for 1m of rope and its associated price. When you add the product to the cart, only the base unit of 0.5m is added.