--- alias: user-guide-manage-product-rules description: "Manage product characteristics rules through a wizard, defining contexts and conditions for automated processes" --- # Manage Rules :lock: Product.**Edit** ## Overview This operation is used to manage the Rules of the Characteristics of the Product. ## Setup No specific setup is required other than to meet the precondition of the transaction. ## Preconditions * Product exists in the system and it is Created. ## Sequence of Steps The Manage Rules wizard can be called from the **Product** page by selecting the **Characteristics and Rules** sub-section in the Details View panel, and then selecting the **Rules** tab. ### Step 1: Context 1. Specify as many contexts as you need by using :material-plus:. You can also delete or order information, and use the Search to find a specific **Step**. 2. Specify the Context Details: * Step * Logical Flow Path (optional) * Context (BOM, Checklist, Data Collection, Document, Durables, Recipe, Recipe Parameter, Service, and Inspection Plan) !!! info Note that: * For the same Step, there cannot be two Rules where one Rule defines a Logical Flow Path and another does not. Hence, for the same Step, either all Rules define a Logical Flow Path or all Rules do not define one. * The Step and Logical Flow Path Order is defined by you and you can choose to change the Step Order, which will affect all Rules of that Step and Logical Flow Path combination. 3. Select **Next** to continue. ![Screenshot showing a management interface with rule settings.](images/manage_rules_01.png) ### Step 2: Rules !!! info Rules for the **Document** context on different Steps are evaluated independently. A Document accepted by a rule on one Step does not cause a rule for the same Document on another Step to be ignored. 1. Specify as many **Rules** as you need by using :material-plus:. You can also delete or order information, and use the Search to find a specific **Step** or **Context**. 2. Specify the Rules Details by providing the Condition: * Use the **Advanced Condition Expression** toggle to control which JSONata functions are available in the Condition editor: * **Off** (default) - the editor is labeled **Simple Expression**, and the Condition supports a subset of the JSONata query syntax. If needed use the :octicons-info-16: icon to view supported expression format as follows: * Equal to/Not equal to comparison operators (`=`/`!=`). * Less than/Less than or equal to comparison operators (`<`/`<=`). * Greater than/Greater than or equal to comparison operators (`>`/`>=`). * And/Or boolean operators (`and`/`or`). * Boolean values for ensuring a expression are always true or false (`true`/`false`). * Quotation marks to define Product Characteristic values. For example, `"Dark Blue"` or `'Soft Blue'`. * Reference to Product Characteristic without whitespaces. For example, `Color = 'Blue'`. * Reference to Product Characteristic with whitespaces or special characters. For example, ```` `nbsp`Wheel color` = 'Blue'``. * Parentheses for precedence in compound expressions. For example, `Color = "Blue" and (Size = "Small" or Size = "Medium")`. !!! Warning Take in consideration that: * Operators `=`, `!=`, `<`, `<=`, `>`, and `>=` can compare strings and numbers. Ensure that you do not mix numbers and strings in the same expression. * When comparing strings, do not use inverted commas. * When comparing numbers, ensure that the source Lookup Table only has numeric values. * **On** - the Condition editor supports the same syntax as above, plus the following additional JSONata functions: * `$contains()` - checks whether a Product Characteristic value contains a given substring. For example, `$contains(Color, "Blue")`. * `$substring()` - extracts a substring from a Product Characteristic value, given a start position and, optionally, a length. For example, `$substring(Color, 0, 4)`. * `$substringBefore()` - extracts the substring that appears before the first occurrence of a given substring; equivalent to a "starts with" check when combined with `=`. For example, `$substringBefore(Color, "-") = "Dark"`. * `$substringAfter()` - extracts the substring that appears after the first occurrence of a given substring. For example, `$substringAfter(Color, "-") = "Blue"`. !!! note The system validates only characteristic values defined in Lookup Tables, and autocomplete suggestions during condition editing are available only for characteristics linked to those Lookup Tables. 3. Specify other mandatory information depending on the selected contexts. ![Screenshot showing a management interface for setting up rules.](images/manage_rules_02.png) 4. Select **Update** to complete the operation.