When accessing a Digital Experiences (Community) site, the Embedded Service Chat widget may not go online even when agents are available and in an online status. This occurs due to a Content Security Policy (CSP) configuration issue in the Community Builder.
A Content Security Policy (CSP) is a browser security feature that restricts which external resources a web page can load. When the CSP setting in Community Builder does not include the required Salesforce Live Agent endpoint with a trailing slash, the embedded chat widget fails to initialize.
The following error appears when viewing the community via the Builder option in Setup:
"Access to [Live Agent endpoint URL] for script resources violates your Content Security Policy (CSP). To get access to those script resources, change your Security Level on the Security page in your community's settings."
The exact URL in the error varies depending on the org's Live Agent endpoint and identifying information specific to the org.
To resolve this error, update the Content Security Policy (CSP) setting in your Digital Experiences (Community) Builder by adding a trailing slash to the Live Agent URL entry.
Navigate to the CSP settings using the following path:
Setup > Digital Experiences > All Sites > Select "Builder" on the affected community > Settings (top left corner of the community builder) > Security
In the Content Security Policy (CSP) section, locate the Live Agent URL entry that corresponds to the error in the Description section.
Add a trailing slash (/) to the end of the URL entry.
Example:
Before: `<REDACTED>
After: `
Save the changes. The chat widget should now initialize correctly when agents are online.
Note: The specific Live Agent endpoint URL varies depending on the affected org. Refer to the error message in the Description section to identify the correct URL to update.
000389419

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.