Set Filter Criteria
Target specific data records for masking to meet business requirements and security goals.
Required Editions
| Available in: Lightning Experience |
| Available in: Professional, Enterprise, Unlimited, and Developer Editions with the Salesforce Data Mask or Data Mask & Seed add-on licenses |
Note This content relates to Salesforce Data Mask. Read
about Accelerate and Anonymize in Own from Salesforce.
Use this feature to:
- Reduce the time taken to mask a sandbox by anonymizing only selected data.
- Gain finer grained control over your Data Masking configuration.
- Incrementally mask newly added data, saving time.
You can define data filters when setting mask rules on the Configure Masking page.
- To only mask data that meets the filtering criteria, switch Data Filter to Active.
- Select one of more fields to apply the filter to.
- Select the operator to apply to the field. You can choose from:
Field Type Available Operators All fields equals, does not equal TEXT (STRING), ID is null, is not null DATETIME is before, is within, is after PICKLIST VALUE (STRING) is null, is not null INTEGER, DOUBLE is less than, is less than or equal to, is greater than, is greater than or equal to, is null, is not null - If necessary, add more conditions, and repeat steps 3 and 4.
- To create a filter criteria, enter the condition logic. For example, 1 AND (2 OR 3).
- Optionally, to preview your query in SOQL, click Query Preview.
Examples of Filtering Criteria to Narrow Which Records Are Masked
- Set filter criteria on the CreatedDate field to mask only newly created records by setting the is after operator to a recent date.
- Set filter criteria on the SystemModstamp field to mask data that was excluded from previous masking by setting the is before operator to the date of last masking
Before you finalize your record filtering choices, we recommend that you take these steps:
- To make sure that it returns a result, test the query on Postman or dev console.
- Create one or more records to test incremental masking with a date filter on the object.
- When a sandbox is created, CreatedDate represents the record creation date and SystemModstamp represents the last modified date in the production org.
Did this article solve your issue?
Let us know so we can improve!

