How to Add Rule Criteria to a Compliance Rule
Compliance rule criteria are a collection of conditional statements and the logic that is considered by Copado's scanner when running a compliance scan.
In order to add rule criteria to a compliance rule follow the steps below:
- Navigate to an existing Compliance Rule and scroll down to the Compliance Scope section:
- Select a Metadata Type:
- In the criteria condition rows, complete the items to build the required conditional statements. There a different operators you can use:
- Use equal to find an exact match.
- Use not equal to to look for results that do not include the value you specify.
- Use less than and greater than to search for results that are inferior to or exceed the specified value respectively.
- Less or equal will return results that are inferior to or match the specified value.
- Greater or equal will return results that exceed or match the specified value.
- Use contains or does not contain to look for results that include or do not include the value you specify.
- Use starts with to look for results that begin with the value you specify.
- Use within to define how to execute the value.
- Use is blank to check for blank or null values for a field. Boolean, Double, Integer, and Long are out of scope since null values are not supported.
- Use is not blank to check a field is not whitespace, not empty (''), and not null. Boolean, Double, Integer, and Long are out of scope since null values are not supported.
- If advanced criteria logic is required:
- At the bottom of the Compliance Scope section, fill in the Criteria Logic with your personalized filter logic using Salesforce's standard logical operators (AND, OR, NOT), and referencing the conditional statement with its number.
- For each conditional statement row, a number will appear on the left. This number is a reference for the statement.
- Click on Save Scope.
- The criteria will be automatically tested and validated. If the criteria is invalid, you will not be able to save the record and an error message will be displayed explaining why it is invalid.