Find the answer you are looking for

Aivo SDK Documentation

In the web chat, through the SDK library, events can be executed that allow developers to perform various actions within the chat window in an HTML page, where the chat is embedded. 

Some examples are, opening and minimizing the chat window, initializing properties of the user that is interacting with it, sending a message/query to the bot (so that it responds). 

In addition, it is also possible to subscribe to a series of events that will be triggered after the user interacts with the chat window, such as measuring own data each time a user clicks the start button. 

Important: It is recommended that developers read and use this documentation.   

☝ To use events from the SDK, it is recommended to call the ready method of the $aivo object: $aivo.ready(function() { ... });

This will work as a callback and will fire, immediately after finishing the initial window configurations, the events inside the function passed by parameter.

Below is an example of what the callback would look like. 

// include script without async attribute 

<script type="text/javascript" src="https://cdn.agentbot.net/core/{your_channel_token}.js" charset="UTF-8"></script> 

<script type="text/javascript"> 

$aivo.ready(function() { 

$aivo.user.set("name", "John Doe"); 

$aivo.user.set("device", "iPhone"); 

$aivo.chat.open(); 

$aivo.chat.addMessage("Welcome, how can I help you?"); 

}); 

</script>

Find out here all the events and actions carried out by each one of them.





This website stores cookies on your computer. These cookies are used to collect information about how you interact with our website and allow us to remember you. We use this information in order to improve and customize your browsing experience and for analytics and metrics about our visitors both on this website and other media. To find out more about the cookies we use, see our Privacy Policy.

If you decline, your information won’t be tracked when you visit this website. A single cookie will be used in your browser to remember your preference not to be tracked.