What is the rules wizard and how does it work? | ParagonERP

What is the rules wizard and how does it work?

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.

Step 1: How to access 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.



Step 2: Set up the actions

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.

  • Give notification that says this: This option allows users to generate a toaster message that will appear on the top right of the screen. Once selected, you can modify the message that appears by clicking on the blue word this. 



  • Create a transaction from this: This option allows users to automatically create a transaction from another one. You can select the transaction you wish to create by clicking on the blue word transaction. You will be able to select which transaction to create it from when selecting the trigger (see step 4).


  • The value of this will be set to that : This option gives the user more flexibility. It is used to set any field of any module to a specific value. You can browse within the different sections of each module by clicking on the blue word this.


Finally, you can always mix different actions as illustrated in the example below.



Step 3: Set up the required conditions

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:

  • Is equal to: The left part of the sentence will have to be exactly the same as the right part of it in order for the rule to be executed (including capital letters, symbols, spaces, etc.)
  • Is below: The value of the left part of the sentence will have to be lower than the value of the right part of it in order for the rule to be executed. This option should only be used for numbers and money attributes.
  • Is above: Similar to the is below option, the value of the left part of the sentence will have to be higher than the value of the right part of it in order for the rule to be executed. This option should also only be used for numbers and money attributes.
  • Is less than or equal to: Similar to is below, with the exception that this option executes the rule if the values are exactly the same, or if the right part is lower.
  • Is greater than or equal to : Similar to is above, with the exception that this option executes the rule if the values are exactly the same, or if the left part is higher.


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:

  • AND: The two conditions must be met in order for the rule to execute
  • OR: Only one of the two conditions has to be met in order for the rule to execute. If the two conditions are met, the rule will execute as well. The only case the rule won't execute is if neither of the two conditions are met.
  • AND NOT: The first condition must be met, and the second condition must NOT be met in order for the rule to execute
  • OR NOT: Either the first condition must be met or the second must NOT be met. If both the first condition is met and the second condition is NOT met, the rule will execute as well. The only case the rule won't execute is if neither the first condition nor the second is met.



Step 4: Setup the trigger

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.



Step 5: Save your rule

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.



Step 6: Modify the code

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.



What's next?

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.


 

 

 


    • Related Articles

    • What are rules?

      ParagonERP can help small businesses manage their day-to-day operations using rules. Rules allow you to change the behavior of the software to suit your business’ specific needs without having to change the software itself. In other words, without ...
    • How to install premade rules

      This article explains how to install premade rules in Paragon. These are rules that we have created and can be added to any Paragon system.  For more more help creating rules, please contact us at support@paragon-erp.com Step 1: Go to the rules setup ...
    • Rule - Calculate cost on receipt transaction

      Introduction ParagonERP can help small businesses manage their day-to-day operations using rules. Rules allow you to change the behavior of the software to suit your business’ specific needs without having to change the software itself. In other ...
    • Rule - Sending an email with the appropriate custom PDF

      Being able to keep efficient electronic communication between you and your customer is a great asset in this day and age. In Paragon, we already have a few great features related to this: one being that you can email PDF output of a transaction ...
    • Rule - How to use "run now" rules

      As you are familiar with rules, they allow you to change the behavior of the software to suit your business’ specific needs without having to change the software itself. Run now rules are rules whose execution does not depend on a condition or a ...