https://discord.gg/botpress logo
docs and live demo about webchat V2
# 💻developers
c
i have a bot with a custom trigger that receive a payload. On webchat v1 i use this code to send the trigger and it works. Now, I am switching to Webchat v2 but this code doesen't work and i can't find documentation about triggers. window.botpressWebChat.onEvent( function (event) { console.log("New event", event.type); if (event.type === 'LIFECYCLE.LOADED') { window.botpressWebChat.sendEvent({ type: 'show' }); } else if (event.type === 'LIFECYCLE.READY') { window.botpressWebChat.sendPayload({ type: 'trigger', payload: { area: area, schedaProdottoUrl: schedaURL, sku: sku, id : id }, }); }, ['LIFECYCLE.LOADED', 'LIFECYCLE.READY'] );
w
Hi, here docs and live demo about webchat V2 https://botpress.com/docs/embedded-webchat
3 Views