← view more API documentation

api.chat.updateVisitorStatus

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.

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

Examples

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

olark('api.chat.updateVisitorStatus', {snippet: 'has 10 items in cart'})

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

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

Discussion

Feel free to propose good uses for this method, or even drop us some suggestions for improvement! You can also join our mailing list to collaborate with other developers and get updates from us.