> For the complete documentation index, see [llms.txt](https://help.wotnot.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.wotnot.io/build/action-blocks/dynamic-data.md).

# Dynamic data

{% hint style="info" %}
Available on the **PREMIUM** plan and above.
{% endhint %}

For use cases that require the list of options to be fetched from an API call (meaning the list is unique to each visitor), you would use the Dynamic data action block.

Using this block, you can dynamically display list items for,

* Button
* Carousel
* Option (WhatsApp and SMS)
* List (WhatsApp)
* Reply button (WhatsApp)
* File

## Step 1: Store the response in a variable

The API response containing the list items needs to be stored in a variable. You can do this using the [HTTP request action block](/build/integrations/http-request-api.md).

{% hint style="info" %}
Make sure you store the entire payload response in a variable. Do not append anything after the result on the object path to do this.
{% endhint %}

<figure><img src="/files/j8O9tMXWSZIVqY57ACxU" alt=""><figcaption><p>Mapping of response into a variable</p></figcaption></figure>

## Step 2: Setup the Dynamic data action block

Add the 'Dynamic data' action block after the HTTP request action block and configure the details.

#### Data variable

Contains the entire payload response received from the API. In our example, it is the `response` variable.

#### Action block to generate

Choose the action block that you would like to generate. Dynamic data supports the following action blocks,

* Button
* Carousel
* Option (WhatsApp and SMS)
* List (WhatsApp)
* Reply button (WhatsApp)
* File

#### Question

Configure the block for the question i.e. what question is to be shown while displaying the list items.

#### Configuring list items

Depending on which action block you have chosen, you would then map the object paths of the data you want to shown for that action block.&#x20;

For example, if the payload response stored is the following,

```json
[
    {
        "product_id": "123",
        "status": "pending"
    },
    {
        "product_id": "456",
        "status": "delivered"
    },
    {
        "product_id": "798",
        "status": "pending"
    }
]
```

And if we want to render the product\_id from this list as button, we would configure the object path as follows:

`result[*].product_id`

Where \[\*] denotes that we need to display all occurances of the field **product\_id**.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://help.wotnot.io/build/action-blocks/dynamic-data.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
