https://discord.gg/botpress logo
Bot Auto Open?
# 🤝help
p
Sorry if this has been addressed elsewhere - still very new here. I'd like to do 2 things with my bot: 1) Have it auto open/pop up after 30 seconds on the site (the chat bubble is in the lower right corner, but does not auto open) 2) Get code to add the bot to the sidebar on a site - I'd like it to be readily available on all pages. TYIA for any support.
w
hi melissa, good afternoon! 1. you can enable "proactive message" in your webchat settings. (see attached) 2. if you want to display it on all pages, you don't need to add it to the sidebar - the best practice is to add the embed on your footer so it's on all pages and doesn't block page loading https://cdn.discordapp.com/attachments/1433862043705937960/1433863382267858995/image.png?ex=69063cd6&is=6904eb56&hm=daf6d8e25c37cc1f1012beb3184dac64ec6f812aa0ae7ed1aac4c68599612317&
p
Thanks for answering the first question. Exactly where is this proactive message? Studio/Settings - I don't see it. Where do I click for this option?
then you just scroll down in the "general" tab
it's not in studio, it's in your dashboard
click the botpress logo on the top left
p
I don't see a botpress logo in the top left. Just my profile photo.
w
can you send a screenshot, please?
w
alright now click lawyer lou
and you'll see configure and webchat on the left sidebar
p
and then? I don't see proactive anywhere
w
scroll down
after clicking "configure"
p
Saw it - blurred out pay as you go.
w
yes that feature requires a paid plan unfortunately
p
lol. well, i'll pay when I see if it works. Right now no one is going to click on it b/c it's just a little message sign buried in the bottom right corner. I test, then pay. Not the reverse.
w
actually, that feature is for sending a little message on top of the bubble, not opening the webchat
i think i can work something out with css
give me a few minutes please
@plain-doctor-72002 you can add a javascript snippet on your website that calls
window.botpress.open()
that opens the webchat bubble
p
how and where to add? TY
w
what website builder are you using?
well doesn't really matter actually
@plain-doctor-72002 just add this snippet right after your botpress embed ends in your website:
Copy code
html
<script>
window.addEventListener('load', () => {
  setTimeout(() => {
    if (window.botpress) {
      window.botpress.open();
    }
  }, 30000);
});
</script>
So it will definitely stand out on your page now! If you do choose to aquire pay as you go!
w
just tested it and it works!!
l
The entire bubble is opened immediately? 😄
w
after 30 seconds in that case
but yes it's opened normally
l
Nice!!!
w
posted it in #tutorials just in case
p
Thank you will go test it out now.
Worked Great - Thank You!
w
you're welcome!! feel free to ask for anything else you need help with
c
Can you set this to a certain page, for example on a contact us page
w
sure you can just put that snippet in the specific page
instead of the header or footer