---
schema_version: "1"
id: ca00aa586d05c0b00ad4a794b8688365ae2a14df68dc8e6814b8465bcf398525
title: LiveChatSensitiveDataRule
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_livechatsensitivedatarule.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_livechatsensitivedatarule.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: c392718f81d6c2a01a9b9504bbf85f18f858838c4965c7fafa25a7f74e97322e
description: Represents a rule for masking or deleting data of a specified pattern. Written as a regular expression (regex).
---
# LiveChatSensitiveDataRule

Represents a rule for masking or deleting data of a specified pattern. Written as a regular expression (regex).

Use this object to mask or delete data of specified patterns, such as credit card, social security, phone and account numbers, or even profanity. This type extends the [Metadata](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/metadata.htm "The base class for all metadata types. You can’t edit this object. A component is an instance of a metadata type.") metadata type and inherits its fullName field.

## File Suffix and Directory Location

LiveChatSensitiveDataRule components have the suffix .liveChatSensitiveDataRule and are stored in the liveChatSensitiveDataRule folder.

## Version

LiveChatSensitiveDataRule components are available in API version 35.0 and later.

## Fields

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d642404e98">Field Name</th>

              <th class="featureTableHeader  " id="d642404e101">Field Type</th>

              <th class="featureTableHeader  " id="d642404e104">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d642404e98" data-title="Field Name"><span class="keyword parmname">actionType</span></td>

              <td class="entry" headers="d642404e101" data-title="Field Type">SensitiveDataActionType (<a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title">enumeration</a> of type
                string)</td>

              <td class="entry" headers="d642404e104" data-title="Description">Required. The action to take on the text when the sensitive data rule is
                triggered. Possbile values are:<ul class="ul bulletList">
                  <li class="li"><samp class="codeph nolang">Remove</samp></li>

                  <li class="li"><samp class="codeph nolang">Replace</samp></li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d642404e98" data-title="Field Name"><span class="keyword parmname">description</span></td>

              <td class="entry" headers="d642404e101" data-title="Field Type">string</td>

              <td class="entry" headers="d642404e104" data-title="Description">The description of the sensitive data rule—for example, “Block social security
                numbers.”</td>

            </tr>

            <tr>
              <td class="entry" headers="d642404e98" data-title="Field Name"><span class="keyword parmname">enforceOn</span></td>

              <td class="entry" headers="d642404e101" data-title="Field Type">int</td>

              <td class="entry" headers="d642404e104" data-title="Description">Required. Determines the roles on which the rule is enforced. The value is
                determined using bitwise OR operation. There are seven possible values:<ol class="ol enumList">
                  <li class="li">Rule enforced on Agent</li>

                  <li class="li">Rule enforced on Visitor</li>

                  <li class="li">Rule enforced on Agent and Visitor</li>

                  <li class="li">Rule enforced on Supervisor</li>

                  <li class="li">Rule enforced on Agent and Supervisor</li>

                  <li class="li">Rule enforced on Visitor and Supervisor</li>

                  <li class="li">Rule enforced on Agent, Visitor, and Supervisor</li>

                </ol>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d642404e98" data-title="Field Name"><span class="keyword parmname">isEnabled</span></td>

              <td class="entry" headers="d642404e101" data-title="Field Type">boolean</td>

              <td class="entry" headers="d642404e104" data-title="Description">Required. Specifies whether a sensitive data rule is active (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>). Default value (if none is provided) is <samp class="codeph nolang">false</samp>.</td>

            </tr>

            <tr>
              <td class="entry" headers="d642404e98" data-title="Field Name"><span class="keyword parmname">pattern</span></td>

              <td class="entry" headers="d642404e101" data-title="Field Type">string</td>

              <td class="entry" headers="d642404e104" data-title="Description">Required. The pattern of text blocked by the rule. Written as a JavaScript
                regular expression (regex).</td>

            </tr>

            <tr>
              <td class="entry" headers="d642404e98" data-title="Field Name"><span class="keyword parmname">replacement</span></td>

              <td class="entry" headers="d642404e101" data-title="Field Type">string</td>

              <td class="entry" headers="d642404e104" data-title="Description">The string of characters that replaces the blocked text (if
                <span class="keyword parmname">ActionType</span>
                <kbd class="ph userinput">Replace</kbd> is selected).
              </td>

            </tr>

          </tbody>

        </table>

## Declarative Metadata Sample Definition

The following is an example of a LiveChatSensitiveDataRule component.

<LiveChatSensitiveDataRule xmlns="http://soap.sforce.com/2006/04/metadata">
    <actionType\>REPLACE</actionType\>
    <enforceOn\>7</enforceOn\> 
    <isEnabled\>true</isEnabled\> 
    <pattern\>\[aeiou\]</pattern\> 
    <replacement\>œ</replacement\>
</LiveChatSensitiveDataRule\>

The following is an example package.xml that references the previous definition.

<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <!-- To be used from support.liveagent.testsuite.unifiedouting.testDeployButtonMDAPIWithExistingQueue -->
    <apiAccessLevel\>Unrestricted</apiAccessLevel\>

    <types\>        
        <members\>Change\_For\_all</members\>    
        <name\>LiveChatSensitiveDataRule</name\>
    </types\>

    <version\>35.0</version\>
</Package\>

## Wildcard Support in the Manifest File

This metadata type supports the wildcard character \* (asterisk) in the package.xml manifest file. For information about using the manifest file, see [Deploying and Retrieving Metadata with the Zip File](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/file_based_zip_file.htm).