Facing issue while generating dynamic Quick Replay

I am trying to generate dynamic quick reply for data coming from API or database

@Vijay_Ramachandra_Ka

Please share more information for someone to help you out further

  • Which channel are you testing on
  • What does the API response look like
  • What does your code look like
  • Have you set the right variables

These are some great places to start

I am working on web. I have created test function in that added object data present in document to pass to the Quick Reply have used object variable to store function response

function response:

{
“title”: [
“Select an option”,
“Pick an option”
],
“options”: [
{
“text”: “cold drink”,
“title”: “Cold Drink”,
“advancedSettings”: true,
“aliases”: [
“coke”,
“soft drink”
],
“url”: “https://www.tasty-food.com”,
“postback”: “post-back”,
“image”: “https://cdn.abc.com/coke-img.jpeg”,
“textColor”: “#4384f5”,
“backgroundColor”: “#FFFF”,
“id”: “quick_01d78e38b44e1915”,
“analytics”: {
“aevent”: “test-analytics”
}
},
{
“text”: “”,
“title”: “Btn #2”,
“advancedSettings”: false,
“id”: “quick_d9eda393404266d4”
},
{
“text”: “”,
“title”: “Btn #3”,
“advancedSettings”: false,
“id”: “quick_39563a54f6889f4d”
}
]
}

Convert API response button text in an aray form and resolve as object
with:

{
    title: 'Some Title',
    options: [{title: 'option1', text: 'text1'}, {title: 'option2', text: 'text2'}]
}