CanWeChat

Docs

Widget API

Control the bubble from the host page.

Loader

Calls made before the script finishes load are queued and replayed. The widget never bundles React.

Methods

window.canwechat exposes open, close, toggle, isOpen, hide, show, unread, prefill, send, identify, page, destroy, and on.

window.canwechat.identify({ email: "ada@example.com", name: "Ada" });
window.canwechat.prefill("I need help with billing");
window.canwechat.on("message", (msg) => console.log(msg));

Events

ready, open, close, message, reply, unread, disabled, and *.