Access the conversations the agent is currently connected to, and connect to or disconnect from conversations
Access conversation history functionality
Access inbox functionality
Access notification functionality
Adds the label with the given labelName to the local person. This only adds the label if:
Empty once the operation is done
UnbluApiError with type UnbluErrorType.ILLEGAL_STATE when the API instance is deinitialized.
UnbluApiError if the call fails
Deinitializes the Unblu Embedded Agent Web Component. After deinitialization, the API is no longer usable and the UI is completely destroyed.
Returns the current connection state.
The current connection state
UnbluApiError with type UnbluErrorType.ILLEGAL_STATE when the API instance is deinitialized.
Returns the information about the local person.
The current person information
UnbluApiError with type UnbluErrorType.ILLEGAL_STATE when the API instance is deinitialized.
Returns 'true' if this instance of the API is deinitialized, 'false' otherwise.
Removes a previously registered listener
The event to unregister from.
The listener to remove.
UnbluApiError with type UnbluErrorType.ILLEGAL_STATE when the API instance is deinitialized.
Registers an event listener for the given event.
The personChange event.
The listener to be called.
UnbluApiError with type UnbluErrorType.ILLEGAL_STATE when the API instance is deinitialized.
Registers an event listener for the given event.
The connectionStateChange event.
The listener to be called.
Registers an event listener for the given event.
The deinitializing event.
The listener to be called.
UnbluApiError with type UnbluErrorType.ILLEGAL_STATE when the API instance is deinitialized.
Registers an event listener for the given event.
The deinitialized event.
The listener to be called.
UnbluApiError with type UnbluErrorType.ILLEGAL_STATE when the API instance is deinitialized.
Removes the label with the given labelName from the local person. This only removes the label if:
Empty once the operation is done
UnbluApiError with type UnbluErrorType.ILLEGAL_STATE when the API instance is deinitialized.
UnbluApiError if the call fails
Sets a custom interceptor which is triggered when a new conversation is started (initiated from UI or JavaScript).
The interceptor which is called before a new conversation is started
Empty once the interceptor has been applied and is active
UnbluApiError with type UnbluErrorType.ILLEGAL_STATE when the API instance is deinitialized.
Starts a new conversation with the given options.
The options used for the conversation
The ID of the new conversation. It will not connect to the conversation automatically. Use UnbluConversationConnectionsApi.connect to connect it.
UnbluApiError with type UnbluErrorType.ILLEGAL_STATE when the API instance is deinitialized.
Static ReadonlyCONNECTION_Event emitted every time the connection state changes.
connectionStateChange
Static ReadonlyDEINITIALIZEDEvent emitted when this instance got de-initialized and has to be initialized again.
deinitialized
Static ReadonlyDEINITIALIZINGEvent emitted when this instance has been deinitialized and is not usable. It can only be initialized again once it's fully deinitialized.
deinitializing
Static ReadonlyPERSON_Event emitted every time the local person changes, for example, due to the person setting their name.
personChange
This is the main class to interact with the Unblu Agent Embedded API after initialization.
An instance of the UnbluAgentEmbeddedApi is returned by calling UnbluStaticAgentEmbeddedApi.initialize or listening to the UnbluStaticAgentEmbeddedApi.READY event.
Note: After deinitialization, an instance of UnbluAgentEmbeddedApi is no longer usable and throws errors on API calls. To access the API again, you must initialize Unblu again.