olark('api.chat.updateVisitorStatus', {
	snippet: ''
});

Arguments

  • options.snippet
    the snippet of text to show as part of the status

Notes

Add information to the visitor’s status in the operator’s buddy list. You can only set a ‘snippet’ of the status, since other extensions may be trying to update the status at the same time.

Display number of items in a shopping cart

To show custom information, like the number of items somebody has in their shopping cart:

<script>
    olark('api.chat.updateVisitorStatus', {
        snippet: 'has 10 items in cart'
    });
</script>

Screenshot of API call visitor status

Do you have multiple pieces of information? Use an array for the snippet:

<script>
    olark('api.chat.updateVisitorStatus', {
        snippet: ['has 10 items in cart', 'value of items is $38']
    });
</script>

The Olark chat console automatically tries to detect email addresses, storing them as the visitor’s information. In this example, the first item in the snippet array is the equivalent of using the `api.visitor.updateEmailAddress' API call:

// Sets email as test@example.com
// and "Some text" appears as Advanced Info
olark('api.chat.updateVisitorStatus', {
    snippet: ["test@example.com", "Some text"]
});