Send a message to the active Chat Agent without showing it to the Visitor. Optionally, add a second parameter of ‘visitor’ to send this message to the Visitor.
*Note: Requires an active chat (i.e. both the visitor and the agent have messaged eachother). For example, if you are using setCallback() to call sendTextToChat(), please use the ‘ChatMessageReceived’ event rather than the ‘StartChat’ event.
true: there is an active chat and the message was sent to the Agent.
false: there is an active chat and the message was sent to the Visitor. Or, there is no active chat.
- String | (Required)
- The text content of a message to be sent to the currently-active Chat Agent. When fired, the message will be sent to the Agent but not to the Visitor.
- String | (Optional)
- Enter this optional parameter if you would like to send a message to the currently-active Visitor and not to the Agent.