Loading
Salesforce now sends email only from verified domains. Read More
Explore Legacy Service Features
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Block Sensitive Data in Chats

          Block Sensitive Data in Chats

          Sensitive data rules let you block specific patterns, such as credit card, Social Security, phone and account numbers, or even profanity. You can choose to remove the text or replace it with your preferred characters.

          Required Editions

          View supported editions.
          User Permissions Needed
          To create sensitive data rules: Customize Application
          Important
          Important

          Legacy Chat will be retired on February 14, 2026. To avoid service interruptions to your end users, switch to enhanced Chat (formerly Messaging for In-App and Web). Enhanced Chat offers many of the legacy Chat features that you love plus asynchronous conversations that can be picked back up at any time. Learn about migrating in Help and Trailhead.

          1. In Setup, enter Sensitive Data in the Quick Find box, then select Sensitive Data Rules.
          2. Click New or New Sensitive Data Rule.
          3. Write each pattern as a JavaScript regular expression (regex), and choose your preferred settings. The regex is case-sensitive.
          4. Optionally, test your pattern.
            1. Enter some text in the format of the data you want to block, such as 123-45-6789 for a Social Security number.
            2. Preview your results to ensure that the rule is working correctly.
          5. Select the roles for which you want to enforce this rule.
            Note
            Note Rules are enforced on the author. Therefore, if a "don’t show phone number" rule is enforced on the visitor, when visitors enter their phone numbers, agents and supervisors can’t see it.
          6. Set a priority for the rule. Lower numbers are executed first.
          7. Click Save.

          You can block the text from agents, supervisors, customers, or all of these. When a rule is triggered, it logs one or more of these chat transcript events:

          • Sensitive data blocked (Agent)
          • Sensitive data blocked (Supervisor)
          • Sensitive data blocked (Visitor)
          Note
          Note Sensitive data is visible while someone’s typing, but it is masked when the person sends it. So if you want to mask customer information from agents, we recommend disabling Agent Sneak Peek (under Setup | Customize | Chat | Chat Configurations).

          Sensitive data rules apply to the auto-greeting and any quick text that you have enabled. They don’t apply to the agent name or other standard text in the chat window.

           
          Loading
          Salesforce Help | Article