Custom events
ScentBot communicates with your application through browser Custom Events. Use these events to integrate with your cart, analytics, or UI state. All events are dispatched on thewindow object.
Events emitted by ScentBot
Listen for these events to react to user actions inside the widget.sxp.scentbot.ready
Fired when the widget has finished initializing and is ready for interaction.
sxp.scentbot.addToCart
Fired when a user clicks the buy button on a perfume card and no direct purchase URL is available. Use this to add the product to your cart programmatically.
| Property | Type | Description |
|---|---|---|
id | any | WikiParfum perfume ID |
ean | any | Product EAN (barcode) |
internalId | any | Internal product identifier (if available) |
sxp.scentbot.exit
Fired when the user closes the widget.
Control ScentBot
Dispatch these events to control the widget from your application code.sxp.scentbot.set
Update the widget state programmatically. The most common use case is opening or closing the widget:
controlled="true"), where the open/close state is fully managed by your application.
Cart integration example
A typical integration listens foraddToCart, adds the item to the cart, and notifies ScentBot of the result:
| Event | Description |
|---|---|
sxp.scentbot.addedToCart | Dispatch to confirm the item was added to the cart |
sxp.scentbot.addedToCartError | Dispatch to notify that the cart operation failed |
Next steps
Configuration
All widget attributes for customizing behavior and appearance.
Capabilities
Search types, image search, multi-language, and session persistence.

