WotNot Help Center
Create a ticketBook a demoProduct
  • 👋Welcome!
  • 🏁Getting Started
    • Building a chatbot
    • Testing a chatbot
    • Publishing your bot
      • Web
        • Embed chatbots on website
      • WhatsApp
        • Meta
        • 360Dialog
        • Twilio
        • GupShup
        • TechAlpha
      • Instagram
      • Facebook Messenger
      • SMS
      • Mobile app
      • API
    • Utility Tools
    • Contacts
      • Scheduling a Contact Report
      • Exporting a Contact List
      • Blocking contacts
    • Chatbot Appearance
      • Custom CSS
      • Image dimensions
      • Pop-up messages
  • ⚒️Bot builder
    • Action blocks
      • Trigger
      • Send message
      • Collect input
      • Buttons
      • Reply buttons
      • Carousel
      • Agent
      • Answer AI
      • Set AI
      • Send an email
      • List
      • Condition
      • Talk to human
      • Dynamic data
      • Javascript
      • Collect file
      • Form
      • Webhook
      • Flow
      • Jump
      • Options
      • Calendar
      • Delay
      • Codeblock
      • Slider
      • Image gallery
      • Send WhatsApp
      • Send SMS
      • Send Email
      • Send Status
      • WhatsApp flow
      • Catalogue
    • Outbound bots
      • Building One Off Campaign
      • Building Ongoing Campaign
    • Variables
    • Cloning bots
    • Requesting edit access
    • Connecting action blocks
    • Creating a loop
  • ✨AI Studio
    • Building a GPT chatbot
    • Knowledge base
    • Custom Answers
    • Functions
    • Prompts
    • AI credits
    • Refresh frequency
  • 💬Live Chat
    • Overview
    • Building a bot with live chat
    • Creating views
    • Adding labels
    • Saved replies
    • Settings
  • 🔗Integrations
    • Overview
    • HTTP request
    • Ready integrations
      • Google Calendar
      • Google Sheets
      • Google Analytics
        • Using Javascript
      • Salesforce
      • HubSpot
      • Calendly
      • Slack
      • Airtable
      • Zendesk
      • Freshdesk
      • DialogFlow
      • Zoho CRM
    • Events
    • Zapier
    • Public APIs
  • 💬WhatsApp Business API
    • Getting a WhatsApp API
      • Getting WhatsApp API (Old approach)
      • Sandbox WhatsApp API
    • Facebook Business Manager (FBM) Verification
    • Creating a WhatsApp Template
    • Cost
    • Messaging Limits, Quality Rating
    • Official Business Account (Green tick verification)
  • 📊Reporting
    • Overview
    • Chatbot Report
    • Agent Report
    • Outbound Report
    • Link analytics
    • Weekly email report
  • 🛠️Troubleshooting
    • Getting notification for leads
    • JS functions to trigger chat widget
    • Opt-out management
    • Setting up link tracking
    • How do I hard refresh my browser?
    • Cookies
    • Notifications
    • Tracking Facebook Pixel
    • Setting up SSO login
    • Inviting teammates
    • Teams
  • 🧑‍💻Support
    • Creating a ticket
    • Book a demo
    • Purchasing a subscription
    • Cancelling a subscription
    • Refund policy
    • Reset password
    • Deleting account
Powered by GitBook
On this page
  • Step 1: Store the response in a variable
  • Step 2: Setup the Dynamic data action block

Was this helpful?

  1. Bot builder
  2. Action blocks

Dynamic data

Dynamically renders a list of options from an API response.

PreviousTalk to humanNextJavascript

Last updated 11 months ago

Was this helpful?

Available on the PREMIUM plan and above.

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)

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 .

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.

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)

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.

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

[
    {
        "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.

⚒️
HTTP request action block
Mapping of response into a variable