Event emitted every time the active conversation changed.
This may happen due to a UI-navigation or an API-call.
Event emitted every time the agent availability changes for the current named area and locale.
Event emitted every time the notification count (unread messages) changes.
Event emitted every time the local person changes. This may be i.e. due to the person setting its name.
Access the UI functionality over the UI property.
Returns the currently active conversation or null
if no conversation is active.
NOTE: calling this method twice while the same conversation is active, will result in two individual conversation API instances being returned. destroying one of them will not cause the other one to also be destroyed. If however the active conversation is closed, all returned Conversation instances will be destroyed.
A promise that either resolves to the currently active conversation or null
if no conversation is open.
Returns the current availability state for the current named area and language.
Promise that resolves to the current availability state.
Returns the number of unread messages.
A promise that resolves to the current number of unread messages.
Returns information about the visitor.
A promise that resolves to the current visitors person info.
Joins an existing conversation with a given PIN.
NOTE: calling this method will NOT automatically open the Unblu UI if it is collapsed. Use ui.openIndividualUi() if this is needed.
The PIN retrieved from the Unblu Agent Desk.
The name the local visitor should have. This is only taken into account if the visitor is not already authenticated.
A promise that resolves to the conversation object giving API access to the joined conversation.
Removes a previously registered listener
The event to unregister from.
The listener to remove.
Registers an event listener for the given event.
The activeConversationChange event.
The listener to be called.
Registers an event listener for the given event.
The notificationCountChange event.
The listener to be called.
Registers an event listener for the given event.
The personChange event.
The listener to be called.
Registers an event listener for the given event.
The personChange event.
The listener to be called.
Opens the existing conversation with the given conversation ID.
NOTE: calling this method will NOT automatically open the Unblu UI if it is collapsed. Use ui.openIndividualUi() if this is needed.
The PIN retrieved from tha Unblu Agent Desk.
A promise that resolves to the conversation object giving API access to the opened conversation.
Starts a new Conversation and places it into the inbound conversation queue.
NOTE: calling this method will NOT automatically open the Unblu UI if it is collapsed. Use ui.openIndividualUi() if this is needed.
The conversation type that shall be started.
The name the local visitor should have. This is only taken into account if the visitor is not already authenticated.
A promise that resolves to the conversation object giving API access to the started conversation.
This class represents the initialized Unblu Visitor JS API.
There is only ever one instance of this api which can be retrieved via
unblu.api.initialize()
, see UnbluStaticApi for more details on configuring and initializing the UnbluApi.The API connects to the integrated version of Unblu. All actions performed via the UnbluApi are executed in the name of and with the rights of current visitor and may have direct effect on the displayed Unblu UI.
For example if a conversation is started from the UnbluApi, the Unblu UI will navigate to it. If a conversation is closed via the API, it will also be closed on the Unblu UI of the visitor. For more information on UI side effects please check the documentation for each method call.
For programmatic administrator access and configuration of Unblu please use the Unblu WebAPI.