Skip to content

How to Hide Customer Personal Data (PII Masking)

Customer personal data protection (PII masking) censors phone numbers, email addresses, national identity numbers (NIK), and custom text patterns from users who do not have permission View customer personal data (contact:view_pii). Payment card numbers (13–19 digits that pass the Luhn check) inside message content are always redacted automatically when an inbound message is received.

  • You are logged in using an account with the settings:write (Admin or Owner) permission.
  • To manage who can view the full data, you have the team:manage_roles in Settings › Users › Roles & Permissions (/settings/roles).
  1. Open security settings

    Open Settings › Security › Security (/settings/security) then find the Mask customer personal data.

  2. Enable personal data redaction

    Turn on the toggle Hide from users without the ‘View customer personal data’ permission. This setting is disabled by default.

  3. Select the full data display mode

    In the Who sees unmasked data, select one of the options:

    • By permission (default): Users with View customer personal data (contact:view_pii) permission can directly view phone numbers, emails, and ID numbers in full.
    • Reveal on click (audited): All users see the data masked by default. Users who have the contact:view_pii permission can click Display on a message or contact, and every click is logged in Audit Log (pii.revealed).
  4. Enable message text masking pattern

    In the section Message text masking patterns, check the default patterns you want masked in message content and snippets:

    • Bank account numbers (10–15 digits)
    • Indonesian NIK / KTP (16 digits)
  5. Add custom regex patterns (optional)

    Click Add pattern next to Custom regex patterns (max 10), fill in Label (e.g. Contract number), the regular expression pattern (1–200 characters), and the number of trailing characters that remain visible (0–6, default 4). Test the result in the Live preview.

  6. Save privacy rules

    Click Save privacy rules field. To grant permission to view full data to a specific role, go to Settings › Users › Roles & Permissions, edit the role in the Contact Management, then check View customer personal data (contact:view_pii).

  • Phone number (+62812•••••891), email address (b•••@gmail.com), 16-digit NIK (••••••••••••3456), WhatsApp BSUID (US.••••••••••••3456), and custom attributes of phone/email/NIK type are automatically masked in the conversation list, contact details, call logs, and analytics for users without the contact:view_pii.
  • In Reveal on click (audited), the Display permission to reveal the original value for a single message or contact and records an event pii.revealed in Settings › Security › Audit Log.

Masking rules & channel behavior reference

Section titled “Masking rules & channel behavior reference”
Object / ChannelMasking BehaviorLimits & Conditions
Payment card number (PAN)Always masked when an incoming message is stored (••••1234) across all channels before entering the database.Applies to 13–19 digit sequences that pass the Luhn algorithm (excluding valid 16-digit NIK and phone numbers starting with +).
Contact phone number, email, NIKMasked when the Hide from users without the ‘View customer personal data’ permission toggle is active.Phone numbers keep the prefix and the last 3 digits; email keeps the first character and the domain; NIK keeps the last 4 digits.
Built-in text patternsBank account number (10–15 digits) and Indonesian NIK / KTP (16 digits).Keeps the last 4 digits and ignores Indonesian mobile numbers (+628… / 08…).
Custom regex patternsMaximum of 10 pattern per account (Pola regex khusus (maks. 10)).Label is required (1–60 characters), regex length 1–200 characters, allowed trailing characters 0–6 (default 4).
Show when clicked (Audit Reveal)Requires contact:view_pii and conversation:read.Limited to a maximum of 60 reveals per user per minute. Each action logs pii.revealed in Audit Log.
Export reports & CSV/XLSXFollows the masking status of the user who created the export (pii_masked).Users whose data is masked can only view and download masked export files.
Outgoing webhookSends the phone number and message content as-is to your integration endpoint, except for payment card numbers that were already masked when the message came in.Ensures external systems and bots can still process customer replies.
  • The Show button fails to open data: Make sure your role has the View customer personal data (contact:view_pii) and you have not exceeded the limit of 60 clicks per minute.
  • Custom regex pattern rejected when saving: Make sure the number of patterns is no more than 10, labels do not exceed 60 characters, and the regex syntax is valid (maximum 200 characters).
  • User still sees phone numbers in exported files: Check whether that user has the permission contact:view_pii or whether mode By permission (default) is selected.