26 lines
622 B
JavaScript

// Add this code to the Messenger's 'On Engagement Load' block
window.askIVA = (input, postBack, metadata, configuration) => {
// store.main.showMessenger();
// store.main.setView("chat");
// store.main.setNcPing(crypto.randomUUID());
store.conversationEvent.sendMessage({
input,
postBack,
metadata,
configuration,
});
};
// Set form when messenger is opened
vm.$watch(
() => store.main.newConversation,
async (value) => {
if (value) {
console.log("Starting New Conversation...");
setTimeout(() => {
window.askIVA("Digital Wecome Event");
}, 100);
}
}
);