Please note that this SDK relates to LivePersons legacy chat product which receives limited support and will be deprecated in the future.
It is recommended to build future integrations on top of the corresponding messaging SDK instead.
This notifies the agent of the typing state of the visitor. The response echoes the request data.
Note: If you send the same state more than once, the requests will be ignored until a new state is sent.
Request
Properties
Value | Description | Type | Required |
---|---|---|---|
typing | The current state of the visitor input. | Boolean | Required |
Sample code
var failedRequest = myChat.setVisitorTyping({
typing: true,
success: myChat.typingUpdated,
error: myChat.typingUpdateFailed,
context: myChat
});
if(failedRequest && failedRequest.error){
alert(failedRequest.error);
}
Response
Sample response
{ "typing" : true }