1.Set user properties: through this event it is possible to define the properties of the user interacting with the chat window (name, e-mail, etc.).
$aivo.user.set({ 'name', 'Pedro', 'lastname': 'Perez' }); |
2. Obtaining user properties: we have 2 ways to obtain user properties;
// Return data from localstorage $aivo.user.get(); // Return data from localstorage + apiUser $aivo.user.get((data) => console.log(data)); |
3. Delete the user and create a new one: the use of this event deletes the user (ending the session) and generates a new user, also deleting all the user properties that had been set.
$aivo.user.new(); |
4. Show or hide the attachment icon when transferring to a human agent: through the event, the file attachment icon () is shown or hidden when it has already been transferred to a human agent. This event can be executed when starting the.
// show $aivo.chat.entryMessage.showAttachButton(); // hide $aivo.chat.entryMessage.hideAttachButton(); |