You will need:
- A website with an embedded bot
- Familiarity with JavaScript
Send a message on the user’s behalf
To send a message on a user’s behalf, use thesendMessage
method wrapped in an event listener:
- Waits until Webchat is open and ready to receive messages
- Sends the message on behalf of the user
The message won’t send until the user has voluntarily opened the Webchat window.
Start the conversation on the user’s behalf
To proactively open Webchat and start a conversation on the user’s behalf when they visit your website:- Waits until Webchat is initialized
- Opens Webchat
- Waits until Webchat is ready to receive messages
- Sends the message on behalf on the user’s behalf