I am using web sdk to setup bot in my website. I was able to generate custom template with a new name. I modified the JavaScript object in Kore.ai. After changing the name I cannot test in the bot emulator available in the kore.ai.
I am new to this platform and need support to get this working on emulator as well. Is there any way to publish my template on to the Kore.ai.
var info = [“Custom Button1”, “Custom Button2”, “Custom Button3”];
var message = {
“type”: “template”,
“payload”: {
“template_type”: “customButton”,
“text”: “Custom Button Template”,
“subText”: “Button Template Description”,
“buttons”: []
}
};
for (i = 0; i < info.length; i++) {
// if the button is to send back text to platform
var button = {
“type”: “postback”,
“title”: info[i],
“payload”: “payload1”
};
/* Uncomment this if the button is to redirect to url
var button = {
"type":"web_url", // type can be "postback" if
"url":"URL_TO_REDIRECT",
"title":buttons[i]
};
*/
message.payload.buttons.push(button);
}
print(JSON.stringify(message));