Understanding the Issue
When clients hit this issue, it is often due to a misconfiguration in the Trusted URLs or CORS settings. The Experience Cloud site needs to be able to communicate with the Agentforce backend, and this requires specific settings to be in place.
Root Cause
The root cause of the issue is often a missing or incorrect configuration of the Trusted URLs or CORS settings. This prevents the Experience Cloud site from loading the Employee Agent correctly.
Step-by-Step Fix
To resolve the issue, follow these steps:
- Check that the Experience Cloud site URL is listed in the Trusted URLs for Content (Setup → Trusted URLs for Content)
- Ensure that the scripts and iframe content options are enabled for the site URL
- Configure CORS correctly (Setup → CORS → Add your site domain)
- Verify that the correct Embedded Service Deployment is selected in the Messaging Channel
- Check that the agent is correctly assigned in the deployment
- Republish the deployment after making any changes
- Republish the Experience Cloud site after adding the embedded messaging component
Additional Troubleshooting
If the issue persists, try removing the component, publishing the site, then adding the component again and publishing again.
example.config
// Example CORS configuration// Add your site domain to the allowed origins// https://example.com
Heads up: Make sure to test the Employee Agent after making any changes to the configuration.
Checklist
- Verify Trusted URLs configuration
- Configure CORS correctly
- Assign agent in Embedded Service Deployment
- Republish deployment after changes
- Republish Experience Cloud site after adding component
- Test Employee Agent after deployment
Frequently Asked Questions
What is the purpose of Trusted URLs?
Trusted URLs are used to specify which domains are allowed to access the Agentforce backend.
How do I configure CORS?
CORS is configured in the Setup → CORS section of the Salesforce platform.
What happens if I don’t republish the deployment?
If you don’t republish the deployment, the changes will not take effect and the Employee Agent may not be visible.
Can I use a different domain for the Experience Cloud site?
Yes, you can use a different domain for the Experience Cloud site, but you need to update the Trusted URLs and CORS settings accordingly.
Need help shipping this in production?
Genetrix builds and untangles Salesforce Marketing Cloud and Agentforce setups for teams that want it done right the first time. If anything in this post sounds familiar, talk to us before it ships.