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:

  1. Records are retrieved from the source org.

  2. 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.

  3. If data masking is disabled for a field, the original value remains unchanged.

  4. Records with masked fields are deployed to the target org.

circle-info

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.

State
Icon
Description

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

1

Select Template

  1. Click Templates from the left sidebar menu.

  2. Click the template to add Data Masking to.

2

Apply Data Masking

  1. Click the object to apply Data Masking to.

  2. Click the Eye icon of the field to mask.

circle-info

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

  1. Click Add Masking.

  2. Click the Data Masking Method dropdown menu.

  3. Select the masking method to use.

circle-info

Currently, the only masking method available is Random. This method generates random data for the mask during migration.

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

  2. The Data Mask State icon shows that the field is now masked.

  3. Click Save once all Data Masks have been applied.

3

Remove Data Masking

  1. Click the object to remove Data Masking from.

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

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

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

  5. The Data Mask State icon shows that the field is now unmasked.

  6. Click Save once the desired Data Masks have been removed.

4

Save Template

Once you are done applying or removing Data Masking to fields:

  1. Click Save template to save your changes.

Last updated

Was this helpful?