# Live Data Masking

**Live Data Masking** enables on-the-fly data masking within Salesforce, eliminating the need to build full configurations when masking is required for specific object data. It supports both the use and reuse of existing **Global Rules** and the creation of **Local Rules** for targeted masking. When both global and local rules are defined for the same fields and conditions, local rules take precedence. This approach also supports rule reuse through **cloning**, enhancing flexibility and efficiency in data protection.

**Step-By-Step Guide**:

1. Observe the new module “Live Data Masking” and click on the “JOB CONFIG” to land on the “Live Data Masking Config” creation screen.
2. Observe the “Salesforce Orgs” and the NEW CONFIG creation options available on this screen
3. The drop-down “Salesforce Orgs” contains the list of ORGs available for selection.
4. Select the required ORG at the “Salesforce Orgs” drop-down.
5. Observe the following screen for the first time creation of the “Masking Rule Config” or first-time creation of “Masking Rule Config” on any ORG.

   ![](https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FqjaMY2T7CjkZpOZRieDy%2F0.png?alt=media)
6. Once the object is selected, continue with the “Masking Config” creation.

   ![](https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FzpNC5D92zGfukgPAWDDn%2F1.png?alt=media)
7. Click on the “NEW CONFIG” button to initiate the config creation.
8. Now, the flow will navigate to the “Object Info” section of the config creation.

   ![](https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FmyEQTPrG6ceb2jiAsmUW%2F2.png?alt=media)
9. Select the required objects to continue with the rules creation.

   ![](https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FIS7XdxmwOhkPYPFZwoP6%2F3.png?alt=media)
10. If there any rules available created under that object, all the available rules will come selected as depicted in the above screen.
11. If any object doesn’t hold the rules, the following “No masking rule” will be displayed under the “Selected Masking Rules” column.
    1. **Note: -** All the available selected rules will be displayed in a coma separated fashion under the “Selected Masking Rules”.
12. Click on any object that holds rules to view the available rules

    ![](https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FedUCXDJm4xr7akcCKEO7%2F4.png?alt=media)
13. Click on the View icon to view the masking rules.

    ![](https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FZIwkaLnYVHOvOwXGvx7d%2F5.png?alt=media)
14. Observe the rule and click cancel or anywhere outside the “Masking Rule” window to close the window.
15. Every selected object should have at least one rule associated to it. Observe the following screen flows.

    ![](https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FeVv5dwGvb316oV9p82uz%2F6.png?alt=media)
16. Clicking on ”Next” would show the following message prompting to create at least one rule for the selected object.

    ![](https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FDTBzwsjrUlZcaYB4wH3A%2F7.png?alt=media)
17. Click on the “Masking Rules” icon to initiate the rules creation.

    ![](https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FBfHYWVWNMc6GkrWdTCxh%2F8.png?alt=media)
18. A “Selected Object” window will be opened, for creating a new rule.
19. Click on the “NEW MASKING RULE” button to initiate the rule creation.

    ![](https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FJ71X0vErQ497hOd2e9ID%2F9.png?alt=media)
20. A “Masking Rule” window will be opened to create the rule.

    ![](https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FhyNkfnJSSV49xJ0QXGkG%2F10.png?alt=media)
21. **Observe the following on the window**:
    1. **Org Name**: Provides the org name.
    2. **Rule Name**: Enter the rule name here.
    3. **Select Object**: It represents the object on which the masking rule is being created.
    4. **Field Type**: Provides the list of “Field Types” from the object.
    5. **Masking Style**: Enter the required pattern which should reflect on the selected ‘Field Type’.
    6. **Masking Value**: Enter the pattern that should be applied for the selected field type.
22. Add to Org “ORGNAME” Masking Rules List:
    1. Selecting this will make sure, the rule being created will be a global rule.
23. Observe the following screen for reference:

    ![](https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FL8vRGoEd0heUxkgoSznA%2F11.png?alt=media)
24. Select the “Add to Org ‘ORG NAME” Masking Rule List”, if the rule should be a global rule.
25. On entering all the required details, click on the “SAVE” button to save the created masking rule.
26. On clicking save a dialogue with info would be displayed confirming the save on the masking rule.

    ![](https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FbrLnuDDeU9YjIpysuLWg%2F12.png?alt=media)
27. Upon saving the masking rule, the workflow automatically navigates to the **Selected Object** screen, where the newly created rule will be displayed and available for further configuration or review.

    ![](https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2Fa8scxU1u3t6ofqiOvFta%2F13.png?alt=media)
28. Observe the upward (Publish) icon beside the “Type Of The Rule” to publish the local to become a global rule.
29. Click on the icon to publish the local rule to become a global rule.

    ![](https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2F4A8iniqNNXTHBMew4fET%2F14.png?alt=media)
30. Click on to continue with the rule creation. The flow will navigate to the object info section of the masking config creation.

    ![](https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FW6vFVzlAD2Cb3aok6iuq%2F15.png?alt=media)
31. Observe the account object unchecked during the masking config creation. This will throw a message to the user asking for confirmation about unselecting the object from the flow creation.

    ![](https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FSr0isIo7RCGF3wKOfa2x%2F16.png?alt=media)
32. On selecting the required objects, click on the “NEXT” to continue with the “masking config” creation
33. Clicking next will navigate to the “Config Details” section of the flow.

    ![](https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2Fz6u9fVyiKh0WubnQAbUV%2F17.png?alt=media)
34. Observe the screen for the details:

    1. **Org Name:** Represents the org name
    2. Label: Enter the required label in this field.
    3. **Batch Size:** Specify the batch size at which the data should be processed while the data masking is being performed.
    4. **Email notification**: Select an email from the list. This will send an email to the person whose email is selected
    5. **Disable Workflows**\
       Enable this toggle to temporarily disable active workflows during the data masking operation.
    6. **Disable Validation Rules**\
       Enable this toggle to prevent validation rules from executing while masking data.
    7. **Disable Triggers**\
       Enable this toggle to bypass Apex triggers during the masking process.
    8. **Disable Flows**\
       Enable this toggle to deactivate Salesforce Flows for the duration of the data masking operation.
    9. **Exclude Deleted Records**\
       Enable this toggle to ensure that deleted records are excluded from the masking operation.
    10. **Enable Serial Mode for Bulk API**\
        Enable this toggle to process Bulk API operations sequentially (one after another) to reduce the risk of record-locking or related execution errors.

    ![](https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2Fc5tUXYUAHLNJy1Knf1aF%2F18.png?alt=media)
35. The **“Masking Info”** section of the **“Config Details”** page will provide the information about the list of rules created per object.

    ![](https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FucKumZSpdlIpvMkLlHQ1%2F19.png?alt=media)
36. Click **“SAVE”** or **“SAVE & RUN”** to save the config.
37. **SAVE**: Saving the config will show the following screen, followed by a confirmation message on saving the config.

    ![](https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FFJ4WxwD2EVOuO5dE7UbK%2F20.png?alt=media)
38. Clicking on “OK” will continue with saving the flow and navigate to the “JOB CONFIG” page.
39. The saved job has to be run on the job config page to perform the actual data masking on the data in Salesforce.
40. Click on the “Play” icon to run the config.

    <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2F4feIX5v4eHjSbaKlyadq%2Fimage.png?alt=media&#x26;token=4cb1f604-26db-4d9c-ac97-601cb9efa9b7" alt=""><figcaption></figcaption></figure>
41. On initiating the job run a “Selected Data To Masking” window will be displayed to verify the details of the run.

    <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FwBxs0VFlC1OQTldc1MCB%2Fimage.png?alt=media&#x26;token=fccf670a-1c1a-43bd-8cc2-fe6f3190c3a5" alt=""><figcaption></figcaption></figure>

    <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FCquXkJoavcM1nBxGFuSc%2Fimage.png?alt=media&#x26;token=a67e586e-02e5-4f23-8632-ee9bfbaab5e4" alt=""><figcaption></figcaption></figure>
42. Observe the icon on the screen below while the job run is in progress.

    <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FmSyBx5SxYgzHVfc037sc%2Fimage.png?alt=media&#x26;token=7f677484-d285-4095-a6c6-3ef3d5776a54" alt=""><figcaption></figcaption></figure>
43. Clicking the “SAVE & RUN” will save the config and run it to perform the data masking.

    <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2F6wLcWu77ScC7LUWPYzo6%2Fimage.png?alt=media&#x26;token=ab9f1f57-a298-478d-9b4d-51356060bba1" alt=""><figcaption></figcaption></figure>

    <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FlZ8Yv6uTx757wHtDP4sW%2Fimage.png?alt=media&#x26;token=feb137ca-0b63-482c-925a-5c113f196f8c" alt=""><figcaption></figcaption></figure>
44. On completing the saving, the flow navigates to the “JOB CONFIG” screen.

    <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2Fh5D3VJKswFSuNgCkg2c2%2Fimage.png?alt=media&#x26;token=4dba802c-2b86-48cd-9fbb-0b04dcd629c5" alt=""><figcaption></figcaption></figure>
45. Observe the Rollback option, which provides the ability to revert any deployed masking operations, if required.
46. Click on the rollback button available to initiate the rollback operation.
    1. To support the rollback operation, the deployed data will be retained for a period of “7 days” and on elapsing the retention period, the data will be deleted permanently.
47. On clicking the rollback, the following “Rollback” window will be displayed.

    <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FFaqKmyTODzTRTdsAIoMz%2Fimage.png?alt=media&#x26;token=0d5e8ed1-b4fc-4648-aaff-456cd6db4987" alt=""><figcaption></figcaption></figure>
48. Select the required objects to rollback the masking’s. On selecting at least one object the “Rollback” button will become enabled.

    <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FNI6FQyyMeusGYzWlSOiV%2Fimage.png?alt=media&#x26;token=508b8e28-5693-483b-969e-ae201164e60d" alt=""><figcaption></figcaption></figure>
49. On clicking the rollback option, the following window will be displayed for confirming the rollback

    <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FTNimWy5bBYk4QWcTRaav%2Fimage.png?alt=media&#x26;token=1e3f5254-450d-40d4-8b45-129040f2401d" alt=""><figcaption></figcaption></figure>
50. For every rollback operation performed, a new entry will be created at the “JOB HISTORY” page. This job can be identified with the “Job Type – Rollback”.

    <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FGp1SGhnMNWalCSyQPqhX%2Fimage.png?alt=media&#x26;token=208928a6-d1b1-4790-a349-73cc5f5a88f5" alt=""><figcaption></figcaption></figure>
51. Click on the “info” icon under the “Job Info” to open the “Live Masking Config Info”.

***

## Date Range-Based Masking

#### **Step 1: Select Object and Open Masking Rules**

Navigate to **Live Data Masking → Job Config**.\
Locate the required object from the list.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2Fde5BhhVIfTsUziTwlmEF%2F1.png?alt=media&#x26;token=7ac54638-11d2-4fbc-9b72-9abb52bf7942" alt=""><figcaption></figcaption></figure>

Select the checkbox for the object.\
Click the **Masking Rules** icon under the **Masking Rules** column.

#### **Step 2: Open Masking Rules Popup**

The **Selected Object** window is displayed.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FpwSMp48EHbEaMRV4wvyQ%2F2.png?alt=media&#x26;token=3d508eb0-a786-4600-9654-babff17d79fd" alt=""><figcaption></figcaption></figure>

Review the existing masking rules for the selected object.\
Click **NEW MASKING RULE** to create a new rule.

#### **Step 3: Enter Masking Rule Details**

The **Masking Rule** screen is displayed.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FR7j1arz0c3aF2LyHQkLv%2F3.png?alt=media&#x26;token=a90d5060-946e-448f-bef5-5e6a500f3d49" alt=""><figcaption></figcaption></figure>

Enter the **Rule Name**.\
Ensure the rule name follows the allowed format (alphanumeric, `_`, `-`, and spaces).

Verify that the **Select Object** field is pre-populated (e.g., **Account**).

#### **Step 4: Select Field Type**

Click the **Field Type** dropdown.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FXq9NKtEviUF86tT1RIrK%2F4.png?alt=media&#x26;token=07ec825e-b7a5-4553-9978-c84c7a5bacd2" alt=""><figcaption></figcaption></figure>

Select the required field type (e.g., **date**, **double**, **picklist**, **textarea**, **encryptedstring**, **url**).

#### **Step 5: Select Masking Style**

Click the **Masking Style** dropdown.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FbfXBD5Yrg5IewD9hJzUG%2F5.png?alt=media&#x26;token=8acf4e27-5d83-4728-8435-0a3511f8241c" alt=""><figcaption></figcaption></figure>

Select the required masking style (e.g., **substitution**, **dateRange**).

#### **Step 6: Configure Date Range**

If **dateRange** is selected:

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FqMpY7yAj6eZWPMdY4ldd%2F6.png?alt=media&#x26;token=04eb2d15-0973-4227-9833-6eaad65e4592" alt=""><figcaption></figcaption></figure>

Enter the required date range in the **Enter a date range** field.\
Use the calendar icon to select dates.

#### **Step 7: Select Date Range from Calendar**

Choose the start and end dates from the calendar.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2F6y2jbuT6oveTXm2ecfRo%2F7.png?alt=media&#x26;token=d5e78f74-d3af-4e21-b9f6-a56cb6956285" alt=""><figcaption></figcaption></figure>

Verify that the selected range is populated in the **Enter a date range** field.\
Confirm that the corresponding **Masking Value** is auto-generated.

#### **Screenshot 8: Select Fields and Save Rule**

Select the required fields from the list using the checkboxes.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2F0TDr0SbP5owwx1gmWScG%2F8.png?alt=media&#x26;token=0a500f68-f5e3-45e4-8e4f-6ef09c56ed9e" alt=""><figcaption></figcaption></figure>

(Optional) Enable **Add to Org - 'Org Name' Masking Rules List** to save the rule at the org level.

Click **SAVE** to create the masking rule.
