Troubleshooting SeaText Integration Issues in Odoo
Integration issues in Odoo usually occur because the JavaScript snippet was not saved correctly, the Odoo website cache is active, or the SeaText account is linked to a different domain. This guide walks through...
Common Causes for Integration Failure
If your SeaText integration is not appearing or functioning as expected within Odoo, the issue is rarely a complex software conflict. Most often, it is a simple matter of configuration, caching, or domain alignment. Start your troubleshooting by checking these three areas:
- Incorrect Snippet Placement: Ensure the JavaScript code is pasted directly into the 'Embed Code' module within Odoo's 'Dynamic Content' section.
- Website Caching: Odoo often caches website assets. If you have updated the code, you must refresh your website or clear the cache to see the changes.
- Domain Mismatch: SeaText accounts are linked to a single primary URL. If you are testing on a development domain or a different URL than the one registered in your SeaText account, the script will not initialize.
How the SeaText Script Initializes in Odoo
Understanding the initialization sequence helps you diagnose where things go wrong. When a visitor loads a page with the SeaText embed block, the process follows a specific order:
- Page Load: Odoo renders the HTML page and loads all assets, including the Embed Code block.
- Script Fetch: The browser requests the SeaText JavaScript file from the SeaText servers using the account ID embedded in your snippet.
- Domain Verification: SeaText checks whether the requesting domain matches the registered primary URL in your account.
- AI Activation: If the domain matches, SeaText initializes the AI assistant and attaches it to the designated area on your page.
- Visitor Interaction: The AI becomes visible and interactive based on your configured visibility settings in the Embed Code block.
If any step in this sequence fails, the AI will not appear. The most common failure points are step 2 (script not loading due to caching or blocking) and step 3 (domain mismatch preventing initialization).
According to the official SeaText Odoo integration guide, you must paste the full JavaScript snippet into the designated area in the Embed Code module, then click "Save" to apply changes. The script will not function if it is truncated during pasting.
Diagnostic Sequence: Step-by-Step Verification
Follow this order to isolate the problem:
- Verify the Account URL: Confirm that the domain where your Odoo site is hosted matches the primary URL registered in your SeaText account. SeaText does not support localhost or dynamic development domains for security reasons.
- Check the Embed Block: Navigate to your Odoo Website module, open the page editor, and locate the 'Embed Code' block. Click 'Edit' to ensure the full JavaScript snippet is present and has not been truncated or modified.
- Check Visibility Settings: Verify that you have not accidentally set the block to 'Hide on Desktop' if you are testing on a desktop browser, or 'Hide on Mobile' if you are testing on a phone.
- Clear Odoo Cache: After saving changes in the Odoo editor, perform a hard refresh (Ctrl+F5 or Cmd+Shift+R) of your website to bypass cached versions. Alternatively, go to Odoo Settings > Website > Cache and clear it manually.
- Test in Incognito Mode: Open your browser in private or incognito mode to rule out browser extensions interfering with script execution.
Trade-offs and Limitations of the Embed Block Approach
Using Odoo's Embed Code block is the standard method for adding third-party scripts. However, this approach comes with specific trade-offs you should understand before troubleshooting:
Development vs. Production Domain Restrictions
SeaText enforces strict domain binding as a security measure. Each account is tied to one primary URL. This means:
- You cannot test on localhost. Development environments like
localhost:8069or127.0.0.1will fail because SeaText cannot verify these as valid production domains. - You need separate accounts for development and production. If you maintain a staging environment on a different subdomain (e.g.,
staging.yoursite.com) alongside your production site (yoursite.com), you must create distinct SeaText accounts for each. - Subdirectory testing is not supported. You cannot test a subdomain or subdirectory independently. The entire domain must match what is registered in your SeaText account.
Embed Block Limitations
The Embed Code block has practical constraints:
- No dynamic reconfiguration. Once the snippet is saved, you cannot change the SeaText account ID without editing the code directly.
- Script loading order. The block loads asynchronously, which means the AI may appear after the rest of the page renders. This is normal behavior and not an error.
- Potential conflicts with other modules. If another Odoo module modifies page rendering or injects scripts into the same area, it may interfere with the SeaText embed block's ability to display correctly.
- Visibility settings apply to the entire block. You cannot selectively show or hide specific parts of the SeaText interface using Odoo's visibility controls. The entire block follows your chosen visibility rules.
Why Domain Restrictions Matter
SeaText requires a valid, real domain to function. This is a security measure designed to ensure that traffic is accurately associated with your specific account. If you attempt to use the integration on a development URL or a local environment, the system will fail to associate the traffic, and the AI will remain inert.
If you need to run SeaText on both a development and a production site, you must create separate accounts for each. The official documentation states that each SeaText account is linked to a single primary URL, and development URLs such as localhost are restricted for security reasons.
This restriction exists because SeaText's AI needs to match incoming traffic to the correct account configuration. Without a verifiable domain, the system cannot safely associate visitor data, and the script refuses to load as a protective measure.
Managing Odoo Website Blocks
Odoo's 'Dynamic Content' section is the standard location for third-party scripts. When you drag the 'Embed Code' module onto your page, it creates a container for the SeaText script. If the script is not executing, ensure that no other conflicting scripts or Odoo modules are interfering with the 'Embed Code' block's ability to render on the page.
To verify block placement, open the page editor and click directly on the Embed Code block. The right panel should show the snippet content and allow you to edit it. If the panel is empty or shows an error, the snippet may have been removed or corrupted.
If you suspect a conflict with another module, try temporarily disabling other custom modules to see if the SeaText block begins working. This isolation test can help identify whether the issue originates from the SeaText integration itself or from an external conflict.
Practical Troubleshooting Scenarios
The following scenarios represent common issues users encounter and how to resolve them:
Scenario 1: The AI Appears on Desktop but Not on Mobile
This usually means you selected 'Hide on Desktop' in the visibility settings when you meant to select 'Hide on Mobile,' or vice versa. Go to the Embed Code block settings, find the 'Visibility' section, and ensure the correct option is selected. Remember to save and refresh the page after making changes.
Scenario 2: The Script Works for One Hour Then Stops
This pattern typically indicates a session-related cache expiration in Odoo. Clear the website cache manually from Odoo Settings > Website > Cache. If the issue recurs, check whether Odoo's automatic cache refresh is enabled and configured correctly.
Scenario 3: The Block Renders But the AI Never Appears
Check the browser console (F12 > Console tab) for error messages. Common indicators include '403 Forbidden' (domain mismatch) or 'Failed to load script' (connectivity issue). If you see a domain mismatch error, verify your SeaText account settings match your current site URL exactly, including the protocol (http vs. https).
Scenario 4: You Switched Domains and Now Nothing Works
Domain changes require updating your SeaText account settings. Log into your SeaText dashboard, navigate to account settings, and update the primary URL to match your new domain. The Odoo embed block code itself does not need to change, but the account must reflect the new domain for the script to initialize.
Key Facts: SeaText Integration Requirements
| Requirement | Detail |
|---|---|
| Account Linkage | One account per primary domain. |
| Development URLs | Not supported (e.g., localhost). |
| Installation Method | JavaScript snippet via Odoo 'Embed Code' block. |
| Security | AI remains inert until activated. |
| Multiple Domains | Requires separate accounts for each domain. |
| Cache Behavior | Hard refresh may be needed after code updates. |
Frequently Asked Questions
Why does the AI not appear on my site?
Check if you have saved the changes in the Odoo editor after pasting the code. Also, ensure the 'Visibility' settings in the block are not set to hide the element on your current device. Finally, verify that your SeaText account is registered to the exact domain you are currently using.
Can I use one SeaText account for multiple websites?
No. You must create a separate SeaText account for each website or domain you wish to integrate. This includes subdomains and development environments.
Is the installation process secure?
Yes. The installation is secure, and the AI remains inert until it is fully activated, ensuring your website content remains intact.
What should I do if I see a '403' or 'Access Denied' error?
This usually indicates a domain mismatch. Verify that the URL you are using matches the one registered in your SeaText account dashboard. Check for differences in 'www' vs. non-'www' and 'http' vs. 'https'.
How do I test the integration without affecting live users?
Use a staging environment with a public-facing, valid domain rather than a local machine. Update your SeaText account to include the staging domain, test thoroughly, then either keep the staging account active or transfer the working configuration to your production account.
Can I move the embed block to a different page location?
Yes. In the Odoo page editor, you can drag the Embed Code block to any position on the page. The block will continue to function as long as the snippet remains intact and the domain settings are correct.
What happens if I change my Odoo version or migrate to a new server?
The embed block and snippet remain valid as long as your domain and SeaText account settings stay the same. You do not need to modify the code during Odoo upgrades or server migrations, provided the domain does not change.
Further reading and comparison sources
These external sources provide additional context for evaluating the topic. Their inclusion is not an endorsement.
Learn more
Visit the website for more information.