SIKO E-Shop (Dev Harness)

Click a scenario to simulate the corresponding SIKO storefront context. The buttons rewrite history, inject a fake <cx-page-layout>, and (for PDP) inject JSON-LD + Open Graph meta — the widget's host-context detector picks all of that up exactly the way it would on live siko.cz.

Public API status

Waiting for window.SikoWidget…

Scenarios

Live hostContext (what the widget would send)

Updated every ~200ms via window.SikoWidget.getHostContext(). Open the widget (blue FAB) — chat_opened RUM event will carry the same page_type shown here.

Test the full chat send

Open the widget, click a scenario, then type a message. The hostContext in the network request to /v1/chat will reflect the chosen scenario.

Programmatic API (window.SikoWidget)

For host-page integrations (zero-result search trigger, compare-two-products button, service-page nudge) — the widget exposes a public surface that opens the chat and optionally sends a question on the user's behalf.

Event log (subscribed via window.SikoWidget.on("open"|"close"|"message_sent", …)):

Call shapes for SIKO devs:

// just open the chat
window.SikoWidget.open();

// open + drop a draft into the input (user can edit / cancel)
window.SikoWidget.open({ prefill: "Mám malou koupelnu — co byste doporučili?" });

// open + send immediately on the user's behalf
window.SikoWidget.ask("Nenašel jsem 'velkoformátová béžová dlažba 120x60' — máte něco podobného?");
window.SikoWidget.ask("Porovnej tyto dva produkty: X000001533 vs X000001234");

// subscribe to lifecycle events (returns unsubscribe fn)
const off = window.SikoWidget.on("message_sent", ({ source, message }) => {
  // source: "user" | "programmatic"
  // message: the text that went to /v1/chat
});

// close the panel
window.SikoWidget.close();