> For the complete documentation index, see [llms.txt](https://docs.teleskope.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.teleskope.ai/specifications/data-elements/custom-data-elements.md).

# Create a Custom Data Element

Custom data elements let you detect organization-specific identifiers and other sensitive values directly from the Teleskope UI.

## Create an element

1. Go to **Settings > Elements and Categories > Data elements**, then select **Create custom element**.
2. In **Details**:
   * Enter a display name. Teleskope generates the internal label and `custom.<label>` URI.
   * Select at least one data category and a sensitivity level.
3. In **Detection**:
   * Add one or more [RE2](https://github.com/google/re2/wiki/Syntax) regular expression patterns.
   * Leave **Requires context** on when a pattern should match only with a related keyword. Turn it off only when the pattern is specific enough to classify on its own.
   * Choose whether to scan all data types or structured data only.
   * **Avoid `^` and `$` anchors.** Scanned content usually contains surrounding text, so patterns anchored to the entire input rarely match. Use boundaries such as `\b` or explicit delimiters instead.
4. In **Context**, add keywords that typically appear near the value. Enable **Case-insensitive matching** if capitalization should not matter.
5. In **Test**, paste sample text and select **Preview classifications**. Review the highlighted matches, match count, and context status, then refine the patterns or keywords as needed.
6. Select **Create**, review the confirmation, and select **Confirm create**.

{% hint style="info" %}
If every pattern requires context, add at least one keyword. Those patterns will not classify without a matching keyword.
{% endhint %}

After you save, Teleskope reloads the scanner rules so the element can be used by subsequent scans.

## Example

To detect a four-digit employee badge number only when the word `badge` is nearby:

* **Display name:** `Employee Badge`
* **Pattern:** `\b\d{4}\b`
* **Requires context:** On
* **Keyword:** `badge`
* **Sample text:** `Employee badge 4821 was issued today.`

The preview highlights `4821` and confirms that the context keyword was found.
