Launch AI Assistant
Displays the AI Assistant launcher.
Type Definition
type launchAiAssistant = () => voidExample:
Shows the AI Assistant launcher on the page
userGuiding.launchAiAssistant();Expand AI Assistant
Expands the AI Assistant’s chat widget. If the assistant launcher is present (visible as a launcher), this will open the whole assistant conversation window.
Optionally pass a message to pre-fill the chat input. The widget opens on a new chat with the text in the input. The message is not sent automatically; the user reviews and sends it.
Type Definition
type expandAiAssistant = (options?: { message?: string }) => booleanParameters
options.message (string, optional): Text to pre-fill in the chat input.
Return Value
true when the widget opens. false when it cannot open: the user is not identified, no AI Assistant is active for the user, or the usage limit has been reached. You can use this to fall back to another help resource.
Example:
Opens the AI Assistant chat window
userGuiding.expandAiAssistant();Example:
Opens the AI Assistant on a new chat with a question pre-filled
userGuiding.expandAiAssistant({ message: 'How do I export my invoices?' });Example:
Falls back to your help center when the AI Assistant cannot open
const opened = userGuiding.expandAiAssistant({ message: 'How do I export my invoices?' });
if (!opened) {
window.open('https://help.example.com', '_blank');
}Collapse AI Assistant Widget
Collapses the AI Assistant widget. If the AI Assistant’s chat window is currently open, this will minimize it back to the launcher icon.
Type Definition
type collapseAiAssistant = () => voidExample:
Minimizes the AI Assistant chat window
userGuiding.collapseAiAssistant();Hide AI Assistant
Completely hides the AI Assistant from view. This removes the assistant’s launcher.
Type Definition
type hideAiAssistant = () => voidExample:
Removes the AI Assistant from the page
userGuiding.hideAiAssistant();