You can dynamically open/close the widget using the open and close methods.
open
close
window.chatbase.open(); // opens the widget window.chatbase.close(); // closes the widget