Loading

Chat no longer works after server endpoint URL is updated

Veröffentlichungsdatum: Jul 14, 2025
Beschreibung
You may notice that your Chat is no longer working, and upon investigation you see that the API endpoint URL is different than the URL you have in your webpage's code. 

Under 'Chat Settings' in Setup: 
Enable Chat: Checked

API Information
Chat API Endpoint: https://d.la4-c1-was.salesforceliveagent.com/chat/rest/


Reference to Endpoint URL in Deployment code - example setup would show: 

Deployment Code
Copy this code and paste it into each web page where you want to deploy Chat.
<script type='test/javascript' src='https://c.la4-c1-was.salesforceliveagent.com/content/g/js/36.0/deployment.js'></script>
<script type='test/javascript'>
liveagent.init('https://d.la4-c1-was.salesforceliveagent.com/chat','572360000000BXW','00D35000000v1XJ');
</script>


Example of Deployment code on a webpage:
 
<html>
 <head>
  <script type="text/javascript" src="https://c.la2-c1-chi.salesforceliveagent.com/content/g/js/36.0/deployment.js"></script>
  <script type="text/javascript">
   liveagent.init('https://d.la2-c1-chi.salesforceliveagent.com/chat' '572360000000BXW', '00D35000000v1XJ');
  </script>
 </head>
 <body>...</body>
</html>
Lösung

Notice the URL in the webpage code is different than the URL in the Deployment Code. The webpage code starts with 'la2-c1-chi' and the Deployment code shows 'la4-c1-was'. There are 2 references to the API Endpoint URL in the code that is provided via the Deployment. One is 'deployment.js' and the other follows the 'liveagent.init'. These 2 references are standard. Now, if the only reference to the API Endpoint URL is within the Deployment code snippet that Salesforce provides, you should see no issues. The system knows how to reroute the call to the correct Chat server, so there is no need to update that. You will still want to update the deployment code as soon as possible. Even though we have a built-in redirect, if your endpoint server was updated, it could be because we are decommissioning the server you were on, and if it's decommissioned, then the reroute isn't going to work. There is no specific timeframe where we guarantee the old endpoint will work until you update your webpage code. 

However, if you have that API Endpoint URL referenced anywhere else in your webpage code, you MUST update the URL to the new server manually. This is why you SHOULD NOT be hard coding the URL reference within your own code. The Chat Server associated to your Org can change without any notice. 

If you restrict access to allow only your current Chat API endpoint, you block access to the updated endpoint when it changes. To prevent changed Chat API endpoints from being blocked, allow traffic from all *.salesforceliveagent.com endpoints.

**NOTE: You will have to hard code the Endpoint URL reference within any REST API calls. There is currently no dynamic way to reference this, so you will need to manually update the URL's if the server for your Org changes. Please see "Switch Server Response during Live Agent REST API call" for more information. 

 

Nummer des Knowledge-Artikels

000382130

 
Laden
Salesforce Help | Article