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.
Masking is performed dynamically during the migration and occurs before data is written to the target environment. For masked fields, the original value is replaced with a randomized value not derived from the source data, so the original value cannot be determined.
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.

See the Data Mask States section above for an explanation of each Eye icon.
Click Add Masking.

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

Currently, the only masking method available is Random. This method generates random data for the mask during migration.
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?

