Events & Interactions
Learn how your website can easily exchange data with the Loops AI Widget.
Loops AI Widget can communicate directly and securely with your website.
It uses standard browser mechanisms: the window.LoopsAI runtime API for commands from your site to the widget, window.postMessage for widget actions such as closing the chat, and window events (loopsai:*) for cart actions, which your storefront answers with LoopsAI.cartResult. The implementation is so simple that you don't even need to be a software developer to integrate the basics!
Host Integration API
Page-based context, init options, and LoopsAI runtime methods in one reference.
Custom Ask AI Search Button
Keep your own search UI; pass the query with LoopsAI.openWithSearch when the shopper clicks Ask AI.
Body-Type Size Guide
Open the body-type size guide from your product page with LoopsAI.openSizeFinder — inline in chat or as a standalone panel.
Open Size Suggestion Form
Instantly trigger the 'Size Requirement' form directly from a button click on your host website.
Add to Cart
Let shoppers add, remove, and change products in your store's own cart from the widget by answering four browser events.
Other Pre-defined Actions
Check out how to gracefully close the chat via your buttons or listen to product favoriting.