Dynamic Button for the data from API

Hi all, I have done an API get call then I want use the field1 as a button and field2 as msg in my button template
If there is no field one then I can able to see the message but if I have button then I am getting the JSON in my chat where I am not using any custom templets in front end side.

How to achive this?

Hello Shiva Kumar,

Welcome to Kore.ai Community.

Check the API Response and ensure that the API response is properly formatted and contains the fields field1 and field2.
Please Use Conditional Logic in the Dialog Task

Then In the dialog task, use a script node or message node with conditional logic to check if field1 is present.

If field1 is present, create a button template using field1 as the button and field2 as the message.
If field1 is not present, display only the message (field2).

Then Define Button Template in the Dialog
When defining the button template, ensure that the bot platform is correctly parsing the JSON to render the button.

Then please test the Output.
Please Test the dialog flow by triggering the API call and checking if the bot displays the message and button as expected.

Hope this helps.

Thank you,
Srujan Madderla