Skip to main content
Added in 2025.25 (beta)
This feature is in Beta. We encourage you to try it out and provide us with feedback.
The Data Redaction feature provides an easy way to detect and redact any data, including personally identifiable information (PII), to ensure compliant logging and analytics. This feature is important in the context of conversational AI due to privacy, trust, compliance, and responsible AI practices.

Key Benefits

  • Enhanced Data Handling. Ensures data protection during the processing, logging, and storage of conversations containing sensitive data. Compared to data masking, which hides or selectively excludes information at the Endpoint or Flow level (Blind Mode Node), data redaction fully removes the sensitive data from all logs and analytics for stronger data protection.
  • Easy Configuration. Includes a set of default data types you can select to redact, such as credit card numbers or email addresses.
  • Customization. Lets you add custom data types to redact. You can use regular expressions (regex) to define patterns for custom data types to detect.

Restrictions

  • Data redaction doesn’t work for patterns detected by Slots. If you want to redact these patterns, you need to disable Slots at the Flow or the Project level. If you use Regex Slots, you need to remove the Slot Filler that contains the Regex Slot.
  • Data redaction uses regex patterns to detect and redact data, which can:
    • Cause false positives.
    • Skip patterns that don’t match the default types or a custom data type you define. For example, if the user enters a phone number with / or misspells a company name set to be redacted in a custom data type.
  • Custom data types support only Google’s RE2 syntax library for regex patterns.

How to Use

To use the data redaction feature, first check the default data types. If none are suitable or if an existing type doesn’t match your data due to its pattern rules, you can create a custom data type.

Default Data Types

The data redaction feature includes the following default data types, covering common forms of PII:
Data TypeDescriptionExamplesRedaction Pattern
Credit Card NumberRedacts 16-digit card numbers starting with 3 (Amex), 4 (Visa), 5 (MasterCard), or 6 (Discover). Digits may be separated by spaces or hyphens. The credit card number redaction is activated by default to protect credit card data and ensure compliance with PCI DSS, GDPR, and CCPA.4111111111111111, 4111 1111 1111 1111, 5555-5555-5555-4444, 3782-822463-10005[CREDIT CARD REDACTED]
Email AddressRedacts email addresses. Must contain a valid local part, an @ symbol, and a valid domain. By default, the email address redaction is deactivated.[email protected], [email protected], [email protected][EMAIL REDACTED]
Phone NumberRedacts phone numbers in U.S. national, U.S. local, or international formats. By default, the phone number redaction is deactivated.(555) 123-4567, +1 (555) 123-4567, 555-123-4567, 5551234567, +491575313119, +447911123456[PHONE REDACTED]
Social Security NumberRedacts 9-digit U.S. Social Security numbers in XXX-XX-XXXX format. By default, the Social Security number redaction is deactivated.123-45-6789, 987-65-4320[SSN REDACTED]
IPv4 AddressRedacts IPv4 addresses in X.X.X.X format, where each octet is 0–255. Supports private ranges. By default, the IPv4 address redaction is deactivated.192.168.1.1, 255.255.255.255, 10.0.0.1[IPv4 REDACTED]
IPv6 AddressRedacts IPv6 addresses, including full, shortened, or loopback (::1) forms. By default, the IPv6 address redaction is deactivated.2001:0db8:85a3:0000:0000:8a2e:0370:7334, ::1, 2001:db8::1, fe80::1[IPv6 REDACTED]
To activate the data redaction for default data types, follow these steps:
  1. In Manage > Settings, go to the Data Redaction Settings section.
  2. Click the subsection of the data type you want to redact and configure the following:
    • Activate Redaction — toggle on to activate the redaction for the data type.
    • Redaction Pattern — select one of the following options:
      • Default — use the default redaction pattern. Each data type has a default redaction pattern, for example, the redaction pattern for credit card numbers is [CREDIT CARD REDACTED].
      • Custom — enter a custom redaction pattern. The custom redaction pattern should be enclosed in square brackets and must not contain spaces or special characters. For example, [PROTECTED_INFO].
  3. Under Scope, select where the data type is redacted:
    • Logs — redact the data type on the Logs page.
    • Analytics — redact the data type in Insights and the Cognigy.AI OData endpoint.

Custom Data Type

If you need to redact data that isn’t included in the default data types, you can add custom data types. To add a custom data type, follow these steps:
  1. In Manage > Settings, click the Data Redaction Settings section to expand it.
  2. At the bottom of the section, click + Custom Data Type and configure the following:
    • Name — enter a unique name.
    • Regex — enter a regular expression to detect the data type pattern.
    • Custom redaction pattern — enter a custom redaction pattern. The custom redaction pattern should be enclosed in square brackets and must not contain spaces or special characters. For example, [PROTECTED_INFO].
  3. Under Scope, select where the data type is redacted:
    • Logs — redact the data type on the Logs page.
    • Analytics — redact the data type in Insights and the Cognigy.AI OData endpoint.

Examples

The following table includes examples of regex patterns and redaction patterns for custom data types.
Custom Data TypeRegexRedaction Pattern
ZIP Code\b\d{5}-\d{4}\b[REDACTED_ZIP_CODE]
German License Plate\b[A-ZÄÖÜ]{1,3}-[A-Z]{1,2}\s\d{1,4}[HE]?\b[REDACTED_DE_LICENSE_PLATE]
US P.O. Box\b(?:P\.?O\.?|POB)\s?Box?\s?\d+\b[REDACTED_US_PO_BOX]

More Information