Data Cleansing
The Data Cleansing section configures sensitive-data processing for each application. Saved settings apply to new messages and files.
Required permissions
Section titled “Required permissions”| Action | Area | Min. access level |
|---|---|---|
| Viewing the page | Applications | Read |
Application policies | Read | |
| Editing the DataClean settings | Applications | Read |
Application policies | Edit | |
| Deleting custom and whitelist patterns | Applications | Read |
Application policies | Full | |
| Editing an application from the header | Applications | Edit |
| Deleting an application from the header | Applications | Full |
| Updating the application profile | Applications | Edit |
Application policies | Edit | |
Protection profiles | Read |
If the user does not have access to view the page, 403 — Access denied is displayed.
Opening the Data Cleansing section
Section titled “Opening the Data Cleansing section”- In the sidebar, select Applications.
- Open the required application by clicking its card or its name, depending on the selected view.
- Hover over the Protection tab.
- Click Data Cleansing.

The page header displays the application’s name, ID, and description (if any). The copy button is available next to the ID. The header also contains the Back to applications link that leads to the Applications section.
Editing the application
Section titled “Editing the application”
- Click
Edit. - Change the required fields.
- Click
Save.
Deleting the application
Section titled “Deleting the application”
- Click
Delete. - Confirm the deletion in the confirmation dialog.
This action cannot be undone. Prior to deletion, please verify that integration traffic has been stopped or redirected and that the associated API tokens are no longer in use.
Profile
Section titled “Profile”If a profile is selected, its name is displayed. If no profile is selected, individual settings are applied. When the application’s protection settings are changed, the application is removed from the profile, and the current settings become individual.
The profile can be updated on the page:
- Click the
Profilebutton. - Select the required profile from the list. The search field helps narrow the list.
- Confirm applying the profile to the application in the confirmation dialog.

Base Patterns
Section titled “Base Patterns”The Base Patterns block contains 22 built-in patterns. They are grouped into subsections, which makes it easier to find the required pattern.
-
Personal data —
Person name,Address,Phone number,Email,Passport details,SNILS,Driver's license; -
Banking secrecy —
Bank card,Card security code,BIC,Correspondent account,Bank account number; -
Organization details —
INN,KPP,OGRN,OGRNIP; -
Technical data —
IP address,Domain name,URL,Access token; -
Other —
License plate,VIN.
The counters show the total number of patterns and how many are enabled for each direction — both across the entire block and within each subsection.
The search works by basic pattern name, is case-insensitive, and matches by partial match.
Each card has two switches: Input checks user requests and Output checks model responses. The information icon opens the pattern description. Please enable only the required directions: this makes processing results predictable and simplifies the analysis of triggers.

Custom patterns
Section titled “Custom patterns”Custom patterns add team-specific regular expressions.

Click Add Custom Pattern and fill out the form:
- Name — the label displayed in the list.
- Pseudonym — the label that replaces the detected value during pseudonymization.
- Description — the pattern description (optional).
- Pattern — a regular expression or another supported pattern expression.
- Direction — Input for user requests or Output for model responses.
- Enable — activates the rule immediately after creation.
- Save — creates the pattern. The × button closes the form without saving.

After saving, input and output checks can be enabled or disabled independently on the pattern card.
The three-dot menu provides edit and delete actions, as well as access to the pattern version history, where previous versions can be viewed and restored.
The counter shows the number of patterns in the section; if there are no custom patterns, No custom patterns yet. Add a pattern to define application-specific data cleansing rules. is displayed.
Version history and restoration
Section titled “Version history and restoration”- Open ⋮ → History / Versions for the custom pattern.
- Find the required version. Each card shows its number, creation date, author, action, and saved settings. Use Load more if the version is not yet displayed.
- Compare the saved settings with the version marked Current Version.
- Click Restore beside the required previous version. The action applies immediately; there is no separate confirmation dialog.
- Wait for the success notification. The dialog closes and the page refreshes. Check the restored settings and test the custom pattern with a sample message.

The current version has a label instead of a Restore button. Restoring requires Application policies → Edit for this application; without that permission, the button is disabled. Closing the history dialog without clicking Restore does not change the settings. Restoration changes the current custom pattern; it does not recalculate previously processed messages.
Whitelist patterns
Section titled “Whitelist patterns”Whitelist patterns define exceptions for values that resemble sensitive data but are valid in your workflow.

Click Add Whitelist Pattern and fill out the form:
- Name — the label displayed in the list.
- Description — the pattern description (optional).
- Pattern — a regular expression or another supported pattern expression.
- Target rule — specifies which base or custom pattern the new pattern is linked to. By default,
Not selectedis displayed in the field. Clicking it opens the dropdown list, where the required pattern can be selected with a click. - Direction — Input for user requests or Output for model responses.
- Enable — activates the rule immediately after creation.
- Save — creates the pattern. The × button closes the form without saving.

After saving, input and output checks can be enabled or disabled independently on the pattern card.
The three-dot menu provides edit and delete actions.
The counter shows the number of patterns in the section; if there are no whitelist patterns, No whitelist patterns yet. Add a pattern to keep trusted values from being cleaned. is displayed.
Processing type
Section titled “Processing type”Input and output can use different types:
- Masking replaces the detected value with
Xcharacters. - Deletion removes the detected value from the text;
- Detection detects matches without changing the text;
- Pseudonymization replaces it with a stable label such as
NAME_1orEMAIL_1.

The selected mode applies only to the directions enabled on the pattern cards. After making changes, check the result in the test block below on the page.
File processing
Section titled “File processing”Incoming files and Outgoing files control text extraction and inspection for user attachments and model-produced files. Detection only means entities are reported without modifying the file.

Inspection depth and source storage
Section titled “Inspection depth and source storage”Message and file inspection depth controls how much context is analyzed. Deeper inspection can improve contextual detection but costs more time and resources.

Source-storage switches retain both original and cleaned messages for comparison in analytics. Enable them only when permitted by your access and retention policies.

Saving file and message-storage settings
Section titled “Saving file and message-storage settings”On the application’s Data Cleansing page, the Incoming files, Outgoing files, and original-message storage switches save automatically. After changing a switch, wait for the success notification; no separate Save click is needed. If saving fails, an error notification appears and these switches return to their previous values.
Closing the page does not undo a successful save. To revert it, switch the setting back and wait for confirmation. These rules describe the application page: in the profile editor, changes are applied through Save settings and the confirmation flow described in Profiles.
Turning off original-message storage affects subsequent processing; it does not delete previously stored messages. The absence of original text in analytics does not by itself mean that the message was never received or checked.
Test data cleaning
Section titled “Test data cleaning”- Enter a sample in Original text.
- Click Clean up.
- Compare Processed text (Input) and Processed text (Output).
- Verify pseudonymized labels, masked values, deleted values, and detected matches.
- Review Detected sensitive data using the Incoming and Outgoing tabs.

The result table shows the entity type, original text, and processed text. Use Customize Columns to select visible columns.

Recommended setup order
Section titled “Recommended setup order”- Enable the required built-in patterns and directions.
- Add custom and whitelist patterns.
- Select message-processing modes.
- Configure files, inspection depth, and source storage.
- Test the configuration.
- Send a test request and verify it in Session analytics.