I am trying to check which Web page the user is and based on the URL of current page, i would like the user to redirect to another page. This check needs to happen in several different tasks.
Hi Babitha,
As such I believe, you can not use std JS ‘window’ object to get the current url from the dialog - script node.
Workaround :
You can actually get the page url by ‘window.location.href’ in your websdk and can pass on to bot by setting it as custom data .
Ex: In your index.html : botOptions.botInfo.customData =[{“currentUrl”:window.location.href}];
And this field can be retrieved from bot in ‘BotUserSession’
I hope this should work.
Regards,
Karthik