In some scenarios, we require the Embedded Service component to show when the Salesforce service agent is online and hide when the agent is offline. But, Embedded Services are not designed to hide when there are no agents available.
Currently, there is no API to check the Chat availability for a service agent and this limitation makes it difficult to hide the Embedded Chat component. Hiding the Embedded Chat component may be possible using JavaScript.
Chat implementation and Embedded Services differ in the way the service agent availability is captured,
One possible approach could be to experiment to determine the Embedded Chat button action:
embedded_svc.settings.displayHelpButton = true; //Or false
Embedded Chat button is displayed when the value is true, and hidden when the value is false. As mentioned previously, there may be other custom solutions available via JavaScript.
To understand more on how to tweak the Chat box's appearance, please refer to the documentation for Customizable Parameters in the Embedded Chat code.
Please note that these are some possible alternatives that need more review and coding to create a fully functional implementation. Please be aware that Salesforce Support will not be able to provide a working solution to these suggestions.
000383348

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.