Configuring via Environment Settings (Chatmode UI)
Most visual and behavioral aspects of the chat interface inside the modal/iframe are configured within the Chatmode application when you set up yourEMBED
type Environment.
Navigate to Environments -> [Your Embed Environment] -> Settings in Chatmode to configure:
- Display Name: The text shown in the chat header.
- Display Picture: The logo or avatar shown in the chat header.
- Icon: The icon displayed on the floating chat bubble when closed.
- Primary Color: Affects buttons and other accents within the chat interface.
- Initial Message: The first message the Agent sends when the chat loads.
Configuring via initBubble
Options
The Chatmode.initBubble
function, used in the standard Bubble Code snippet copied from the Chatmode UI, accepts a few client-side options to control the theme and custom icon:
environmentId
(Required): Your specific Environment ID, obtained from the snippet copied in the Chatmode UI.theme
(Optional): Controls the color scheme (light
,dark
, orautomatic
based on user’s system preference). Defaults toautomatic
.iconKey
(Optional): The identifier for your custom icon uploaded in the Environment settings. This is usually pre-filled in the copied snippet if you uploaded an icon.updatedAt
(Optional): A timestamp used to prevent incorrect browser caching of the icon image. This is usually pre-filled along withiconKey
.
environmentId
and potentially pre-filled iconKey
and updatedAt
.
Programmatic Control
When you initialize the bubble, you can optionally store the returned control object:Styling with CSS
CSS is primarily used if you opt for the Inline Embed method (using an<iframe>
tag directly) rather than the standard floating bubble.
Styling the Inline Iframe Container
If you use the<iframe>
code snippet (copied from the Environment settings as an alternative to the Bubble Code), apply standard CSS to the <iframe>
tag itself to control its width
, height
, border
, margin
, position
, etc., to integrate it seamlessly into your page layout.
Styling the Floating Bubble (Not Recommended)
While technically possible using browser developer tools to find CSS selectors and overriding them with!important
, manually overriding the styles of the floating bubble (#chatmode-bubble-button
) or its modal window (.chatmode-modal-container
, etc.) is not recommended or supported. These internal structures may change without notice, breaking your custom styles.
Stick to the customization options provided in the Environment settings (Display Name, Picture, Icon, Color, Initial Message) and the theme
option in the initBubble
script for the standard floating bubble.