https://discord.gg/botpress logo
I'm creating a bot with Botpress and I have very l...
# 🤝help
c
I'm creating a bot with Botpress and I have very limited development knowledge. Here's my requirement: I'm going to create a flow with several branches. Before any user interaction with the bot, I need the bot to retrieve the user's URL and process this information to determine: 1) The correct branch: the starting node of the conversation depends on the URL where the user is located and the time of year. The bot will also need to retrieve the "disp_choice," "intro," and "link" information, which also depends on the URL/time of year. Example: if the user is on www.site1/product1/* between January 1 and February 15 of each year, then the starting node is "Product," disp_choice = "product1," intro = "Evaluate product1," and link = "www.quiz.com/product1." 2) Whether the bot window should open automatically or not: For certain URL/time period pairs, I need the bot to prompt the user by automatically opening its window. The bot window will only open automatically if the user hasn't interacted with the bot in the last 7 days. I will need to change the URL/time period pairs; these elements should not be included in the script injected into the platforms so as not to have to redeploy the script each time. Is this possible with Botpress?
p
Can you specify what you mean by user URL? You can absolutely pass data from your website to the bot as detailed here:https://botpress.com/docs/webchat/interact/send-custom-events/to-webchat You can choose whether you send both the date and the url to the bot and identify the next step within your workflow or manipulate the information in your website's code and send the result to your bot.
c
Thanks for your reply. This is the URL of the page the user is viewing (and where the bot is located).
5 Views