Using the bot as a widget, how to have different starting points of the bot on different pages?
First of all, you will need to have different script for all the pages where you want different starting points of your bot.
<script type="text/javascript">
function loadCss()
{var e=document.getElementsByTagName("head")[0],t=document.createElement("link");t.rel="stylesheet",t.type="text/css",t.href="https://app.botbaba.io/resources/content/chatWidget.2.0.css",e.appendChild(t)}function loadScript(e,t)
{loadCss();var a=document.createElement("script");a.type="text/javascript",a.readyState?a.onreadystatechange=function()
{"loaded"!=a.readyState&&"complete"!=a.readyState||(a.onreadystatechange=null,t())}:a.onload=function()
{t()},a.src=e,document.getElementsByTagName("head")[0].appendChild(a)}
window.addEventListener('load', function()
{loadScript("https://app.botbaba.io/resources/minScripts/chatWidget.2.0.js",function(){loadData("xxxxyyyyy/{BOT_NAME}?block={BLOCK_NAME}",false,'',false,false,0,'',true,'right');});})
</script>
<style>.botbaba-chat-frame-container-active{height:500px!important;}</style>
You need to add the block name, to the Widget Script, from where you want to start the flow on a particular page, same as in this feature
loadData(“xxxxyyyyy/{BOT_NAME}?block={BLOCK_NAME}“
Add the different scripts to your pages and you are good to go.