window.homieBot object becomes available so you can open or close the widget, check its state, send messages programmatically, attach metadata, and read the chat history — all from your own page code.
This page documents the client-side browser API exposed by the embed script. For server-side REST endpoints, see the
REST API.
Install the embed script
Add the embed script to your page. Styling and behavior are managed from the homie platform and pulled in automatically by the embed.Requirements
- The script must be embedded on your page.
chatbotIdmust be set (on the script tag or viawindow.homieBotConfig).
When the API is available
Thewindow.homieBot object only exists after the embed has initialized. Do not assume it is present at page load.
The embed dispatches browser events as it reaches each lifecycle stage:
Each event carries
{ chatbotId } in event.detail. See Events for full details.
Methods at a glance
See Methods for the full reference.
Explore the Client API
Configuration
Script attributes, global config objects, language and Shopify market resolution.
Methods
Full reference for every method on
window.homieBot.Events
Browser events dispatched by the embed for lifecycle and interaction.
Examples
Practical recipes for opening, messaging, and tracking.
Troubleshooting
Fixes for the most common integration issues.