Get Started With APIs for Messaging for Web
Here are the steps to configure your web page to use the Messaging for Web APIs.
From Setup, in the Quick Find box, enter
Embedded Service Deployments, and select Embedded Service Deployments. See Configure a Messaging for Web Deployment in Salesforce Help.
Click Code Snippet.
To retrieve the code snippet, follow the on-screen instructions.
Add the code snippet to your web page. Here’s an example of a code snippet.
Add the Messaging for Web APIs to your web page. You can call the APIs inside or outside the code snippet, but call them after the client dispatches the
onEmbeddedMessagingReadyevent. If you call the APIs before receiving this event, they don't execute.
To ensure that Messaging for Web works optimally, always republish your deployment after testing newly added features and bug fixes. See Configure a Messaging for Web Deployment in Salesforce Help.