Rules can be a useful tool alongside machine learning. Your company may have unique business policies that you’d like to implement within Ravelin. For example, you may want to:
- Prevent all orders greater than $100 made from a customer who opened an account within the past 30 days
- Allow all orders from customers who are tagged as 'VIP'
Rules allow you to implement this business logic as specific actions to be taken whenever an order matches the conditions that you define.
For each rule, you'll need to select the action (Allow, Prevent, Review) triggered by the rule and define the conditions under which the rule is triggered.
A rule can contain up to eight conditions. A condition is made up of three parts:
- Attribute - The attribute of the order (e.g. the order value or the customer account age)
- Operator - The arithmetic that compares the criteria to the value (e.g. less than or equal to)
- Value - The value you wish to use (e.g. 100.00 GBP)
Creating Rules on the Dashboard
Only people who have Admin or Developer access are able to create rules.
You can create and manage rules in the Rules section of the dashboard. The Rules section can be found via this icon on the left menu:
To add a rule, click the blue Create rule button towards the top right of the Rules page.
Click Add condition and select the conditions that you want your rule to have. This includes choosing the attribute, operator and value for the condition. You can filter by types of conditions (for example all conditions to do with an Order or Customer) or you can search by condition name. Each condition has a description of what it is and an example.
Once you are happy with the conditions of the rule, you can set the action you want the rule to result in. You can set this to Allow, Review or Prevent.
In order to publish the rule, you first have to test the rule by selecting the ‘Estimate rule impact’ button. This will give you an indication of whether the criteria used are too strict or not strict enough.
Testing the rule will show you an estimate of what percentage of active customers in the last 7 days would be impacted by the rule. A visual summary of the last action, score distribution and manual reviews associated with the test sample is also shown.
If the rule test results are over 5%, you will not be able to create the rule. Please contact us if you are unable to create a rule - Ravelin can do further analysis on the rule impact and discuss options for implementation.
Please note, the rule impact test is based on a sample and is used to estimate impact.
Managing Rules on the Dashboard
The Rules list page shows you the rules that are in place. You can search for specific rules by name using the search bar at the top left of the rules list page. Alternatively, you can also filter by Ravelin Action and who created the rule by using the dropdown filters on the right of the rules list page.
To edit or delete a rule, select the menu option towards the right of each rule.
Each order will be evaluated against the rules you have created and processed in a specific order. In most cases, rules are processed in the following order unless you have specifically asked for the processing order to be altered for an individual rule:
If a payment matches a rule's conditions, the rule's action is performed and no other rules are processed. For example, if an Allow rule is triggered, no Prevent or Review rules will be processed. Allow rules should rarely be implemented as they override other rules in place.
Within the greater Ravelin system, manual reviews will always take precedence over rules. In addition, rules will always take precedence over Ravelin fraud scores.