olark('api.chat.sendNotificationToVisitor', {
	body: string


  • options.body
    the contents of the notification to send the visitor


Send a notification message to the visitor. The message will look like a notification, and will not show up as coming from a particular operator.

Notify a visitor if no immediate response

Assure a visitor that the operator will be back later if there is no response from an operator in 60 seconds:

// Set a timer variable
var lastMessageTimeout;

// Wait for a message to the visitor
olark('api.chat.onMessageToVisitor', function(){

    // If a message is sent, reset the timer

    // Start the timer
    lastMessageTimeout = setTimeout(function(){

        // Send a custom notification to the visitor
            body: "the operator just stepped out for a moment"

    // Set timer to one minute (60,000 milliseconds)
    }, 60000);