How to set up business rules to trigger other business rules
A guide to setup and configure a business rule to trigger other business rules
Last updated
A guide to setup and configure a business rule to trigger other business rules
Last updated
There are several reasons you might want a business rule to trigger other business rules, also referred to as subrules.
Reasons why you might want to make a sub rule:
You want to reuse parts of a rule so the same logic is used in multiple places.
You want to take actions on an entity that is related to the triggering entity.
You want actions to be taken asynchronously.
Start by creating your sub rule and choosing an action trigger.
When choosing a trigger you will need to choose the type of entity the rule needs to act on. After you have picked the trigger, setup the rest of the rule as normal. (Remember to click "Create Business rule" to save the rule).
Open the business rule you want to trigger the sub rule.
Add an action and choose "Trigger sub rule". Choose the same entity that you chose on your sub rule for "Entities to execute for" and select the sub rule for "Rule to execute".
Note If you choose a different entity to what triggered the original rule, it will run the rule for all related entities which might make the sub rule run more than once.
If you wish to execute the rule asynchronously toggle the "Execute async" check.
Note If your sub rule applies to more than one entity it is highly recommended that you run it asynchronously to optimize the execution time.
When using sub rules there are some pitfalls you should be aware of:
Changing a sub rule will change behavior wherever it is used, so be cautious of all the places a rule is used before changing it.