Practical Examples
1) Auto-open after 10 seconds
2) Trigger an intent on a PDP
3) Open after scroll depth
Robust loading: event-first, polling fallback
The embed dispatches browser events when it is ready. Prefer listening for these instead of polling. When the API is available (window.homieBot is set), the embed fires homiebot:api-ready:
sendMessage / getHistory), listen for homiebot:assistant-ready:
homiebot:opened and homiebot:closed:
window.homieBot.open() / .close() / .toggle(), and programmatic actions from inside the chat.
If your script runs after the embed may already be ready, check once and then listen: