Covering Rule
CoveringRule
Returns quantity of required covering products
Notification level: Not applicable
Key | Value |
---|---|
ID | CoveringRule |
Translation key | Not applicable |
Behavior
This apply rule calculates the quantities of decorations e.g. paint, wallpapaer and tiles etc., applied on the walls/floors depending on the coverage and tolerencePercentage of the parameters that are present in the product info or in the overloads.
Example to calculate quantity of product, including tolerance:
quantity = (total area of applied covering/ coverage per pack) * (1 + tolerancePercentage/100)
For a tile product applied on a floor, that has coverage of 1.48m² per pack and tolerancePercentage 15% defined in the overloads -
Total floor area = 10m²
Product coverage per pack = 1.48m²
quantity (Packs needed) = 6.76 (total floor area 10m² / product coverage per pack 1.48m²), rounded up to 7 packs
With a tolerance applied of 15% to the calculation (packs needed 6.76 * tolerance applied 15%) = 7.74 packs, rounded up to 8 packs
Total cost = 189,44€ (rounded up amount of pack needed 8 * pack price 23,68€)
Trigger Conditions
This rule is triggered on BOM computation.
Overload Parameter
The overload is formatted as a JSON object, in which each property is a rule that defines the mapping between the parameters.
For each element in the JSON object, it contains the name of the rule and the name of parameters; these parameters are made of an array of the possible values.
Overload contains mapping of product external IDs to tolerancePercentage.
Key name | Type | Default value | Description |
---|---|---|---|
closedTags | array of closed tags | – | Mandatory. defines the list of closed tag IDs of products for which the tolerancePercentage is defined. |
tolerancePercentage | integer | – | Mandatory. defines the additional amount of product required. |
For example:
[
{
"closedTags": [
355,
361
],
"tolerancePercentage": 25
},
{
"closedTags": [
356,
357
],
"tolerancePercentage": 10
}
]