---
schema_version: "1"
id: b4e57318d3ce05cc06031273db75e0133fc99404f152ffb0599a92ff8e41c78e
title: Set Masking Rules
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/set_masking_rules.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.set_masking_rules.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: be69ec473850082daf61b9513c613ed4eda18a24a3b4a1d355c17160082ca497
description: Set masking rules for standard and custom objects in your sandbox org.
products:
  - Salesforce Platform
release: "264"
---
# Set Masking Rules

Set masking rules for standard and custom objects in your sandbox org.

### 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).

A user must have view access on objects to configure masking and modify access on objects and related fields to mask. A particular field may not be available for masking because of its type (currently picklist, formula, checkbox, and roll-up summary are not supported). External objects, platform events, and BigObjects are not supported.

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

Important Choose the objects and the masking type to apply to its fields carefully. The choices that you make determine the speed of data mask completion.

The following masking types are available:

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:33.33333333333333%">
          <col style="width:33.33333333333333%">
          <col style="width:33.33333333333333%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d12035e78">Masking Type</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d12035e80">Description</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d12035e82">Supported Field Types</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Masking Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d12035e78 ">Replace with Random Characters</td>
            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d12035e80 ">Replaces sensitive data with random characters that are readable, but not
              recognizable. For date fields, specify earliest and latest dates.</td>
            <td data-label="Supported Field Types" class="slds-cell-wrap" style="vertical-align:top;" headers="d12035e82 ">Text, Short Text, Phone, Date, Email, Fax, Date/Time, Address, URL</td>
          </tr>
          <tr class="">
            <td data-label="Masking Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d12035e78 ">Replace with Random Value</td>
            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d12035e80 ">Replaces sensitive data with random numbers that are readable, but not recognizable.
              Specify minimum and maximum values for the field.</td>
            <td data-label="Supported Field Types" class="slds-cell-wrap" style="vertical-align:top;" headers="d12035e82 ">Percent, Number, Currency, Geolocation</td>
          </tr>
          <tr class="">
            <td data-label="Masking Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d12035e78 ">Replace all with True/False</td>
            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d12035e80 ">Replaces all boolean checkbox data with either True or False</td>
            <td data-label="Supported Field Types" class="slds-cell-wrap" style="vertical-align:top;" headers="d12035e82 ">Checkbox</td>
          </tr>
          <tr class="">
            <td data-label="Masking Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d12035e78 ">Replace From Library</td>
            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d12035e80 ">
              <p>Replaces sensitive data with random but recognizable data using one of these selected libraries:</p>
              <ul>
                <li>First Name</li>
                <li>Last Name</li>
                <li>Company Name</li>
                <li>Email</li>
                <li>Street</li>
                <li>City</li>
                <li>Country</li>
                <li>Country (Abbr.)</li>
                <li>State</li>
                <li>Postal Code</li>
                <li>Phone Number</li>
                <li>Social Security Number</li>
              </ul>
            </td>
            <td data-label="Supported Field Types" class="slds-cell-wrap" style="vertical-align:top;" headers="d12035e82 ">Text, Short Text, Email, Address</td>
          </tr>
          <tr class="">
            <td data-label="Masking Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d12035e78 ">Replace using Pattern</td>
            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d12035e80 ">
              <p>Replaces sensitive data with data generated using a defined pattern. The pattern must
                follow the following rules:</p>
              <ul>
                <li>%c = replace with lower-case letter (a-z)</li>
                <li>%C = replace with upper-case letter (A-Z)</li>
                <li>%d = replace with digit (0-9)</li>
                <li>%% = replace with % sign</li>
                <li>%nd or %nc = replace with “n” number of digits or characters</li>
              </ul>
            </td>
            <td data-label="Supported Field Types" class="slds-cell-wrap" style="vertical-align:top;" headers="d12035e82 ">Text, Email, Address</td>
          </tr>
          <tr class="">
            <td data-label="Masking Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d12035e78 ">Delete</td>
            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d12035e80 ">Deletes sensitive data entirely, leaving an empty data set</td>
            <td data-label="Supported Field Types" class="slds-cell-wrap" style="vertical-align:top;" headers="d12035e82 ">
              <p>Text, Phone, Date, Long Text Area, Email, Fax, Date/Time, Geolocation, Address,
                Percent, Number, Currency, URL</p>
              <p style="margin-bottom:0;">This rule is not available for required fields, and is the
                only masking option available for long text fields which can hold a large amount of data,
                and masking them would slow down the masking process considerably.</p>
            </td>
          </tr>
        </tbody>
      </table>