Decimal object with the following methods.
Decimal.boot(options)
Manually initializes the widget. Required when usingdata-disable-autoboot.
Decimal.show(options)
Opens the chat widget programmatically. Equivalent to clicking the launcher button.Decimal.hide()
Closes the chat widget programmatically. Equivalent to clicking the launcher button again.Decimal.showButton() / Decimal.hideButton()
Show or hide the launcher button without removing the widget. Thedata-hide-button attribute hides it for the whole session; these two toggle it at runtime, so you can drop the launcher on certain pages or reveal it after the user does something.
Decimal.show().
Decimal.shutdown()
Removes the chat widget completely. CallDecimal.boot() again to restart from scratch.
Decimal.update(options)
Updates widget metadata after initialization. Merged with existing metadata and included when escalating to a human._pageUrl and _pageTitle, with query strings stripped so tokens and PII don’t leak. Single-page-app navigation is picked up too, so route changes need no update() call from you.
Decimal.theme(options)
Customizes widget appearance. Can be called before or afterDecimal.boot(). To reset to defaults, call Decimal.theme(Decimal.DEFAULT_THEME).
Colors
Pass
null for any color to reset it to the component default.
Position & Size
These options only affect the widget container in floating mode, designed for use withdata-hide-button. All values are CSS strings (e.g. '20px', '50%').
Button Position
Position the launcher button independently from the widget container.Content
theme() also accepts content overrides for the widget’s header and greeting. These can be set here or via data attributes on the script tag.