---
schema_version: "1"
id: 7442f0d87ec91bbc4c86f6d317d50803dc34249eee7e32e195c2d5841994f538
title: Block Sensitive Data in Messaging Sessions and Voice Call Transcripts
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/service/264-0-0/messaging_block_sensitive_data.md
canonical_url: https://help.salesforce.com/s/articleView?id=service.messaging_block_sensitive_data.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: a0f843f98e598d70dfbb25eb30eadf4ba067e8546475a6cb7f00473221a6fa7b
description: Create sensitive data rules to block specific patterns, such as credit card numbers or profanity, in Enhanced Messaging sessions, Enhanced Chat, and voice call transcripts. You can remove the text or replace it with your preferred characters. This method, also known as data masking, helps protect your customers’ data.
products:
  - Service Cloud
release: "264"
---
# Block Sensitive Data in Messaging Sessions and Voice Call Transcripts

Create sensitive data rules to block specific patterns, such as credit card numbers or profanity, in Enhanced Messaging sessions, Enhanced Chat, and voice call transcripts. You can remove the text or replace it with your preferred characters. This method, also known as data masking, helps protect your customers’ data.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <tbody>
          <tr class="">
            <td class="slds-cell-wrap" colspan="2" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=service.voice_editions.htm&amp;type=5&amp;language=en_US" target="_blank">View supported editions for Voice</a>.</td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" colspan="2" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=service.messaging_editions.htm&amp;type=5&amp;language=en_US" target="_blank">View supported editions for
                Messaging</a>.</td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;"><a name="messaging_block_sensitive_data__image_m1z_bx1_scc"><!-- --></a><span style="vertical-align:text-bottom;display:inline-block;"><img style="margin-bottom:0;" id="messaging_block_sensitive_data__image_m1z_bx1_scc" src="https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support-264-0-0-production-enus/dd14551c-a772-4db6-9a1d-d84df8df2980/resources-global/_corporate/images/checkmark.png" alt="checkmark"></span><strong>This article applies to:</strong></td>

            <td class="slds-cell-wrap" style="vertical-align:top;">Voice, Enhanced In-App Chat, Enhanced Web Chat, Enhanced WhatsApp, Enhanced
              Facebook Messenger, Enhanced SMS, Enhanced Apple Messages for Business, Enhanced
              LINE, and Bring Your Own Channel</td>

          </tr>
        </tbody>
      </table> <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d166560e85">User Permissions
              Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d166560e85 ">To create sensitive data rules:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d166560e85 ">
              <p>Customize Application</p>
              <p style="margin-bottom:0;">AND</p>
              <p style="margin-bottom:0;">System Administrator</p>
            </td>

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

Sensitive data rules apply to all plain text sent in a messaging session or spoken on a voice call, including quick text. They don’t apply to whispered messages, messaging components, text in attached files, the service rep name, or any other standard text that’s visible in the messaging window.

1. In Setup, enter Sensitive Data in the Quick Find box.
2. To create rules for Enhanced Messaging channels, Enhanced Chat, and Voice transcripts, select the page named **Sensitive Data Rules for Enhanced Channels**.
3. Click **New** or **New Sensitive Data Rule**.
4. Enter a name and description, and select **Active** to start enforcing your rule when you save it.
5. Enter the text pattern or patterns that you want to hide. Write each pattern as a JavaScript regular expression (regex), and select your preferred settings. The regex is case-sensitive.
6. Select whether to remove or replace the text pattern when it’s detected. If you choose to replace it, enter your replacement text.
7. Expand the preview section to test your rule.
    1. Enter text in the format of the data that you want to hide, such as 123-45-6789 for a Social Security number.
    2. Verify that the text is removed or replaced in the preview.
8. Move one or more roles to the selected column to enforce the rule on messages sent or words spoken by that role. For example, to hide data with these patterns in messages sent by customers, move **Visitors** to the Selected Roles column.
9. Assign a priority to the rule, such as 0 or 1. Rules with lower numbers are enforced first.
10. Save your rule.
    
    ![Sample sensitive data rule for Social Security numbers](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support-264-0-0-production-enus/dd14551c-a772-4db6-9a1d-d84df8df2980/support/images/data/messaging_sdr.png)
11. When you’re ready to start enforcing your active rules, turn on the Sensitive Data Rules setting at the top of the page.
    
    When this setting is on, all active data rules shown on the Sensitive Data Rules for Enhanced Messaging page are enforced. When this setting is off, they aren’t enforced, but you can still create and activate rules on that page.

When sensitive data is detected in a messaging session or voice transcript, one or more of these conversation transcript events is logged:

- Sensitive data blocked (Agent)—Sensitive text sent by the service rep or a bot was hidden.
- Sensitive data blocked (Supervisor)—Sensitive text sent by the supervisor was hidden.
- Sensitive data blocked (Visitor)—Sensitive text sent by the customer was hidden.

After a rule is activated, it’s automatically enforced on the selected roles in all future voice calls, Enhanced Messaging sessions, and Enhanced Chat sessions. It’s not possible to enforce it selectively—for example, to enforce it for Voice only. You can have up to 10 active sensitive data rules at a time.

Rules are enforced in real time, and sensitive text is hidden both for reps and in the transcripts stored in the database. If you create or update a sensitive data rule, your changes take effect within 1 hour. Sensitive data isn’t redacted in Voice recordings; only in transcripts.