ParagonERP offers what we call rules, that allow users to change the behavior of the software to suit their business’ specific needs without having to change the software itself. Some rules can be created by Jonar upon request from the customers. However, some basic rules can be created by the customers themselves, with a feature we call the rules wizard. This document will explain everything users need to know about creating rules with the rules wizard.
To access the rules wizard, first go to the settings page, and then hit rules wizard from the rules engine card.
A new window will come up, as shown below.
The first screen of the rules wizard indicates what the rule should do. Three types of actions are proposed, as explained below. You can click on the blue plus button on the top section of the screen to add actions, and then edit them on the bottom section of the screen.
Finally, you can always mix different actions as illustrated in the example below.
The second screen indicates what conditions must be met in order for the rule to be executed. You can browse in the different fields of the different modules by clicking on the blue word value.
Then, you can select the comparison type by clicking on the blue words equal to. The different options are the following:
Finally, you can enter the value to which it should be compared by clicking on the blue word that.
You can set up multiple conditions by clicking on the plus button. You can set the relation between your conditions by clicking on the blue word AND. The different options are:
Lastly, you can decide when this rule should be executed. This is called the trigger.
You can decide to execute your rule when a user activates any action offered in the different modules in Paragon. Furthermore, you have to decide if you want your rule to be executed before or after that action.
For rules that are executed before an action, the rule will be executed when a user activates the trigger. For example, if the rule is being triggered before save order, then when a user hits the save button on an order, the rule will be executed before the save procedure is done. This means that any change or verification that the save function usually does will be executed after the execution of the rule.
For rules that are executed after an action, the rule will be executed right after the action is done. For example, if the rule is being triggered after save order, then when a user hits the save button on an order, the rule will be executed right after the standard save procedure is complete.
To specify the trigger, start typing after or before, and the list of actions will be available in the drop-down.
Before saving your rule, make sure you enter a name as well as a description for your rule. This will allow other users to understand what the rule is doing.
Finally, if you want to activate your rule now, check the box turn on rule now.
If a rule already exists under this trigger, you will receive a warning asking if you would like to overwrite the rule already in use.
You can check out the JavaScript code that has been generated by the rules wizard by selecting the code tab.
This code can be modified if you feel comfortable to do so. But be careful! Changing the code is not controlled by the wizard - make sure you understand the modification you wish to do as you will not be allowed to view these changes within the wizard.
If you want to modify the code, hit the accept button, then click on rules on the settings page.
Locate your rule and hit the edit button.
Modify the code you wish to modify and hit the accept button.
Now, go ahead and try out your rule! Try different values on your transaction to make sure the rule is doing what you expect it to do.
If you want to modify the rule with the rules wizard, you will have to start the process again. Once you hit the accept button, a popup will ask you to confirm that you want to overwrite the existing rule.