Control Widget With Code
How to open the bot programmatically
Triggering the widget
const event = new CustomEvent("openChatEvent", {
detail: {
type: "OPEN_OCTOCOM",
message: {
content: "some text",
imageUrl: "some URL",
},
},
});
document.dispatchEvent(event);Example: Open chat on button click
Behavior
Parameters
Field
Type
Required
Description
Connecting your own logic
Important note
Last updated