Applying Data Masking to Fields
Overview
This article explains what Data Masking is and how to apply it to specific fields to prevent sensitive data from being migrated to the target organization. Data Masking is useful in sandbox or testing environments where real customer information should never be exposed. By selectively masking fields, teams can maintain realistic data structures for validation while ensuring compliance with data privacy requirements.
How Data Masking Works
Data Masking replaces a field's value with randomized data during a migration. The masking process follows these steps:
Records are retrieved from the source org.
If data masking is enabled for a field, the value is replaced with a randomly generated value of the same field type, with valid formatting.
If data masking is disabled for a field, the original value remains unchanged.
Records with masked fields are deployed to the target org.
Data Mask States
The table below shows the different Data Mask State icons, with an explanation of each.
Unmasked

The source data for this field will be migrated.
Masked

Masked data for this field will be migrated.
Non-Maskable

This field's data can not be masked, and the source data for this field will always be migrated.
Apply Data Masking
Apply Data Masking
Click the object to apply Data Masking to.

Click the Eye icon of the field to mask.

Click Add Masking.

Click the Data Masking Method dropdown menu.
Select the masking method to use.

Click Back. Note that clicking the X will discard the Data Mask.

The Data Mask State icon shows that the field is now masked.
Click Save once all Data Masks have been applied.

Remove Data Masking
Click the object to remove Data Masking from.

Click the Eye icon of the field to remove Data Masking.

Click the Remove icon to the right of the masking method.

Click Back. Note that clicking the X will leave the Data Mask unchanged.

The Data Mask State icon shows that the field is now unmasked.
Click Save once the desired Data Masks have been removed.

Last updated
Was this helpful?

