AI Engine Help Center

PII masking

How AI Engine replaces personal data with placeholders before a request leaves Salesforce, what is masked, and how to configure it.

PII masking replaces personal data with placeholders such as EMAIL_1 or PHONE_2 before a request is sent to your AI provider. The AI can still reason about the record, and AI Engine puts the real values back into the answer before the user sees it. This article is for admins who configure AI Engine and for reviewers who need to know exactly what is masked.

Turn masking on or off#

Masking is controlled by the Allow PII toggle in the Org Profile (Ai Agent Admin Setup tab → Org Profile → open your profile).

  • Allow PII off (the default): masking is on.
  • Allow PII on: nothing is masked, and web-search features may also include a person's details (see below).

Keep Allow PII off unless you have a specific reason and your data protection policy allows it.

What is masked#

When masking is on, AI Engine masks in three ways:

Layer What it catches Placeholder
Field type Every Salesforce field of type Email, Phone or Address (compound address fields), in any format and any country EMAIL_n, PHONE_n, ADDRESS_n
Fields you mark Fields marked Mask as PII in Agent Objects → Fields, and the API names listed under Custom PII fields in the Org Profile (for example National_ID__c, Tax_ID__c). Also applied to child records. CUSTOM_n
Patterns in text Found anywhere in the request text, including descriptions, notes, email bodies and prompts: email addresses, IBANs, US Social Security numbers in the 123-45-6789 format, and payment card numbers (13–19 digits that pass the standard card checksum) EMAIL_n, IBAN_n, SSN_n, CARD_n

Masking applies to the chat, record actions, Meet Prep, AI scoring, prompt templates and their data sources.

How placeholders work#

  • The same value always gets the same placeholder within one request, so the AI can still count, group and compare records (for example "3 contacts share EMAIL_2").
  • Empty fields produce no placeholder.
  • The mapping from placeholder to real value exists only in memory while that single request is processed. It is not saved anywhere and is discarded when the request ends.
  • Masking is not encryption. It keeps identifiable values out of the request that goes to the provider.

What is not masked#

Masking covers the categories above. Other data in the fields you enable is sent as it is, for example people's names, job titles, company names and other business information. In particular:

  • Phone numbers typed into free text (a description or a note) are not detected by pattern. Phone numbers in Phone-type fields are masked.
  • Personal data in plain text fields, such as a national ID stored in a text field, or separate street and city fields, is masked only if you mark the field as PII or list it under Custom PII fields.

Choose the fields you enable in Agent Objects with this in mind.

Web search and photos#

Web search needs real names to work, so placeholders cannot be used there. Instead, AI Engine decides which facts are sent at all:

  • Web Check sends the company name, website, city, country and industry. A person's name, title, email address and phone number are included only when Allow PII is on.
  • Verify Company On The Web sends the company name, email domain and website. On a Lead, the person's name and title are included only when Allow PII is on. It never sends the email address or phone number; it uses only the email domain.
  • Company News sends the company name.
  • The text patterns above (email addresses, IBANs, SSNs, card numbers) are still removed from web-search requests when masking is on.

Magic Snap sends the photo itself, which cannot be masked: a business card shows a name, phone number and address as an image. The note typed alongside the photo is checked for the text patterns above.

Configure masking#

  1. Open the Ai Agent Admin Setup tab and go to Agent Objects.
  2. Click an object in the list and open the Fields subtab.
  3. For each selected field that holds personal data and is not an Email, Phone or Address field, click Mask as PII next to it. The badge changes to PII. (The badge appears only on fields that are selected.)
  4. Click Save. Repeat steps 2–4 for each object.
  5. Go to Org Profile and open your profile.
  6. In Custom PII fields, add the API names of any further personal-data fields, separated by commas.
  7. Check that Allow PII is off, then click Save.

Email, Phone and Address fields do not need to be marked; they are masked by type.

Troubleshooting#

The answer shows a placeholder such as EMAIL_1 instead of a value. The AI rephrased the placeholder, so it could not be matched back to the real value. Ask again, or look up the value on the record.

The AI can't use details inside an email address or phone number, such as the domain or the country code. With masking on, the AI sees only the placeholder, not the value. Tables and cards still show real values, because they are built from Salesforce directly.

Still stuck? Ask AI, or email contact@cloudconnected.pl with the exact error message, the page or action you used and roughly when it happened.