Prerequisites
Before creating an embed, ensure you have:- A Chatmode account with an active subscription
- At least one agent already configured
- Access to your website’s code or content management system
Step 1: Create an Embed Environment
First, you need to create anEMBED
environment that will host your embed:
- Log in to your Chatmode dashboard
- Navigate to Environments in the sidebar
- Click Create Environment
- Select
EMBED
as the environment type - Enter a descriptive name for your environment (e.g., “Main Website Chat”)
- Select the agent that will power this embed
- Choose your preferred language
- Click Next to proceed to configuration
Step 2: Configure General Settings
Configure the general behavior and appearance of your embed via the Environment settings:- Display Name / Display Picture / Icon / Primary Color / Initial Message: Configure these core visual/text elements (as described in the Customization guide).
Ensure you configure the necessary settings like Display Name and Initial
Message to provide a good user experience.
Step 3: Customize Appearance
Tailor the look and feel of the chat interface hosted within the embed:-
Colors and Branding (Applied to the
/chats/[id]
page):- Primary color for buttons and accents
- Header color
- Text colors
- Upload your logo for the chat header (via Display Picture setting)
- Display Name for the header
-
Layout Options (Controlled by your
<iframe>
styling):- Position (bottom-right, inline, etc.) - achieved via CSS on the iframe
- Dimensions (width, height) - set on the iframe element
-
Text Customization (Applied to the
/chats/[id]
page):- Initial Message displayed by the agent.
Step 4: Advanced Configuration
Currently, advanced configuration options beyond the general settings are limited for the standard embed.Step 5: Get Your Embed Code
Once yourEMBED
environment configuration is complete and saved:
- Navigate to the Environment details page (if you aren’t already there).
- Find the Implementation / Share section.
- Locate the “Bubble Code” snippet, which provides the standard floating widget.
- Click the Copy button next to the Bubble Code.
<iframe>
tag structure.)
Step 6: Implement on Your Website
- Access your website’s code or content management system.
- Paste the copied “Bubble Code” script tag just before the closing
</body>
tag of your HTML. - This script will handle adding the floating bubble and loading the chat modal when clicked.
<iframe>
tag where you want it in your HTML structure and apply appropriate CSS for sizing and layout.)
Step 7: Test Your Embed
After implementation, thoroughly test your embed:- Visit your website in different browsers
- Check functionality on mobile devices
- Test the chat flow with sample questions
- Verify that user inputs are handled correctly
- Confirm that appearance settings are applied properly
Next Steps
After implementing the embed snippet:- Test the chat bubble and conversation flow thoroughly.
- If needed, adjust the Environment settings in Chatmode (like Display Name, Picture, Initial Message) and save.