Rules
Rules define the maximum set of characteristics to link to each «neutral» configurable item. They contain all the «instructions» that the system needs to take into consideration during configuration.
For each rule it’s possible to define:
- The list and sequence of characteristics that should be prompted to the operator;
- The list of values that the characteristic can have for that rule;
- A codification algorithm for the item code and description;
- The business logic among the characteristics as defined by the «Relations» table:
- Mandatory or optional characteristics;
- Automatic filling of secondary characteristics depending from an input characteristic;
- The compatibility of values for a characteristic according to other chosen values.
These are the main fields present in the rules:
Field | Description |
---|---|
Code | Rule code. |
Description | Rule description. |
Status | The allowed values are: Open and Released. A rule in Open status: It is editable. The items that use it are not configurable. The configurator returns the error: Status must be equal to Released in Rules: Code=XXXX. Current value is Open. A rule in Released status: The rule and the linked tables are not editable: characteristics, relations, etc. The items that use it are configurable. |
Master | Indicates that the characteristics and their values of a rule can be used by other linked rules. The connection is made through the connection field in the rule characteristics. |
Enabled Format Code | It is used to enable the formatting of item/variant codes created by the configurator using a formula defined in the Format Code field. If not enabled, the items/variants are created with the No. series in the Configurator Setup. |
Format Code | Defines the formula by which the item/variant code generated by the configurator is calculated. You can enter free characters or use characteristic values. Characteristic code in curly brackets {} to use the value description. Characteristic code in square brackets [] to use the value. You can also use [ITEMNO%] to enter the neutral item code. |
Code Counter | It is used in case you want to add a counter to the end of the code. |
Digit Counter | Identifies the number of digits to be used for the Code Counter. |
Use Item Description | Enables using the neutral item description (it’s added before the description constructed according to the format description). |
Format Description | Defines the formula used to calculate the description of the item/variant generated by the configurator. You can enter free characters or use characteristic values. Characteristic code in curly brackets {} to use the value description. Characteristic code in square brackets [] to use the value. You can also use [ITEMNO%] to enter the neutral item code. |
Format Description 2 | Defines the formula used to calculate the description 2 of the item/variant generated by the configurator. You can enter free characters or use characteristic values. Characteristic code in curly brackets {} to use the value description. Characteristic code in square brackets [] to use the value. You can also use [ITEMNO%] to enter the neutral item code. |
Use Excel | The configurator provides the possibility of associating the rule with an Excel sheet for the management of relations. By using this field, you can decide when the formulas expected in the Excel sheet are executed. The allowed values are: Blank which corresponds to never, During process, Configurator closing. |
Has Content Excel | Active if a relationship spreadsheet has been associated with the rule. |
Trigger Custom Code | Triggers custom code during the validation of the characteristic values. The custom code can be executed during the process or after the configurator closes. Please contact your partner for information on how to extend the configurator logic. |
Use Neutral Routing | The configurator for all items with this rule does not generate a configured routing but uses the same routing as the neutral item. |
Configuration Type | Specifies how the Configurator works (Items or Variants). The Default Type uses the configuration on Setup. |
Rule Characteristics
In Rule Characteristic it’s possible to specify the list of characteristics associated with the rule, the sequence in which they should be shown to the operator, whether they are mandatory or non editable during the configuration, the calculation logic in Excel, the maximum and minimum values for characteristics of type «measure», and the styling format.
These are the main fields present in the rule characteristics:
Campo | Descrizione |
---|---|
Characteristic Code | Characteristic Code. |
Characteristic Description | Characteristic Description. |
Sequence | Defines the sequence in which the characteristics are requested to the user. The sequence is used to create the configurator’s search keys, therefore the change of sequence involves the reconfiguration of any previously generated items. |
Mandatory | Defines whether the characteristic is Mandatory or Optional for the rule. |
Connection | Indicate the master rule to which this characteristic is linked. Use the “Align Connection” action to update the values. |
Disable Characteristic by Key | Excludes the characteristic from the composition of the search keys of the configured items. It is recommended to use only for dummy characteristics used for calculations. |
Price | Used to define which characteristics are used in the price matrix for the items associated with the rule. |
Not Editable | Makes the characteristic uneditable. For use in characteristics calculated by relations or with a default value. |
Hide Characteristic | Allows the characteristic to be hidden from the user during configuration. For use in characteristics calculated by relations or with a default value. |
Price List Surcharge | It allows to define whether the characteristic is used in the calculation of price list surcharges. |
Exclude From Relations Calc. | Excludes the characteristic from the calculation of relations. To be enabled for all characteristics that are not used in rule relations. Very important for performance. In the rule, there is a certificate action that allows you to set it automatically. |
Exclude From Relations Calc. With Conditions | Excludes the characteristic from the calculation of conditional relations. To be enabled for all characteristics that are not used in rule condition relations. Very important for performance. In the rule, there is a certificate action that allows you to set it automatically. |
From Value | Used only for measure-type characteristics, allows to set a lower limit. |
To Value | Used only for measure-type characteristics allows to set an upper limit. |
Style | Allows you to set a style, color and style, to the characteristic when prompted to the user. |
Process In Excel | If activated during the validation of the value of the characteristic, it recalculates any excel formulas associated with the rule. |
Get Output From Excel | If activated during the validation phase of the characteristic value, it recalculates any excel formulas associated with the rule and assigns the value to the characteristic. |
Trigger Custom Code | If activated during the validation of the characteristic value, it executes any custom code associated with the rule. Contact your partner for information on how to extend the configurator. |
Get Output From Custom Code | If activated during the validation of the characteristic value, it executes any custom code associated with the rule and assigns the value to the characteristic. Contact your partner for information on how to extend the configurator. |
Indentation | Allows to set an indentation to the characteristic when prompted to the user. |
Exclude from Calc. Surcharge | Excludes the characteristic from the calculation of surcharges. Very important for performance. |
Exclude from Calc. Optional | Allows to exclude the characteristic from the calculation of the optional. In scenarios with a high number of characteristics, the activation of this flag where the calculation of the optional is not necessary could contribute to an improvement of the performance. |
Rule Relations
Relations are used to define the business logic among the characteristics of a rule.
The types of relation are:
Mandatory/Optional: a characteristic can be mandatory or optional according to the value of another characteristic; the value of the primary characteristic makes the secondary characteristic mandatory or optional. I can make a characteristic mandatory or optional according to n conditions, using the field Condition Code.
TIPS To hide a characteristic when it is not mandatory, it is necessary to define two separate lines Mandatory/Optional with Hide Characteristic.
Transfer Value: the value of the primary characteristic determines the automatic compilation of the secondary characteristic with the value compiled in the Secondary Characteristic Value field. It is possible to transfer a value according to a characteristic, using the field Transfer Value Formula.
TIPS If the fields Primary characteristic value and Secondary characteristic value are both empty, a value written in the first characteristic will be copied to the second characteristic.
Characteristic Set Value Transfer It is possible to transfer N values to N separate characteristics depending from the value of the primary characteristic: the flag enable characteristic sets needs to be active and the set needs to be created.
Filter: limits the possible values for the secondary characteristics.
It’s possible to combine several characteristics to define the values of the secondary characteristic using a condition: in the first example the filter type relations uses the LAMP condition code. Otherwise the filter can be linear (a primary characteristics conditions the values of the secondary characteristic): in the second example if the MATERIAL characteristic has the value ALUMINUM the characteristic called CERT must take on values other than UK.
Check Condition: It’s possible to verify the relation between characteristics and handle a message or an error. The message goes into the «Message» field, while the condition goes into the «Condition code» field.
It’s possible to combine the condition code with the Transfer Value relation and transfer the exact value of a characteristic by inserting between square brackets the value of the characteristic in the value transfer formula.
It is important to note that this type of relations are only applied at the first level of the configuration. The product contains production BOM levels that contain configurable items, only the top-level relations will be applied.
The order in which the relations are executed is as follows:
- Transfer value relations without conditions.
- Filter relations without conditions.
- Filter relations with conditions.
- Transfer value relations with conditions.
- Check Condition relations.
Within each relation type, they are executed in order of: Sequence, Rule code, Primary characteristic code, Primary characteristic value, Condition code, Secondary Characteristic code, Secondary Characteristic value.
Excel
Integration with Excel is used to calculate characteristic values through an Excel file that is uploaded and used as a template.
It is very important to evaluate performance according to the complexity of the spreadsheet.
Using Excel works only on the first level of configuration. Excel files associated with the layer rules underlying the first layer are not used.
You cannot use Excel sheets that contain macros.
Excel integration use Microsoft Excel Online and Microsoft Sharepoint Online; this is available for both On Premise and SaaS Business Central environments.
To manage the values of some characteristics through Excel it is necessary to define within the characteristics associated with the rule:
- The characteristics involved in Excel Calculation (Process in Excel)
- The characteristics for which the value will be read by Excel formulas (Get output from Excel)
To manage the values of some characteristics through Excel it is necessary to define within the characteristics associated with the rule:
- The characteristics involved in Excel Calculation (Process in Excel)
- The characteristics for which the value will be read by Excel formulas (Get output from Excel)
The rule must also specify when the Excel file is used, which can be:
- During process: The calculation of the output characteristics is triggered by the validation of each input characteristic. It’s a more performance-impacting mode for setup time;
- Configurator closing: The calculation of the output characteristics is triggered when the configuration is confirmed.
Conditions
Conditions are also used for:
- Rule relations to check conditions and manage filters
- BOMs to enable or disable BOM components
- Routings to enable or disable routing lines
- Business logic
- Formulas
Conditions can be in AND / OR: the choice determines how to combine the filters together within the single condition.
In the condition lines we have to enter the conditions to combine, by specifying whether the check should be performed that the condition is the same or that it is different.
In the filter text, I can insert condition value filters according to Business Central rules. It is also possible to insert characteristics with [] when a comparison is made on the value of a feature.
Formulas
Formulas can be used in both rule relations as well as BOMs and routings. It’s possible to use mathematical operators and brackets keeping in mind that square brackets indicate the values that characteristics assume during configuration. Supported mathematical operators are: +-*/ ^ e and the constant PI.
For example, formulas can be inserted directly into relations in the Transfer Value Formula field:
In the event that a formula is recurring, or in any case used in several places, it can be created and then recalled (eg in production BOM).
In the TAG section you can enter the characteristics to be used in the formula. The formula must be expressed using the values assigned in the TAGs. By using the conditions enabler, you can insert different formulas based on conditions.
Rule Status
The allowed values for the field Status are: Open and Released.
A rule in Open status:
- It is editable.
- The items that use it are not configurable. The configurator returns the error: Status must be equal to Released in Rules: Code=XXXX. Current value is Open.
A rule in Released status:
- The rule and the linked tables are not editable: characteristics, relations, etc.
- The items that use it are configurable.
The change of status must be done through the appropriate functions in Actions: Reopen Selected Rules and Release Selected Rules:
When a rule is Released:
- The product configurator performs the Certify operation. The certify operation automatically sets the field values Exclude From Relations Calc. and Exclude From Relations Calc. With Conditions in the characteristics of the rule. Set the field Conditions Characteristics Filter in the rule relations. Plus any custom actions. An event has been set up to avoid automatic certification: OnBeforeCertifyOnReleaseRule.
- The product configurator performs the Save Default Configuration if provided by the setup. An event has been arranged to avoid the Save Default Configuration: OnBeforeSetDefaultConfigurationOnReleaseRule.
- The operation Add Rules present in the values of the characteristics can also be executed when the rule is released.
- The operations Align Connection, Align Rule/Characteristics, Certify, Excel can also be performed when the rule is released.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.