Configuration Options
Connection Setup
To set up the Chatwoot integration, you’ll need:- Chatwoot Account: Create a Chatwoot account at chatwoot.com
- Website Inbox: Create a “Website” type inbox in your Chatwoot dashboard

Authentication Configuration
The integration requires two key configuration parameters: Base URL (Required)- Default:
https://app.chatwoot.com
- For self-hosted instances, replace with your custom domain
- Supports variable interpolation for dynamic URLs
- Found in Chatwoot under Settings > Inboxes > Settings > Configuration
- Located within the JavaScript code snippet
- This token connects your bot to the specific Chatwoot inbox

Task Configuration
The Chatwoot block supports two main tasks:- Show widget (Default): Opens the Chatwoot chat widget
- Close widget: Closes and hides the Chatwoot chat widget
Features
User Information Pre-filling
The integration supports comprehensive user data transfer: Supported User Fields:- ID: Unique identifier for the user (optional)
- Name: User’s display name
- Email: User’s email address
- Avatar URL: Profile picture URL
- Phone Number: Contact phone number

Automatic Context Transfer
The integration automatically passes context between your bot and Chatwoot: Custom Attributes Automatically Set:bot_result_url
: Direct link to the current bot session results- Any additional custom attributes you’ve configured in Chatwoot
User Identity Management
Smart ID Resolution:- If no ID is provided, the system uses the email address as the user identifier
- If neither ID nor email is provided, falls back to the bot result ID
- This prevents duplicate contacts and ensures proper conversation continuity
Advanced Features
Dynamic Configuration
Variable Interpolation:- Base URL supports variables for multi-tenant setups
- Website tokens can be dynamically selected based on bot logic
- All user fields support real-time variable substitution
Session Continuity
Cross-Platform Support:- Seamless handoff between bot and human agents
- Conversation history preservation
- User context maintained across sessions
Client-Side Execution
Performance Optimization:- Widget loads asynchronously on the client side
- No server-side processing delays
- Instant widget appearance for users
Best Practices
Integration Patterns
Escalation Triggers: Place Chatwoot blocks at natural escalation points:- After failed automated resolution attempts
- When users request human assistance
- For complex queries requiring human expertise
Performance Optimization
Conditional Loading: Use condition blocks to determine when to show Chatwoot:- Business hours checking
- Agent availability status
- User subscription level
- Close widgets when not needed to free resources
- Use the “Close widget” task strategically
Data Privacy
Information Handling:- Only pass necessary user information to Chatwoot
- Ensure GDPR compliance when transferring personal data
- Use encrypted connections (HTTPS) for sensitive data
Troubleshooting
Connection Issues
Invalid Website Token:- Verify token is correctly copied from Chatwoot dashboard
- Check for extra spaces or characters
- Ensure token corresponds to the correct inbox
- Confirm URL format (include https://)
- For self-hosted instances, verify domain accessibility
- Test URL accessibility from your deployment environment
- Check browser console for JavaScript errors
- Verify Chatwoot SDK loads correctly
- Confirm website domain is whitelisted in Chatwoot
Data Flow Problems
User Information Not Displaying:- Verify user fields contain valid data
- Check variable names and mappings
- Ensure data types match expected formats
- Confirm custom attributes are created in Chatwoot
- Check attribute names match exactly (case-sensitive)
- Verify attribute types are compatible
Preview Limitations
Testing Environment:- Chatwoot blocks show “not supported in preview” message
- Use published bot for full testing
- Verify integration in live environment
- Chatwoot SDK loading errors
- Authentication failures
- Custom attribute setting issues
Performance Issues
Slow Widget Loading:- Check network connectivity to Chatwoot servers
- Verify Base URL accessibility
- Consider CDN or caching configurations
- Ensure proper widget cleanup between sessions
- Use “Close widget” task when transitioning flows
- Avoid multiple simultaneous Chatwoot blocks
Custom Attributes Setup
Result URL Tracking
Create a custom attribute in Chatwoot to track bot sessions:- Go to Settings > Custom Attributes
- Create new attribute:
- Attribute Key:
bot_result_url
- Attribute Type: Link
- Attribute Display Name: Bot Result URL
- Attribute Key:

Additional Context Attributes
Consider adding these custom attributes for enhanced agent context:bot_flow_path
: Track which bot flow triggered the escalationuser_intent
: Capture the user’s primary goal or needprevious_responses
: Key information collected by the bot