Hey @alinewaeber ,
Just a quick clarification. The
event variable that is a passed as an argument to the
function(event) is not a Botpress event. Rather, it is a
MessageEvent instance that is sent from the Webchat iframe to the parent page.
For that reason, the
event variable does not have a
session field. In other words,
event.session will be
In order to pass memory variables to the Webchat’s parent page, you can use the
channel-web/sendDataToChat action. This action can take any variable from the session’s memory and push it upwards to the Webchat’s parent page.
Here is how to find this action from the Botpress Studio:
Then, you can configure which memory variable to send to the Webchat’s parent page. Here, I send the
For reference, here is the code of Webchat parent page:
An here, you can see that the value of
someValue) is printed in the browser’s console:
If you need more help with this, send me a direct message and I can show you how to this in more details.