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

Importing Custom Topics


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 Importing Custom Topics

With the Sensitive Data Policy feature, you can import custom topics you want to be flagged when users in your brand are building surveys, when users collect data, and when respondents are providing answers to a survey. This page describes how to format a JSON file to successfully import these topics.

When using a JSON file, the topics you import are always added as new topics, not added onto existing similar ones. For example, if you manually selected Social Security as a topic and then imported a JSON file with a topic called Social Security that had additional key words, you would have two Social Security topics in your Sensitive Data Policy. This does not hurt the tool’s ability to check your brand for privacy violations in any way.

Qtip: This feature is NOT related to Text iQ Topics. Only Brand Administrators have access to this feature.
Attention: Sensitive Data Policy is not available to all brands. Please contact your Account Executive or XM Success Manager if you are interested in gaining access.

Editing the JSON File

editing the JSON file

  1. Enter the name of your first topic.
  2. Enter the keywords. Each should be in quotes and be separated by a comma.
  3. Enter the Regex.
    Qtip: Keywords are used to flag potentially problematic questions, and regexes are used to flag problematic responses. If you would like something to be flagged in both places, you should add keywords and regexes.
  4. Enter an example of this Regex you have defined.
  5. Enter additional Regex, if your topic has more than one possible format.
  6. Name the category the topic belongs to.
  7. Enter the tags for this category. Each should be in quotes and be separated by a comma.
  8. Enter a custom message, if desired.
  9. Separate additional topics by a comma.
  10. Create your second topic, following the format described in steps 1-9.
  11. End your JSON file with a bracket.
Qtip: Pay careful attention to where brackets begin and end! Indenting lines can help you align where brackets open and close.

Formatting a JSON File for Import

This section will go over how to format a JSON file so you can import custom topics into your PII checker.

Below is an example of a completed JSON file, indicating where one custom topic (Social Security Number) ends, and the other (First name) begins.

an example JSON file

File Type and Program

You can create and edit JSON files in any text editor program on your desktop. For example, TextEdit, Sublime Editor, or Notepad++.

To download an example of a JSON file, follow steps 1-6 in the Importing Multiple Custom Topics section. Please do not deviate from the format provided.

Name and Keywords of Topics

These are custom topics – that means you can name them whatever you want! For example, you may want to make sure users on your brand don’t try to collect Social Security Numbers. You could call the topic “Social Security Number.”

The keywords are then how you identify someone is trying to collect a Social Security Number. To flag a question, you might look for the keywords “ssid,” “ssn,” and “social security number.” These keywords are not case sensitive.


  {
    "name": "Social Security Number",
    "keywords": {
      "default": [
        "social security number",
        "ssn",
        "ssid"
      ]
    }

Category and Tags for Topics

Categories are a means of organizing the different topics you’d like Qualtrics to flag. Like names, categories can also be called whatever you want. For example, for the topic “First name,” the category might be “Global,” since this is revealing and private information across the globe, and will apply to users collecting data in any region. In contrast, “Social Security Number” might be categorized as “USPII,” since U.S. implies it’s a U.S. classification system, and PII implying it is very private and protected information.

Tags are to help you search and define a given category. For USPII, the tags may be “US,” “government,” and “ID.”


    "category": "USPII",
    "tags": [
      "US",
      "Government",
      "ID"
    ]

Custom Message

You can define a custom message that appears to your users whenever they try to use flagged keywords in their survey.

If you do not want to include a custom message, you can simply eliminate this field from the file.


    "customKeywordMessage": {
      "message": "this is a custom keyword message"
    }

Regex

Regex (short for “regular expression”) defines parameters for topic values.

Attention: Regex is always evaluated case-insensitively when used here.

For example, think of a question such as, “What is your phone number?” For U.S. phone numbers, we only want answers that contain numbers, and we don’t want it to be more than ten digits long.


    "regexes": {
      "default": [
        {
          "value": "^\\d{3}-\\d{3}-\\d{4}$",
          "examples": [
            "123-456-7890"
          ]
        },
        {
          "value": "^\\d{10}$",
          "examples": [
            "1234567890"
          ]
        }

Qualtrics Support is unable to advise on regex, since it is technically custom coding. However, you can check out these resources for more help:

Example of Complete JSON File

[
  {
    "name": "Social Security Number",
    "keywords": {
      "default": [
        "social security number",
        "ssn",
        "ssid"
      ]
    },
    "regexes": {
      "default": [
        {
          "value": "^\\d{3}-\\d{2}-\\d{4}$",
          "examples": [
            "123-45-6789"
          ]
        },
        {
          "value": "^\\d{9}$",
          "examples": [
            "123456789"
          ]
        }
      ]
    },
    "category": "USPII",
    "tags": [
      "US",
      "Government",
      "ID"
    ],
    "customKeywordMessage": {
      "message": "this is a custom keyword message"
    }
  },
  {
    "name": "First name",
    "keywords": {
      "default": [
        "first name"
      ]
    },
    "regexes": {
      "default": [
        {
          "value": "/first name/i",
          "examples": [
            "first name"
          ]
        }
      ]
    },
    "category": "Global",
    "tags": []
  }
]

Importing Multiple Custom Topics

  1. Go to the Admin page.
    Choosing admin from the top-level navigation in the top-left of every page of the website
  2. Select the Data Privacy tab.
    Going to the data privacy tab
  3. Go to the Sensitive Data Policy section.
  4. Click Add Topics.
  5. Click Import topics file.
  6. Click Example to download an example json file.
    Import window
  7. Format your JSON file following the directions on this page.
  8. Click Browse to upload your finished JSON.
  9. Click Import.

Adding a Single Custom Topic

  1. Go to the Admin page.
    Choosing admin from the top-level navigation in the top-left of every page of the website
  2. Select the Data Privacy tab.
    Going to the data privacy tab
  3. Go to the Sensitive Data Policy section.
  4. Click Add Topics.
  5. Select New topic.
  6. If desired, add the surveys you want to be exempt from this topic.
    Fields at top of edit custom topic window
  7. Name your topic.
  8. Select a category for this topic.
  9. Add a description. This is optional, but can help clarify what this topic is for to other Brand Admins.
  10. You will need to create a dictionary for detecting sensitive data in survey questions and another dictionary for detecting sensitive data in survey responses. To get started, download the Example.
    further down, under Dictionary Detector section
  11. Edit your JSON to include a list of keywords. Do not worry about regex; that will be the next step.
    Qtip: This JSON formatting is similar to what is explained earlier on the page, but only pertains to one topic and its associated keywords per file, not multiple topics.
    Qtip: If the keywords are the same, you are allowed to prepare just one file for both survey questions and survey responses – but make sure you upload it in both fields!
    An image of what it looks like when fils are uploaded for both detectors
  12. Click Browse to upload your files.
  13. Click Add Expression to add regex.  The left Regular Expression field will contain the regex itself, while the right Examples field allows you to give an example that matches the regex set.
    Shows what dictionary looks like uploaded, as well as regex. Policy Settings at the bottom of the window

    Qtip: Qualtrics Support is unable to advise on regex, since it is technically custom coding. However, you can check out these resources for more help:

    Attention: Regex is always evaluated case-insensitively here.
  14. If you wish for this custom topic to have its sensitive data be redacted from survey builders, select Override Global Policy Settings under the Policy Settings header, then select the next option. Learn more about global and specific topic redaction on Global vs. Topic Redaction.
  15. Click Save.

Qtip: Use the Test this topic section to test random phrases and words for how they flag. This can help you figure out if you set up your custom topic correctly.

Test this Topic field. Blue test button. Red this phrase was not flagged by the system error message