How to Configure Detection Patterns

  1. Select the tab “Detection Patterns”.
  1. Click on the specific Detection Pattern Name.
  1. If you’re already in the Setup, navigate to: Setup > Custom Code > Custom Metadata Types > DetectionPattern > Manage DetectionPattern.

  2. You should see a list of Detection Patterns. Click Edit on the Pattern you wish to configure.

  1. Enter a Pattern.

    • This pattern must be a valid Regular Expression. Try a free tool like this to check whether your regex is valid.
  2. Select Mask Character.

    • Enter any single character you want to mask PII numbers with - the default is an asterix (e.g. AMERICANEXPRESS****) but you could use an X, #, @, or any other single character you need.
  3. Select Mask Type.

    • Full Mask: all characters are masked
    • Last4: all credit card number characters are masked but the last 4 characters (AMERICANEXPRESS****1234)
    • First6andLast4: all credit card number characters are masked but the first 6 and the last 4 characters (AMERICANEXPRESS123456**1234)
  4. If the pattern is for credit card numbers, check the box LuhnCheck.

    • When this box is checked, all numbers matching this pattern will go through a Luhn algorithm check for credit card number validity.
    • If this box is unchecked, all numbers matching this pattern will skip the Luhn algorithm.
  5. Check the box IsActive.

  6. Press Save.

Tip: It is recommended that you only store the minimum amount of credit card digits you need to verify customer accounts.


Did this page help you?