When you create a Liveagent Deployment in the UI, you are presented with a script snippet to paste into the page where you will deploy Liveagent; the first line includes a reference to the liveagent endpoint host, for example:
Is there a way to determine the liveagent hostname (
c.la6cs.salesforceliveagent.com in the code above) programmatically? I can query for all of the other key values - org id, deployment id, even the id of my chat buttons.
I am aware that I could store the endpoint URL in a custom setting, however, this requires maintenance any time the code is deployed to a new org. Is there any way to determine the correct url on the fly?