# Managing Context Keys

Context keys are user-specific attributes that enable advanced targeting and segmentation in your AB Tasty feature experiments. They act as the data points passed from your application to AB Tasty to determine how features should behave for different audiences.

This guide shows how to view, create, and organize context keys using the AB Tasty FE\&R interface.

## Where to find context keys

From the **left-hand sidebar**, navigate to: `Feature Experimentation` → `Context keys`

This opens the **Your context keys** screen, listing all configured context keys.

<figure><img src="/files/7Pd3XUtijBIrqT8sUu79" alt=""><figcaption></figcaption></figure>

## Context key table overview

Each context key entry includes the following columns:

| Column          | Description                                                   |
| --------------- | ------------------------------------------------------------- |
| **Name**        | Identifier for the context key (e.g., `user_type`, `browser`) |
| **Type**        | Data type: `STRING`, `BOOLEAN`, or `NUMBER`                   |
| **Description** | Explanation of what the context key represents                |
| **Actions**     | Pencil icon to edit, trash icon to delete                     |

You can also filter the list by type or use the search bar to find specific keys by name or description.

## Creating a new context key

To create a new key:

1. Click the **“Create key”** button at the top right.
2. Fill in the following fields:
   * **Name**: Unique identifier for the key (e.g., `user_is_premium`)
   * **Type**: Select from `STRING`, `BOOLEAN`, or `NUMBER`
   * **Description**: Add a short explanation to help others understand the key’s purpose
3. Save the key.

It will now appear in the list and can be used in targeting rules for flags.

## Editing a context key

To edit a context key:

1. Click the **pencil icon** next to the key you want to update.
2. Modify the name, type, or description as needed.
3. Save your changes.

Note: Changing the type of a context key used in active targeting may affect live campaigns.

## Deleting a context key

To delete a context key:

1. Click the **trash icon** beside the key.
2. Confirm the deletion.

You should only delete keys that are no longer used in production environments or test configurations.

## Filtering and searching context keys

You can use the filters above the list to view only:

* **Boolean**
* **String**
* **Number**

You may also use the **search bar** to quickly locate a specific key by name or description.

### Best practices

* Use **clear, descriptive names** for keys to ensure consistency across teams.
* Add **descriptions** for documentation and easier maintenance.
* **Avoid deleting keys** that are actively used in live feature flags or experiments.
* **Filter by type** when troubleshooting or auditing targeting logic.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.abtasty.com/feature-experimentation-and-rollout/managing-context-keys.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
