Overview
Add your Invent AI assistant to any Drupal website with a floating bubble. Perfect for enterprise websites, government sites, and large-scale content platforms.Installation
Method 1: Using Block System (Recommended)
1
Create Custom Block
Navigate to Structure → Block layout → Custom block library → Add custom block
2
Choose Full HTML Format
- Give your block a description (e.g., “Invent Assistant”)
- Set Text format to Full HTML
- Switch to Source mode in the editor
3
Add the Code
Paste this code:Replace
YOUR_ASSISTANT_ID
with your actual assistant ID.4
Save and Place Block
Save the block, then place it in a region (usually Footer or Page bottom)
5
Configure Visibility
Configure block visibility settings if needed (all pages, specific pages, etc.)
Method 2: Theme Template
Add directly to your theme’s template files:Method 3: Using a Module
Create a custom module or use an existing one:Customization
Match Your Drupal Theme
Conditional Display by Content Type
Using block visibility settings:- Edit your Invent Assistant block
- Go to Visibility tab
- Add conditions for Content types, Pages, or Roles
User Authentication
Security Requirement: When using any
user-*
attributes (user-id
, user-name
, user-avatar
), you must also provide user-hash
. Both user-id
and user-hash
must be provided together, or neither should be provided. The user-hash
must be generated on your backend using HMAC-SHA256 with your assistant’s secret key. Never expose the secret key to the client.Drupal Commerce Integration
For e-commerce sites:- Product support and questions
- Order tracking assistance
- Shipping information
- Returns and refunds help
Tips for Drupal
Drupal 9 & 10
Fully compatible with modern Drupal versions
Multilingual
Works with Drupal’s multilingual system
Paragraphs
Can be added as a paragraph type
Layout Builder
Compatible with Layout Builder
Advanced Configuration
Add to Specific Regions
In your theme:Cache Considerations
Clear Drupal caches after adding the assistant:Performance Optimization
Use async/defer attributes (already included) and consider using Drupal’s aggregation:Troubleshooting
Bubble not appearing
Bubble not appearing
Solutions:
- Clear all Drupal caches (Configuration → Performance → Clear all caches)
- Verify text format is set to “Full HTML”
- Check block placement and region
- Ensure block is enabled and visible
Conflicts with other modules
Conflicts with other modules
Solutions:
- Check for JavaScript conflicts in browser console
- Adjust block weight/order
- Test with minimal theme/modules
Not showing for anonymous users
Not showing for anonymous users
Solutions:
- Check block visibility permissions
- Verify “Anonymous user” role can see the block
- Check cache settings for anonymous users
Drupal Version Compatibility
- Drupal 7: Use Block system or theme templates
- Drupal 8/9/10: All methods supported
- Drupal 11: Fully compatible (when released)
Popular Drupal Distributions
Works with:- Acquia Lightning
- OpenSocial
- Commerce Kickstart
- Panopoly
- Thunder
- And all other Drupal distributions