Initialization and ready callback

Initialize the Assistant with or without its launcher and wait until it is safe to call methods.

Initialization connects the global Assistant queue to one configured Assistant. Calls that depend on rendered UI should run only after the ready callback fires.

Standard initialization

Assistant('init', 'YOUR_ASSISTANT_ID');

Assistant('ready', () => {
  Assistant('open');
});

Use standard initialization when the configured launcher should appear.

Triggerless initialization

Assistant('trigger-less-init', 'YOUR_ASSISTANT_ID');

Assistant('ready', () => {
  document.querySelector('#support').addEventListener('click', () => {
    Assistant('open');
  });
});

trigger-less-init initializes without the normal launcher. The separate triggerLess command can also hide the launcher after standard initialization.

Errors

  • If Assistant is undefined, the installation snippet has not executed or was blocked.
  • If ready never fires, verify the Assistant ID, browser console, network requests, and CSP.
  • Do not initialize the same Assistant repeatedly during client-side route changes.