Updating folder name
This commit is contained in:
25
proactive-agent/snippets/DigitalWelcomeEvent.js
Normal file
25
proactive-agent/snippets/DigitalWelcomeEvent.js
Normal file
@@ -0,0 +1,25 @@
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
);
|
||||
Reference in New Issue
Block a user