GDPR Masking

Prev Next

If you want to mask personal data when it reaches agents, you can add regular expression (regex) rules to the channels.

You can examine some example messages that a user might send below:

/ / User is sending an IBAN

John Doe, BA1234567890123456789 is my IBAN.

// After masking:

John Doe, ** is my IBAN.

// User is sending a their ID number. 

My ID number is 1234567890.

// After masking:

My ID number is **.

// User is sending both an ID number and a phone number 

My ID is 1234567890, and my phone is +655455455454.

// After masking:

My ID is **, and my phone is **.

Please note that the examples given above are all used as examples and they were typed randomly.

If you add regex patterns, you can mask such personal information. To add masking to a channel, follow the steps below:

  1. Navigate to the channel where you want to add masking in the Channels section.
  2. Click the lock icon next to the channel in the list. 
  3. In the pop-up window, you will see IBAN and Email regex values. You can activate the toggles in the Status field.
  4. Click the Save button. 

If you want to add a new regex pattern, other than IBAN and email, follow the steps below:

  1. Click the plus (+) button. 
  2. In the Name field, describe your regex pattern, indicating what it filters (For example, "Turkish Phone Number").
  3. In the Regex field, enter the regex pattern you want (For example, "(?:\+90.?5|0090.?5|905|0?5)(?:[01345][0-9])\s? (?:[0-9]{3})\s?(?:[0-9]{2})\s?(?:[0-9]{2})"). 
  4. Click the Save button, and the window will close, displaying your entry in the list.
  5. To activate it, enable the toggles in the Status field.
  6. Click the Save button. 

In the example above, you can see a regular expression (regex) pattern to mask Turkish phone numbers. 


Be aware that users might send variations of messages, and you might need to add additional regex patterns or improve your existing ones to handle such cases.

You can also take a look at these examples of regex patterns below:

// Credit card

([0-9]{4})\\\\s?([0-9]{4})\\\\s?([0-9]{4})\\\\s?([0-9]{4})

// ID number

[1-9]{1}[0-9]{9}[02468]{1}

// Visa credit card

4[0-9]{12}(?:[0-9]{3})?

// American Express 

3[47][0-9]{13}

//TR IBAN

\bTR\d{2}\s\d{4}\s\d{4}\s\d{4}\s\d{4}\s\d{4}\s\d{2}\b

//Saudi Arabian

\bSA\d{2}\s*\d{4}\s*\d{4}\s*\d{4}\s*\d{4}\s*\d{0,18}\b

//German

\bDE\d{2}\s*\d{4}\s*\d{4}\s*\d{4}\s*\d{4}\s*\d{4}\s*\d{0,2}\b