Is there an API? I like to wrench on things.
There is! Put on your coveralls, down a few 5-hour-energy drinks and get cracking....
We even have some helpful developer tools built right in to the Olark chatbox. Just type the
!develop command from the operator side of the chat, and the developer tools will pop up on the visitor side.
Looking for code examples?
Just click on any of the methods below. Each method comes with a full example of a scenario where you might want to use it!
For example, you can use the api.chat.updateVisitorNickname method to customize the visitor details that you see in the buddylist. If you're feeling more savvy, take a look api.chat.getDetails method to filter through your visitors and create some rules to make sure you get in touch with your most important customers.
...keep track of relevant customer information (beta)
- olark('api.visitor.getDetails',returnCallback) … for email, name, geolocation, and other information
...target your most important customers (beta)
...send messages, update the buddy list, and control notifications
...react to messages, commands, and other changes in the chat
...show, hide, and manipulate the chatbox
...monitor whenever the chatbox is expanded, hidden, or otherwise changed
...tweak the chatbox behavior with configuration
olark.configure('box.corner_position', 'BL');puts the chatbox in the bottom-left corner. Valid values include TL, TR, BL, BR. (NOTE: may not work with all themes)
olark.configure('box.width', 300);olark.configure('box.height', 300);sets the width and height of the chatbox (NOTE: may not work with all themes)
olark.configure('box.start_hidden', true);hides the chat box initially on this page, great for pages where you don't want to start chats, but still want to continue existing chats
olark.configure('system.disable_default_visitor_information', true);this will turn off all of the initial pre-chat notifications that give you visitor context, allowing you to show just your own custom pre-chat information instead
- More options added all the time, stay tuned!
...and lots more!
Feel free to propose good uses for the Olark API, or even drop us some suggestions for improvement!