---
schema_version: "1"
id: 7c1ded6ca37b41d1d13dfd318710f2c8c747186ec53440feb087f815d8925a9e
title: Data Mask Best Practices
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/data_mask_recommended_data.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.data_mask_recommended_data.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 11204601e8fd4df856fcf2c9a827a283829560c4135ec5742613561efcc2bda7
description: We recommend that you mask fields that typically contain personally identifiable information (PII) or other sensitive data. These fields are a good place to start.
products:
  - Salesforce Platform
release: "264"
---
# Data Mask Best Practices

We recommend that you mask fields that typically contain personally identifiable information (PII) or other sensitive data. These fields are a good place to start.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Professional</strong>, <strong>Enterprise</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions with the Salesforce Data Mask managed package (Legacy) add-on license.</td></tr></tbody></table>

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-deploy_sandboxes-264-0-0-production-enus/654e51d1-6795-49fe-bd43-b5385950cf4a/images/icon_note.png)

Note This content relates to the Data Mask managed package. Read about Accelerate and Anonymize in [Own from Salesforce](https://help.salesforce.com/s/articleView?id=platform.own_from_salesforce.htm&type=5&language=en_US).

These Data Mask guidelines help you to implement features efficiently and securely while optimizing performance.

## Guidelines

![Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-deploy_sandboxes-264-0-0-production-enus/654e51d1-6795-49fe-bd43-b5385950cf4a/images/icon_example.png)

Example

- Create Data Mask configurations in production orgs. While Data Mask can’t run in your production org, install and configure it there so that your policies are easily manageable. When a sandbox is refreshed, Data Mask configurations are automatically pushed to the sandbox.
- To improve performance and manageability during masking processes, divide large objects into smaller configurations. Dividing them up helps to prevent row locking and traversal issues on complex objects. For example, objects such as Contact, Account, Case, and Opportunity with more than 20 million records, more than 400 custom fields, or thousands of parent-child relationships.
- Avoid executing resource-intensive actions such as large data loads or complex queries in sandboxes concurrently with Data Mask processes to prevent performance degradation.
- By using data filters to target subsets of records or new data consumption, you avoid redundant masking operations. This use case is especially helpful if Data Mask runs into a the limitation issue and only a few records remain unmasked.
- To ensure that all records are masked as planned, use the Dev Console to query them after running Data Mask. Querying records post-implementation validates the effectiveness of the masking process and ensures all targeted records are appropriately masked.
- Only mask the fields or objects that you need. Selectively masking only the fields and objects that contain sensitive data necessary for testing minimizes unnecessary processing and potential performance impacts.
- Only copy over data from production that you must test. Transfer and mask data from production environments selectively, focusing only on datasets essential for testing scenarios to streamline data masking efforts.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small " summary="Example Configuration: Replacing Sensitive Customer PII on the Account and Contact
     Objects">
        <caption>Example Configuration: Replacing Sensitive Customer PII on the Account and Contact
          Objects</caption>
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d7198e125">Object</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d7198e128">Example Configuration</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Object" class="slds-cell-wrap" style="vertical-align:top;" headers="d7198e125 ">Account</td>

            <td data-label="Example Configuration" class="slds-cell-wrap" style="vertical-align:top;" headers="d7198e128 ">
              <ul>
                <li>Account Name&nbsp;- Replace with Library: Company Name</li>

                <li>Account Phone&nbsp;- Replace with Random Value</li>

                <li>Billing Street - Replace with Library: Street </li>

                <li>Billing City - Replace with Library: City</li>

                <li>First Name, when <samp class="parmname">PersonAccounts</samp> is enabled, replace with Library:
                  First Name</li>

                <li>Last Name, when <samp class="parmname">PersonAccounts</samp> is enabled, replace with Library:
                  Last Name</li>

              </ul>
            </td>

          </tr>
          <tr class="">
            <td data-label="Object" class="slds-cell-wrap" style="vertical-align:top;" headers="d7198e125 ">Contact</td>

            <td data-label="Example Configuration" class="slds-cell-wrap" style="vertical-align:top;" headers="d7198e128 ">
              <ul>
                <li>First Name - Replace with Library: First Name</li>

                <li>Last Name - Replace with Library: Last Name</li>

                <li>Home Phone - Replace with Random Value</li>

                <li>Birthdate - Replace with Random Value</li>

                <li>Email - &nbsp;Replace with Pattern: %5c@invalid.com</li>

              </ul>
            </td>

          </tr>
          <tr class="">
            <td data-label="Object" class="slds-cell-wrap" style="vertical-align:top;" headers="d7198e125 ">&nbsp;</td>

            <td data-label="Example Configuration" class="slds-cell-wrap" style="vertical-align:top;" headers="d7198e128 ">&nbsp;</td>

          </tr>
        </tbody>
      </table>