# Manage Data Retention of your Flow

For the purpose of giving you additional control over your data management, FlowBuilder offers a *Data Retention* feature - the ability to control how long you wish to keep logs data stored.

#### Table of contents <a href="#id-01g1gfm7g9ps9nej6fk50ra187" id="id-01g1gfm7g9ps9nej6fk50ra187"></a>

[Before getting started](#h_01G1GESZHAHN77945R03RV1NA9)

[The Data Retention feature](#01G4WDR2917JNBGS37WEFA805S)

* [Settings](#01G4WM0DN6M2XEP9F8QPY8Q2QD)
* [Have in mind](#01G4WM11SXTV5CSM2D0MWPQ1F9)

#### Before getting started <a href="#h_01g1geszhahn77945r03rv1na9" id="h_01g1geszhahn77945r03rv1na9"></a>

You will need:

* A [MessageBird account](https://dashboard.messagebird.com/)

#### The Data Retention feature <a href="#id-01g4wdr2917jnbgs37wefa805s" id="id-01g4wdr2917jnbgs37wefa805s"></a>

Data retention defines the policies of persistent data management for meeting the requirements that your business may need regarding the retention of confidential or personal information of your customers.

<figure><img src="/files/xEQvsEHsl6whBOKhMij1" alt=""><figcaption></figcaption></figure>

In the context of FlowBuilder, the *Data Retention* feature enables you to specify for how long you would like to keep your invocation log data stored. Invocation is a term describing each unique end-users journey through your Flow.

**Settings**

The setting of the feature can be accessed from the [main FlowBuilder menu](https://dashboard.messagebird.com/en/flow-builder):

<figure><img src="/files/0zSfdv8y2J8o7hEfumf6" alt=""><figcaption></figcaption></figure>

or in the selected Flow itself:

<figure><img src="/files/reuJ3Lti5g8YsartOCrL" alt=""><figcaption></figcaption></figure>

The **data included** under the *Data Retention* feature is:

* end-users' phone numbers
* end-users' email addresses
* invocation success/failure details
* variables data

The **periods** that you can select are:

* 7 days
* 30 days
* 90 days
* 180 days

**Have in mind**

❗️A couple of things you should have in mind when using the feature:<br>

* It can take up to 6 hours to see that the data has been deleted. If you notice it's taking longer than that, please don't hesitate to reach out to [Support](https://support.messagebird.com/hc/en-us/requests/new).
* Once data is deleted, it is not possible to restore it.
* The standard *Data Retention* period applied, if you do not modify it yourself, is 6 months (180 days). After 6 months, the entire invocation is deleted, including the above-mentioned data.
* *Data Retention* is set on a per Flow basis, meaning you should modify it individually for each Flow you use.
* There are certain data exceptions that will remain kept for 180 days, even if a custom retention period is applied. This data does not include any sensitive information and remains kept to be used mostly for troubleshooting purposes if need be.\
  The exceptions are the following variables:
  * **channelId**: *Defines which Channel has been used by a specific flow invocation (i.e. WhatsApp, Instagram, etc)*
  * **invocationId**: *Unique identifier of invocation*
  * **flowRevisionId**: *Unique identifier of a flow revision that has been used during a specific invocation*
  * ***MessageBirdOr*****iginFlowId**: *Unique identifier of a flow that invoked flow via Webhook*
  * **MessageBirdOriginInvocationId**: *Unique identifier of a flow invocation that invoked flow via Webhook*

📤  Feel free to [contact our Support](https://support.messagebird.com/hc/en-us/requests/new) in case you might need some help!


---

# 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.bird.com/connectivity-platform/build-and-manage-a-flow/manage-data-retention-of-your-flow.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.
