Differences

This shows you the differences between two versions of the page.

adminhelp:productadministration:products:rulesadmin [2019/04/25 08:35]
bdjordje
adminhelp:productadministration:products:rulesadmin [2019/08/28 06:45] (current)
mnikolic
Line 2: Line 2:
 ====== Rules Admin ====== ====== Rules Admin ======
  
-Rules allow creating limitations for the configuration of the product.  This ensures that the user is only able to create an accurate and valid configuration of the product.  Though not quite as user friendly as what Attribute Dependencies offers, the Rules section allows creating complex rules through the use of SAP CPQ tags.  It is not prerequisite to be an expert in SAP CPQ tags, the Code Builder, which can be accessed during the creation of every rule, can help in creating these rules in a user friendly way. \\  +Rules allow creating limitations for the configuration of the product.  This ensures that the user is only able to create an accurate and valid configuration of the product. The Rules section allows creating complex rules through the use of SAP CPQ tags.  It is not prerequisite to be an expert in SAP CPQ tags, the Code Builder, which can be accessed during the creation of every rule, can help in creating these rules in a user-friendly way. \\  
-Each rule is created with a **Condition**, which determines whether or not the action will run, and an **Action**, which tells the system what to do when the condition is true.  Each rule is in essence an **IF **statement.  IF the condition is true, THEN the anything in the action field will run.  There are SAP CPQ tags used especially for rules (and triggers, which are discussed in the [[adminhelp:productadministration:products:triggers|]] section) to create the condition and the action statements. To access the Rules section use the manual method of product definition and select the **Rules **link under the **Current Product** drop down. This brings up the **Rules Administration** screen shown in Figure A. \\ +Each rule is created with a **Condition**, which determines whether or not the action will run, and an **Action**, which tells the system what to do when the condition is true.  Each rule isin essencean **IF **statement.  IF the condition is true, THEN the anything in the action field will run.  There are SAP CPQ tags used especially for rules (and triggers, which are discussed in the [[adminhelp:productadministration:products:triggers|]] section) to create the condition and the action statements. To access the Rules section use the manual method of product definition and select the **Rules **link under the **Current Product** drop down. This brings up the **Rules Administration** screen shown in Figure A. \\ 
  
 {{ productadministration:products:rulesadminsmb2.jpg }} \\  {{ productadministration:products:rulesadminsmb2.jpg }} \\ 
 ;#;//Figure A - Rules List//;#; ;#;//Figure A - Rules List//;#;
 \\  \\ 
-Existing rules can be deleted or editing by selecting the corresponding symbol next to the rule name.  To add a new rule, click **Add New **at the top of the page.  A blank rule definition page will be displayed as show in Figure B. \\ +Existing rules can be deleted or editing by selecting the corresponding symbol next to the rule name.  To add a new rule, click **Add New **at the top of the page.  A blank rule definition page will be displayed as shown in Figure B. \\ 
  
 {{ productadministration:products:rulesadmin.jpg }} \\  {{ productadministration:products:rulesadmin.jpg }} \\ 
Line 16: Line 16:
 The **Description **field can be used for additional explanations or notes.  This can make it easier for any other administrators to understand what you are doing in the rule or how the rule fits in with other rules and the configuration of the product. \\  The **Description **field can be used for additional explanations or notes.  This can make it easier for any other administrators to understand what you are doing in the rule or how the rule fits in with other rules and the configuration of the product. \\ 
 The **Condition **field is used to restrict the rule's execution for certain situations.  Enter any conditioning tag expression into this field. If the evaluation of the string results in true (1), the rule is applied.  If the result is false (0), the rule is disabled. Click the Check button to bring up the Code Builder window for help in creating the condition expression. \\  The **Condition **field is used to restrict the rule's execution for certain situations.  Enter any conditioning tag expression into this field. If the evaluation of the string results in true (1), the rule is applied.  If the result is false (0), the rule is disabled. Click the Check button to bring up the Code Builder window for help in creating the condition expression. \\ 
-The **Action **field is the action that takes place when the rule is executed.  Click the Check button to bring up the Code Builder window for help in creating the condition expression.  **Rank **determines the priority of rule’s execution – lowest rank executes first, highest last.  Since non-integer rank values are not accepted it is recommended to skip numbers (such as 5, 10, 15… or 10, 20, 30…) to allow for future insertion of new rules.  Rule ranking will only make a difference when the rule is affecting. The **Active **check box manually turns the rule on or off.  This is useful for diagnostic or testing purposes. \\ +The **Action **field is the action that takes place when the rule is executed.  Click the Check button to bring up the Code Builder window for help in creating the condition expression.  **Rank **determines the priority of rule’s execution – lowest rank executes first, highest last.  Since non-integer rank values are not accepted it is recommended to skip numbers (such as 5, 10, 15… or 10, 20, 30…) to allow for future insertion of new rules.  Rule ranking will only make a difference when the rule is affecting. The **Active** check box manually turns the rule on or off.  This is useful for diagnostic or testing purposes. \\ 
 **Start Date** and **End Date** limit the rule activity time works with effectivity dates.  An example would be to allow special merchandise during Christmas or any other time of the year the appropriate dates are filled in.  Click the calendar icon next to the fields to bring up a calendar pop-up window to assist in choosing a date.  Leaving both fields empty means the Rule is "on" regardless of the date. \\  **Start Date** and **End Date** limit the rule activity time works with effectivity dates.  An example would be to allow special merchandise during Christmas or any other time of the year the appropriate dates are filled in.  Click the calendar icon next to the fields to bring up a calendar pop-up window to assist in choosing a date.  Leaving both fields empty means the Rule is "on" regardless of the date. \\ 
 The best way to create expressions for rules is by using the Code Builder.  This simplifies the process and helps ensure that the created expression is free of any syntax errors.  When using the Code Builder window for creating Rule expressions, the window will display the two add-on boxes as shown in Figure C. \\  The best way to create expressions for rules is by using the Code Builder.  This simplifies the process and helps ensure that the created expression is free of any syntax errors.  When using the Code Builder window for creating Rule expressions, the window will display the two add-on boxes as shown in Figure C. \\ 
Line 28: Line 28:
 The condition field would contain: \\  The condition field would contain: \\ 
 <***ANYSEL(Color:Blue)***> \\  <***ANYSEL(Color:Blue)***> \\ 
-This will return TRUE when Blue is selected from the attribute Color. Once the Condition field returns a value of TRUE, the system looks at the Action field and runs that expression. In the action field would contain: \\ +This will return TRUE when **Blue** is selected from the attribute Color. Once the Condition field returns a value of TRUE, the system looks at the Action field and runs that expression. The action field should contain: \\ 
 <***SELATV(Level:high)***>; <***SELATV(Color:Red)***> \\  <***SELATV(Level:high)***>; <***SELATV(Color:Red)***> \\ 
 or \\  or \\ 
 <***SELATV(Level:high,Color:Red)***> \\  <***SELATV(Level:high,Color:Red)***> \\ 
-This tells the system to select the attribute value (**SEL**ect**AT**tribute**V**alue) High and Red in the attribute Level and Color.  Both statements in the example are correct.  One statement may work better in a certain situation depending on the rest of the expression. \\ +This orders the system to select the attribute value (**SEL**ect**AT**tribute**V**alue) High and Red in the attribute Level and Color. Both statements in the example are correct.  One statement may work better in a certain situation depending on the rest of the expression. \\ 
 Make sure the Active check box is checked in order for the system to run the Rule. \\  Make sure the Active check box is checked in order for the system to run the Rule. \\ 
  
Line 39: Line 39:
 ===== The Order of Things ===== ===== The Order of Things =====
    
-While modeling a product you may use different administrative methods of performing actions on attributes to achieve desired results.  These may include [[adminhelp:productadministration:products:triggers]], [[adminhelp:productadministration:products:attributedependencies|Attribute Dependencies]], or Rules.  When using all three, you may run into trouble if the actions begin to affect the same attributes.  Knowing the order that these actions are run in the system may help you when modeling your product. \\ +While modeling a product you may use different administrative methods of performing actions on attributes to achieve desired results.  These may include [[adminhelp:productadministration:products:triggers]] or Rules.  When using both, you may run into trouble if the actions begin to affect the same attributes.  Knowing the order that these actions are run in the system may help you when modeling your product. \\ 
-The order the system runs these methods is as follows: \\  +The order the system runs these methods is as follows:  
-{{ Wiki::theorderofthingsb1.png }}   Any time the user makes a selection or a product is loaded, these processes are run in this order. This is important because if you create an attribute dependency that selects the Color Red then have a rule created that selected the Color Blue, then Blue will be the final selection despite the rule ranking of either the Attribute Dependency or the Rule.   +<note> **Triggers** > **Rules** </note> 
 +Any time the user makes a selection or a product is loaded, these processes are run in this order. This is important because if you create a trigger that selects the Color Red then have a rule created that selected the Color Blue, then Blue will be the final selection despite the rule ranking of either the Trigger or the Rule.   
  
 ===== Simple product rules ===== ===== Simple product rules =====
  
-In SAP CPQ Setup-> Products, when products are edited under tab ‘Rules’ , new table will be displayed called ‘Simple Rules’. This will be a different representation of current “Attribute Dependencies” (entry “Attribute Dependencies will not be removed from legacy editor). Regular rules will be displayed in widget called ‘Scripted Rules’. \\+In SAP CPQ Setup-> Products, when products are edited under tab ‘Rules’, new table will be displayed called ‘Simple Rules’. This will be a different representation of current “Attribute Dependencies” (entry “Attribute Dependencies will not be removed from the legacy editor). Regular rules will be displayed in the widget called ‘Scripted Rules’. \\
 {{ :adminhelp:productadministration:products:adminrules.png }} {{ :adminhelp:productadministration:products:adminrules.png }}
 ;#;//Product rules//;#;  ;#;//Product rules//;#; 
  
-Table ‘Simple rules’ will be displayed if application parameter ‘Display table for simple product rules’ is set to TRUE. This table will contain rules from current “Attribute Dependencies” table. There will be only one rule per rule set (currently in Attribute dependencies, admin can define unlimited rules per rule set). Attributes and attribute values will be displayed in different color from key words (AND, Disallow etc.)+Table ‘Simple rules’ will be displayed if application parameter ‘Display table for simple product rules’ is set to TRUE. This table will contain rules from the current “Attribute Dependencies” table. There will be only one rule per rule set (currently in Attribute dependencies, admin can define unlimited rules per rule set). Attributes and attribute values will be displayed in different color from keywords (AND, Disallow, and so on)
  
 <note>  <note> 
Line 88: Line 89:
 There will be 2 new application parameters added to SAP CPQ Setup -> General -> Application Parameters -> General: There will be 2 new application parameters added to SAP CPQ Setup -> General -> Application Parameters -> General:
 '//Display table for simple product rules'//(Default value:FALSE) and '//Show Allow Option for Simple product rules//'(Default value:FALSE) '//Display table for simple product rules'//(Default value:FALSE) and '//Show Allow Option for Simple product rules//'(Default value:FALSE)
- 
- 
-==== Enovia Rules ==== 
- 
-Enovia is a Product Lifecycle Management (PLM) tool whose purpose is to act as a master data system for setting up products.  
- 
-SAP CPQ supports Enovia Rules and can be enabled for users on request (email support). 
- 
-In order to import Enovia Rules into SAP CPQ, an admin user should develop a custom API Interface that will process the data and import it into SAP CPQ.  
- 
-{{:adminhelp:productadministration:products:eno_fin.png|}} 
-  
-In order to support multi language translations we suggest you save the rule message in the custom table RuleMessags_Translation via the custom API Interface at the moment of import: 
- 
-     * Export message dictionary keys from the custom table RuleMessages_Translation 
-     * Translate them out of SAP CPQ 
-     * Import translation to this table 
- 
-Note that the rules are executed at run time, that is at the moment the user runs a product configuration. The syntax of Enovia rules will be checked at the moment of rule import so syntax errors won’t appear to end users. 
- 
-=== Message Logic === 
-\\ 
-Once the rule has been executed, a rule message will be shown to end users.  
- 
-The rule can be executed by either a user or the system, which is why two types of messages may appear:  
- 
-  - **Info messages** - these messages will be displayed when a rule is executed by the system.  These messages display information about executed rule actions. They do not make the configuration incomplete and will be displayed from the moment their rules are executed until all rules are triggered again.   
-  - **Action messages** - these messages will be displayed when a rule is executed by a user. These messages tell the user what to select/deselect in order to complete the rule logic and make configuration incomplete. These messages are shown when a rule is broken and they are removed as soon as the rule action has been performed. 
- 
-**Message Translation** 
-\\ 
-All Enovia rule messages will be displayed in English language. 
-\\  
-Product rule messages in SAP CPQ will be translated to the user's language.  
-\\ 
-Translation will be managed in SAP CPQ by the SAP CPQ admin user.  
-\\ 
-If a certain rule message is not translated, that rule message will be displayed in the way it has arrived from Enovia.  
- 
-=== Message Location === 
-\\ 
-Messages will appear in a Responder box //(Figure)//. This is the only place where messages are displayed within product configuration. 
- 
-{{:adminhelp:productadministration:products:resp_fin.png|}} 
- 
-Messages will be translated to the user’s language.   
- 
-Enovia messages will appear in English. The translation of these messages will be managed in SAP CPQ by the central admin. Product managers have the responsibility to detect when new translations are needed, and will request form the central admin to export appropriate translations files. Product managers will then organize correct translations of missing texts. After that, the translated file will be sent to the central admin who will import it into SAP CPQ. 
- 
-=== Rules Execution Time in SAP CPQ === 
-\\ 
-Product rules are executed at run time, that is at the moment the user runs product configuration, which includes the following:  
- 
-  - When the user finds product in catalogue 
-  - When the user opens product configuration 
-  - When product configuration is loaded 
-  - Once product configuration has been loaded and rules are executed for the first time, the following rules execution triggers will be any kind of change on product attributes: 
-     * Select\\ 
-     * Deselect\\ 
-     * Disallow\\ 
- 
-=== SAP CPQ Rule Execution Failure === 
-\\ 
-If during rule execution SAP CPQ cannot perform a rule action for any reason, it means one of the following: 
- 
-     * Attribute listed in a rule  cannot be found in loaded product configuration 
-     * Attribute values listed in a rule cannot be found in loaded product configuration 
- 
-The following message will be displayed to the end user: “Rule 'Rule name' cannot be executed. Please contact system administrator.”  
- 
-When a rule cannot be executed, the system will make the configuration incomplete so that the user cannot create a quote or send the product configuration for verification to Enovia. 
- 
-A rule execution error in a product will be solved the following way:  
- 
-  - The user will contact the SAP CPQ admin user  
-  - The admin user will send the following message to Enovia from SAP CPQ: "This product will be demoted in Enovia." 
-  - The SAP CPQ admin can deactivate the product in SAP CPQ if necessary  
-  - If a certain product is deactivated, the user won’t be able to find this configuration in SAP CPQ anymore  
- 
-When a product has been deactivated, its configurations saved in the Favorite section will become invisible to end users.  
-\\ 
-When a product has been deactivated, the user will be able to access quoted configurations and edit them.  
-\\ 
-The message will be translated to the user’s language, except the part related to the name of the rule. The name will not be translated in SAP CPQ, meaning that the system will take the original name of the rule in English. 
-\\  
-All product rules will be loaded in Developer Console so the admin user will be able to debug any of them in case of error.  
- 
-=== Obsolete Features === 
-\\ 
-Attributes in SAP  CPQ won’t have effective dates. 
-\\ 
-As a result, the rule engine does not need to consider effective dates in rule execution. 
- 
-=== Rule Errors === 
-\\ 
-**Syntax error** 
- 
-The rule syntax is checked at the moment of product import. Each product rule will be checked before rules and the entire product are saved in SAP  CPQ. 
-\\ 
-The product will be saved in SAP  CPQ only when all product rules are syntactically correct. 
-\\ 
-Due to the syntax check of each rule, importing the product will not be instant and can take some time, depending on the size of the product data sent.  
-\\ 
-If there is at least one rule with the syntax error, SAP CPQ will return a message about the error found and the product won’t be saved.  
-\\ 
-All product rules will be traced in SAP CPQ Developer Console.  
- 
-{{:adminhelp:productadministration:products:dev_console.png|}} 
- 
-The SAP CPQ administrator will be able to follow up on all product rules and debug rule execution directly in SAP CPQ.  
- 
-=== Forbidden Characters === 
-\\ 
-**Quotation marks (")**  - this  character cannot be included in attribute name, attribute value or any booked word because it would result in rule execution failure. Syntax error also occurs when this sign is missing from rule logic.  
- 
-**Split operator:  Tilde sign “~”** – this character can be present as a variable, as an attribute and/or attribute and its values.  
- 
-**Double colon (::)** - this character cannot be included in either the attribute name, attribute value or any booked word because it would result in rule execution failure.  
- 
-Characters that are not allowed as part of attribute names include the following:  " # $ @ % * , ? \ < > [ ] | : ( ) 
  
You are here: SAP Sales Cloud CPQ Online HelpAdmin Page HelpProduct AdministrationProductsRules Admin