# Data Retention

You can create data retention rules to specify how long a customer's input is stored within Studio. Expiry lengths can vary from immediate to 30 Days, in addition to custom durations depending on your data rules.

A data retention rule can only be set when information is being captured from the customer and stored within either an entity or a variable, this will typically be within a flow.

{% hint style="info" %}
**Terminology -**&#x20;

**Entities** - An entity refers to pre-defined pieces of information that a chatbot extracts to understand and process in order to provide accurate responses and outcomes to a user. Think of an entity as a noun or keyword that the chatbot identifies within a user’s query, for example, if a user asks “What is the weather like in New York?”, the entity is “New York”, which represents the specific location the user is referring to.

**Variables** - A variable can be thought of as a flexible placeholder or container that holds a specific value or information needed to provide accurate and meaningful responses. They are used to remember and track important information that can change or be updated as the conversation progresses.
{% endhint %}

To set data retention rules for your Assistant, click on the Enhanced Features menu item and then the ‘Data Retention’ card. Enter or select from the dropdown the Entity or Variable where the information you wish to set the rule for.

<figure><img src="/files/1cxq9rwjWdFSBGYcYEcm" alt=""><figcaption></figcaption></figure>

Then in the Expiry Period drop-down, select the time period for the information to be held in Studio before being deleted.

If you require a custom time period, select this option and enter the details.

Once you have finished, click on ‘Create Rule’.


---

# 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://humley.gitbook.io/humley-studio/enhance-assistant/data-retention.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.
