Skip to main content
Loading...
Skip to article
  • Qualtrics Platform
    Qualtrics Platform
  • Customer Journey Optimizer
    Customer Journey Optimizer
  • XM Discover
    XM Discover
  • Qualtrics Social Connect
    Qualtrics Social Connect

Data Substitution and Redaction


Was this helpful?


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The feedback you submit here is used only to help improve this page.

That’s great! Thank you for your feedback!

Thank you for your feedback!


About Data Substitution and Redaction

When creating a job in XM Discover, you can set up data substitution and redaction rules. These rules enable you to hide sensitive data or automatically replace certain words and phrases in customer feedback and interactions.

You can set up a job’s data substitution and redaction rules in 2 ways:

  1. When creating the job, one of the steps in the setup will be to set the job’s data substitution and redaction rules.
  2. If the job is already created, you can change the rules using the job options menu.

Preparing Data Substitution and Redaction Files

Data substitution and redaction rules are updated by uploading a TXT file containing the rules. This section covers formatting requirements for these files.

Qtip: You can download template files by clicking the Template button.the template buttons

Substitution Files

You can define substitution rules in a text file using the following format:

  • Each line is a substitution rule.
  • Substitution rules follow the general format “phrase to be replaced” : “phrase to substitute”
  • Substitution rules are case-sensitive.
  • To add a comment, start the line with the # symbol.

Example: This substitution rule contains a comment and will replace some common misspellings of the word “Coronavirus”:

# replace common Coronavirus misspellings
corroded virus: Coronavirus
caronna virus: Coronavirus
crooner virus: Coronavirus

Redaction Files

You can define redaction rules in a text file using the following format:

  • Each line is a redaction rule.
  • A redaction rule consists of a regular expression that defines a data pattern to be masked.
    Qtip: A regular expression is a sequence of characters that define a search pattern. For a brief introduction, please see Microsoft’s .NET Regular Expressions.
  • Negative lookaheads are not supported.
  • To add a comment, start the line with the # symbol.

Example: The following redaction rule contains a comment and will mask all instances of a consecutive group of 3, 2, and 4 digits separated by hyphens:

# mask social security numbers
\d{3}-\d{2}-\d{4}

Attention: Custom coding features are provided as-is and require programming knowledge to implement. Qualtrics Support does not offer assistance or consultation on custom coding. You can always try asking our community of dedicated users instead. If you’d like to know more about our custom coding services, please contact your Qualtrics Account Executive.

Applying Data Substitution and Redaction

Follow the steps in this section to add data substitution and redaction rules to your job:

  1. Decide if you’d like to enable the Exclude leading or trailing white space option which affects how empty spaces are treated in your data substitution and redaction rules. Hover your mouse over the information icon to see an example of how this affects rules.
    choosing the white space option and uploading a substitution file
  2. In the Substitution section, click the Click To Select File For Upload button and choose the data substitution file saved on your computer.
  3. Your rules will appear below. If you need to edit your rules, upload a new file by repeating step 2.
  4. In the Redaction section, click the Click To Select File For Upload button and choose the redaction file saved on your computer.
    uploading a redaction file and clicking test
  5. Your rules will appear below. If you need to edit your rules, upload a new file by repeating step 4.
  6. Click Apply.
  7. Click Test to test your rules.
  8. Enter a sample response in the Input box.
    testing the rules
  9. Click Transform.
  10. The result response will appear in the Output box.

If everything looks correct, click Ok to close the testing window. You can then continue setting up or editing your job.

Editing and Removing Data Substitution and Redaction

You can edit or remove the data substitution and redaction rules for a job:

  1. Select Data Substitution and Redaction from the job options menu.
    choosing data substitution and redaction from the job options menu
  2. To edit existing rules, click the Click To Select File To Upload button and choose the file that contains updated rules.
    editing existing rules
  3. To remove rules entirely, click the Clear button.
  4. Click Apply to apply your rules.
  5. Click Ok.