Methods available on the Mindlogic Plugin instance.
The Mindlogic Plugin provides a set of methods you can use to interact with it programmatically, controlling its state, sending messages, resetting sessions, and managing notifications.
Displays a welcome message popover in the plugin with the provided message content.
Example
window.MLCPlugin.pushWelcomeMessage("How can we help you?");
Adds a notification marker (such as a badge or indicator) on the plugin's trigger button.
Example
window.MLCPlugin.pushNotification();
Pushes an AI-generated welcome message based on the provided keyword.
Example
window.MLCPlugin.pushChatUtm("building an ai app");
Programmatically resets the user's session within the plugin.
Example
window.MLCPlugin.deleteSession();
Retrieves the current session ID of the user.
Example
const sessionId = window.MLCPlugin.getSessionId();
console.log(sessionId);
Sets the plugin's current session ID.
Example
window.MLCPlugin.setSessionId('<session_id>');
Programmatically sets the plugin's locale and pushes a new introduction text message in the selected language.
Example
window.MLCPlugin.setLocale("en"); // Switches the plugin to English
window.MLCPlugin.setLocale("ko"); // Switches the plugin to Korean
Opens the plugin. This can be triggered programmatically to show the plugin without user interaction.
Example
window.MLCPlugin.open();
Closes or hides the plugin. This can be triggered programmatically to hide the plugin from view.
Example
window.MLCPlugin.hide();