Queue calls before the script loads.
The basic embed boots automatically from data-public-key. Add this optional bootstrap before the async script when your application needs early API calls. Only one chatbot can be active on a page.
Queue bootstrap
window.PeopleTideChat = window.PeopleTideChat || function () {
(window.PeopleTideChat.q = window.PeopleTideChat.q || []).push(arguments);
};Lifecycle and visibility commands.
- PeopleTideChat('boot', { public_key: 'PUBLIC_KEY' }) initializes a chatbot. It is optional for the auto-boot snippet. Repeated boot does not duplicate an active widget; shutdown before switching public keys.
- PeopleTideChat('ready', callback) runs asynchronously after successful initialization, including registrations made after readiness. It runs once for that registration. It does not run on initialization failure; use onError.
- PeopleTideChat('show') opens the panel when CRM display rules allow it. PeopleTideChat('hide') closes the panel and keeps the launcher and conversation.
- PeopleTideChat('update', settings) merges supported runtime settings and refreshes published configuration. With no settings, it reevaluates the current page and refreshes CRM configuration.
- PeopleTideChat('shutdown') removes the widget, cancels requests and clears in-memory conversation state and callbacks. The once-per-tab dismissal marker is retained.
- PeopleTideChat('onShow', callback) and PeopleTideChat('onHide', callback) observe panel visibility. PeopleTideChat('onError', callback) receives { code }. Callback payloads contain no visitor messages. Register callbacks again after shutdown.
Supported settings.
- public_key: chatbot identifier at boot; switching requires shutdown.
- style_id: published Style ID belonging to the current chatbot.
- theme_mode: light, dark or system.
- alignment: left or right. horizontal_padding and vertical_padding: integer pixels from 0 through 120.
- z_index: integer from 0 through 2147483647.
- hide_default_launcher: true when using your own launch button.
- All omitted settings use the current runtime override or the published CRM defaults. Unknown or invalid settings emit INVALID_SETTINGS.
Custom launch button
<button id="contact-team" type="button">Chat with our team</button>Handle availability errors.
- CHATBOT_UNAVAILABLE: initialization failed; check the public key, origin, enabled state, provisioning and network.
- CONFIGURATION_UNAVAILABLE: refresh failed; the prior configuration remains usable.
- STYLE_UNAVAILABLE: selected style is unavailable; the default style is used.
- INVALID_SETTINGS or INVALID_COMMAND: correct the command or settings.
- NOT_INITIALIZED: boot before controlling the widget.
Commands do not identify or authenticate visitors. Contact details belong in the consent-based enquiry form, not SDK boot settings. No npm package or authenticated-user SDK is included.
