---
schema_version: "1"
id: ffbb5fbfe73b4a293a8420e3f0c59c86809d819ab9097c0500aa7728c1a31d03
title: Block Sensitive Data in a Chat Session
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/service_sdk_ios/live_agent_sensitive_data.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.service_sdk_ios.meta/service_sdk_ios/live_agent_sensitive_data.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 5d070e005e3b2a820a5ddab41f2e9d91f63a19b985a62376d0fcca54497890e2
description: To block sending sensitive data to agents, specify a regular expression in your org's setup. When the regular expression matches text in the user's message, the matched text is replaced with customizable text before it leaves the device.
---
# Block Sensitive Data in a Chat Session

To block sending sensitive data to agents, specify a regular expression in your org's setup. When the regular expression matches text in the user's message, the matched text is replaced with customizable text before it leaves the device.

![Important](https://developer.salesforce.com/docs/atlas.en-us.service_sdk_ios.meta/service_sdk_ios/images/icon_note_important.png)

#### Important

The legacy chat product is scheduled for retirement on February 14, 2026, and is in maintenance mode until then. During this phase, you can continue to use chat, but we no longer recommend that you implement new chat channels. To avoid service interruptions to your customers, migrate to [Messaging for In-App and Web](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5&language=en_US) before that date. Messaging offers many of the [chat features that you](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5&language=en_US) love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1&language=en_US).

To learn more, see [Block Sensitive Data in Chats](https://help.salesforce.com/articleView?id=live_agent_block_sensitive_data.htm&language=en_US).