straight-finland-72182
08/04/2023, 4:59 PMwindow.botpressWebChat.sendPayload({
type: 'text',
text: 'Some random text',
payload: {
'myData': 'awesome'
}
});
The problem here, is that the user sees a message, sent by the bot. We'd like to avoid that.
2nd approach : we tried to do the same using triggers :
window.botpressWebChat.sendEvent({ type:'trigger', myData:"awesome"});
The issue
Once the trigger is executed, we collect the payload & store it in a session variable. But it seems that the bot doesn't recognize that session variable inside our main flow.
Question
Is there a way to store/create some data with a trigger, then persist it and use it later in the main flow ?mysterious-greece-6693
08/04/2023, 5:46 PMstraight-finland-72182
08/07/2023, 10:02 AMwindow.botpressWebChat.sendPayload({
type: 'text',
text: 'Some random text',
payload: {
'myData': 'awesome'
}
});
My website visitor receives the message "Some random text" when he interacts with the bot. Which is normal, but I was wondering if it's possible to not send a message, but still manage to transmit a payload to my bot.mysterious-greece-6693
08/07/2023, 2:33 PM