Dynamic data
Dynamically renders a list of options from an API response.
Last updated
Was this helpful?
Dynamically renders a list of options from an API response.
Last updated
Was this helpful?
For use cases where options need to be fetched via an API (unique to each visitor), use the Dynamic Data action block.
It allows you to dynamically display options for:
Button
Carousel
Option (for WhatsApp & SMS)
List (WhatsApp)
Reply Button (WhatsApp)
Use the HTTP Request action block to call your API.
Save the full response in a variable (e.g., response).
Ensure you map the entire payload — do not add any object path after result.
Place the Dynamic Data action block after the HTTP request.
Set the following:
Button
Carousel
Option (WhatsApp & SMS)
List (WhatsApp)
Reply Button (WhatsApp)
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.
For example, if the payload response stored is the following,
products:0:
{
id: 1
title: "Essence Mascara Lash Princess"
description: "The Essence Mascara Lash Princess is a popular mas..."
category: "beauty"
price: 9.99
discountPercentage: 7.17
rating: 4.94
stock: 5
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.