little-magazine-52744
06/07/2025, 3:02 PMripe-oxygen-99033
06/07/2025, 8:46 AMbright-arm-28545
06/06/2025, 9:12 PMbreezy-exabyte-30591
06/06/2025, 6:38 PMgorgeous-forest-752
06/06/2025, 5:57 PMjs
const {dVer, dMod} = event.payload.payload // references the event payload values just fine verified through console log
workflow.dVer = dVer
workflow.dMod = dMod
I've tried to also set them to conversation-wide scope as well, and still to the same effect: the text cards immediately chained to the execute_code card picks up on the variables stored in conversation or workflow, but is not reflected in the studio UI in the variable tab.
On a side note, when the bot loops back to a node that attempts to access workflow.dVer
or workflow.dMod
, the same text card that was able to read the values with no issue now present blank spaces where the passed in values would be.
Thanks again in advance!loud-rocket-51854
06/06/2025, 3:57 PMicy-salesclerk-58319
06/06/2025, 3:28 PMwooden-beard-40210
06/06/2025, 2:58 PMadventurous-plumber-81158
06/06/2025, 12:43 PMbright-wall-97686
06/06/2025, 10:06 AMbright-wall-97686
06/06/2025, 10:06 AMbright-printer-40954
06/05/2025, 9:53 PMbillowy-electrician-32883
06/05/2025, 7:57 PMbrash-greece-44635
06/05/2025, 6:13 PMearly-zebra-570
06/05/2025, 3:35 PMfresh-motherboard-89246
06/05/2025, 3:05 PMabundant-arm-88602
06/05/2025, 2:01 PMincalculable-barista-24878
06/05/2025, 1:13 PMlittle-magazine-52744
06/05/2025, 7:41 AMlittle-magazine-52744
06/05/2025, 7:39 AMcrooked-xylophone-42186
06/05/2025, 7:19 AMorange-flower-53833
06/05/2025, 3:18 AMmammoth-journalist-66614
06/05/2025, 2:18 AMcreamy-pager-81097
06/04/2025, 11:54 PMgorgeous-forest-752
06/04/2025, 6:07 PMjs
// the lines below were removed
window.botpress.on("webchat:ready", () => {
window.botpress.open();
});
// the line below is added to the end of the script tag below the init call
setTimeout(() => {
window.botpress.open();
}, 1000)
Hi!
I'm trying to set up the bot in a way where the conversation automatically launches upon loading the host link.
Following the embed instructions provided in the HTML div section of the docs (https://botpress.com/docs/webchat/embedding-webchat), the webchat injection doesn't seem to automatically fire off in versions 2.3 and higher, where even if I have window.botpress.toggle()
(or window.botpress.open()
for that matter as well) within the window.botpress.on(webchat:ready...)
snippet, it still seems to only start the conversation when I click on the .bpFab
widget.
I am able to get the conversation to automatically open when using versions 2.2 or lower, but am concerned about functionality issues by using an older version of the injection. Just wondering if there was a way to get the window to automatically toggle on for 2.5 (or if I'm not really losing anything by using the 2.2 version)?
For reference here is the .html file in question below:
html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>The Title</title>
</head>
<body>
<div id="webchat-container" style="position: relative; width: 100%; height: 100%;">
<script src="https://cdn.botpress.cloud/webchat/v2.5/inject.js"></script>
<script>
console.log("Step 1") // This is logged in console
window.botpress.on("webchat:ready", () => {
console.log("Step 2") // Does not log in console unreachable?
// window.botpress.open();
window.botpress.toggle(); // both lines seem to not fire off on load for 2.3, 2.4, 2.5
console.log("Step 3") // Does not log in console either
});
window.botpress.init({
"bot init info here"
});
</script>
<style>
#webchat-container {
position: relative;
width: 100%;
height: 100%;
}
.bpFab {
display: none;
}
.bpWebchat {
position: absolute !important;
top: 0 !important;
left: 0 !important;
right: 0 !important;
bottom: 0 !important;
width: 100% !important;
height: 100% !important;
}
</style>
</div>
</body>
</html>
Thanks in advance!brash-greece-44635
06/04/2025, 3:49 PMbrainy-river-21984
06/04/2025, 2:59 PMfresh-ghost-16400
06/04/2025, 2:03 PMearly-cartoon-84199
06/04/2025, 1:20 PM