Static
Readonly
ATTR_The access token used to log the user in before initializing Unblu.
Note: Changes to this attribute trigger a reinitialization of Unblu if UnbluEmbeddedAppElement.ATTR_AUTO_INIT is true.
UnbluEmbeddedAppElement.accessToken to set or get this via a property
Static
Readonly
ATTR_The API Key to connect this app with a specific Unblu account This is the minimum configuration that has to be done to trigger the initialization of Unblu.
Note: Changes to this attribute trigger a reinitialization of Unblu if UnbluEmbeddedAppElement.ATTR_AUTO_INIT is true.
UnbluEmbeddedAppElement.apiKey to set or get this via a property
Static
Readonly
ATTR_Defines if Unblu automatically tries to (re-)initialize as soon as an attribute or property changes that triggers (re-)initialization.
To trigger a initialization at least the attribute ATTR_API_KEY or property UnbluEmbeddedAppElement.apiKey.
Static
Readonly
ATTR_Opens the conversation with the specified ID. If Unblu is not initialized yet, it will wait for the initialization and then automatically open the specified conversation. If Unblu is already initialized, the conversation will be opened directly.
If the conversation doesn't exist or the user doesn't have the right to access it, a dialog will be displayed with the respective error message.
Static
Readonly
ATTR_The path pointing to the root of the Unblu collaboration server.
"/unblu".
**Note**: Changes to this attribute trigger a reinitialization of Unblu if {@link UnbluEmbeddedAppElement.ATTR_AUTO_INIT} is true.
UnbluEmbeddedAppElement.entryPath to set or get this via a property
Static
Readonly
ATTR_When this attribute is set to true, the embedded app will ignore the position and size set to its element and will used fixed positioning to display itself to cover the whole website.
This is useful when the user is currently in a call.
This can be set even if the API is not initialized yet. The value will then be applied on initialization.
Note: The user itself can also toggle this inside the UI.
Static
Readonly
ATTR_The timeout im milliseconds that should be waited for the Unblu integration to load.
30'000 (30 seconds).
UnbluEmbeddedAppElement.initTimeout to set or get this via a property
Static
Readonly
ATTR_The locale (language) used for all Unblu UIs. If not specified this is derived from the webpage or the browser.
Note: Changes to this attribute trigger a reinitialization of Unblu if UnbluEmbeddedAppElement.ATTR_AUTO_INIT is true.
Static
Readonly
ATTR_The named area for which the configuration should be loaded and with which new queue requests will be labeled. If not specified this can be derived from the corresponding meta tag on the webpage or the domain.
Note: Changes to this attribute trigger a reinitialization of Unblu if UnbluEmbeddedAppElement.ATTR_AUTO_INIT is true. If this is not desired it can be prevented by changing the named area via a meta tag, however in this case this will only effect the queue routing and not the configuration. Alternatively you can disable the automatic initialization.
Static
Readonly
ATTR_The URL to the collaboration server.
If not specified it is assumed that the server is reachable on the domain of the current webpage at the defined UnbluEmbeddedAppElement.entryPath
Note: Changes to this attribute trigger a reinitialization of Unblu if UnbluEmbeddedAppElement.ATTR_AUTO_INIT is true.
UnbluEmbeddedAppElement.serverUrl to set or get this via a property
Static
Readonly
ATTR_Sets the view mode of the embedded app element.
Depending on the view mode the UI is displayed the following way:
ViewMode.SPLIT: The UI will be divided into two parts. The list of conversations is displayed on the left and the active conversation on the right side.
ViewMode.SINGLE: Both the conversation list and the active conversation will be displayed in the same view using UI navigation to switch between them.
ViewMode.AUTO: The UI will automatically switch back and forth between the two other modes depending on the available width. The trigger point when to switch between the two modes can be configured on the Unblu collaboration server.
This value can be set even if the API is not initialized yet. The value will then be applied on initialization.
The access token used to log the user in before initializing Unblu.
Note: Changes to this property trigger a reinitialization of Unblu if UnbluEmbeddedAppElement.autoInit is true.
UnbluEmbeddedAppElement.ATTR_ACCESS_TOKEN to set this as an attribute
The API Key to connect this app with a specific Unblu account. This is the minimum configuration that has to be done to trigger the initialization of Unblu.
Note: Changes to this property trigger a reinitialization of Unblu if UnbluEmbeddedAppElement.autoInit is true.
UnbluEmbeddedAppElement.ATTR_API_KEY to set this as an attribute
The current state of the API.
Defines if Unblu automatically tries to (re-)initialize as soon as an attribute or property changes that triggers (re-)initialization. Attributes/properties that trigger a (re-)initialization have a note in their documentation. At least the attribute ATTR_API_KEY or property UnbluEmbeddedAppElement.apiKey has to be configured to trigger an initialization.
If this property gets set from false to true, it will automatically initialize if it is not already initialized. If it is already initialized, it will NOT deinitialize.
Opens the conversation for the given conversation ID.
This can be set already before Unblu is initialized. The conversation will then be opened as soon as Unblu gets initialized.
If the conversation doesn't exist or the user doesn't have the right to access it, a dialog will be displayed with the respective error message.
In such a case the conversation ID will be reset to null
.
The id of the conversation to open
UnbluEmbeddedAppElement.ATTR_CONVERSATION_ID to set this as an attribute
The entry path on the collaboration server.
"/unblu".
**Note**: Changes to this property trigger a reinitialization of Unblu if {@link UnbluEmbeddedAppElement.autoInit} is true.
UnbluEmbeddedAppElement.ATTR_ENTRY_PATH to set this as an attribute
When this attribute is set to true, the embedded app element will ignore the position and size set to its element and will used fixed positioning to display itself to cover the whole website.
This is useful when the user is currently in a call.
This can be set even if the API is not initialized yet. The value will then be applied on initialization.
Note: The user itself can also toggle this inside the UI.
True to enable fullscreen, false otherwise.
false
The timeout im milliseconds that should be waited for the Unblu integration to load.
30'000 (30 seconds).
UnbluEmbeddedAppElement.ATTR_INIT_TIMEOUT to set this as an attribute
The locale (language) used for all Unblu UIs. If not specified this is derived from the webpage or the browser.
Note: Changes to this property trigger a reinitialization of Unblu if UnbluEmbeddedAppElement.autoInit is true.
UnbluEmbeddedAppElement.ATTR_LOCALE to set this as an attribute
The named area for which the configuration should be loaded and with which new queue requests will be labeled. If not specified this can be derived from meta tags on the webpage.
Note: Changes to this property trigger a reinitialization of Unblu if UnbluEmbeddedAppElement.autoInit is true. If this is not desired it can be prevented by changing the named area via a meta tag, however in this case this will only effect the queue routing and not the configuration. Alternatively you can disable the auto init.
UnbluEmbeddedAppElement.ATTR_NAMED_AREA to set this as an attribute
The URL to the collaboration server.
If not specified it is assumed that the server is reachable on the same domain of the current webpage at the defined UnbluEmbeddedAppElement.entryPath
Note: Changes to this property trigger a reinitialization of Unblu if UnbluEmbeddedAppElement.autoInit is true.
UnbluEmbeddedAppElement.ATTR_SERVER_URL to set this as an attribute
Sets the view mode of the embedded app element.
Depending on the view mode the UI is displayed the following way:
ViewMode.SPLIT: The UI will be divided into two parts. The list of conversations is displayed on the left and the active conversation on the right side.
ViewMode.SINGLE: Both the conversation list and the active conversation will be displayed in the same view using UI navigation to switch between them.
ViewMode.AUTO: The UI will automatically switch back and forth between the two other modes depending on the available width. The trigger point when to switch between the two modes can be configured on the Unblu collaboration server.
This value can be set even if the API is not initialized yet. The value will then be applied on initialization.
The new view mode to use
{@link ViewMode.AUTO}
Registers for the UnbluEmbeddedAppElement.STATE_CHANGE event
Optional
options: boolean | AddEventListenerOptionsRegisters for the UnbluEmbeddedAppElement.READY event
Optional
options: boolean | AddEventListenerOptionsRegisters for the UnbluEmbeddedAppElement.ERROR event
Optional
options: boolean | AddEventListenerOptionsRegisters for the UnbluEmbeddedAppElement.DEINITIALIZING event
Optional
options: boolean | AddEventListenerOptionsRegisters for the UnbluEmbeddedAppElement.DEINITIALIZED event
Optional
options: boolean | AddEventListenerOptionsRegisters for the UnbluEmbeddedAppElement.ACTIVE_CONVERSATION_CHANGE event
Optional
options: boolean | AddEventListenerOptionsRegisters for the UnbluEmbeddedAppElement.FULLSCREEN_CHANGE event
Optional
options: boolean | AddEventListenerOptionsRegisters for the UnbluEmbeddedAppElement.VIEW_MODE_CHANGE event
Optional
options: boolean | AddEventListenerOptionsDeinitializes the app element and destroys all of its containing UI. By changing one of the attributes that trigger a reinitialization (e.g. UnbluEmbeddedAppElement.apiKey) the app element will be automatically initialized again (if the value is really changed).
Note: Calling this method will not remove the element itself out of the DOM.
Initializes the app element to connect to the configured collaboration server and load the UI.
If the API is already initializing or fully initialized, additional calls to this function will return the same instance of UnbluEmbeddedApi.
This needs to be called if UnbluEmbeddedAppElement.autoInit is set to false.
UnbluEmbeddedApi after initialization was successful
Removes a listener registration for the UnbluEmbeddedAppElement.STATE_CHANGE event
Removes a listener registration for the UnbluEmbeddedAppElement.READY event
Removes a listener registration for the UnbluEmbeddedAppElement.ERROR event
Removes a listener registration for the UnbluEmbeddedAppElement.DEINITIALIZING event
Removes a listener registration for the UnbluEmbeddedAppElement.DEINITIALIZED event
Removes a listener registration for the UnbluEmbeddedAppElement.ACTIVE_CONVERSATION_CHANGE event
Removes a listener registration for the UnbluEmbeddedAppElement.FULLSCREEN_CHANGE event
Removes a listener registration for the UnbluEmbeddedAppElement.VIEW_MODE_CHANGE event
Static
Readonly
ACTIVE_Event emitted every time one of the conversations accessible to the current user changes or one is added or removed.
Static
Readonly
DEINITIALIZEDEvent emitted when the de-initialization of the API has finished.
It usually makes sense to use this event if a re-initialization is required after de-init.
Static
Readonly
DEINITIALIZINGEvent emitted when the de-initialization of the API is started..
It usually makes sense to use this event to clean up resources and/or unregistering of listeners so they don't try to use the API again until it is initialized again.
Static
Readonly
ERROREvent emitted if the API initialization fails.
It usually makes sense to use this event if there is some general action that has to be triggered when the API initialization fails.
Static
Readonly
FULLSCREEN_Event emitted every time the embedded app switches to fullscreen mode or back.
Static
Readonly
READYEvent emitted as soon as the API is initialized.
It usually makes sense to use this event to wait for APIs on this element to be ready. E.g. the UnbluEmbeddedAppElement.personInfo or UnbluEmbeddedAppElement.agentAvailable. You will find a note in the documentation of the properties when they are only available after initialization.
Static
Readonly
STATE_Event emitted whenever the API state changes
Static
Readonly
VIEW_Event emitted every time the view mode changes.
This is a custom element which can be used to integrate Unblu into a webpage at a specific location.
By itself this contains only the definition of the custom element and will load further JavaScript from the collaboration server on initialization to provide the full functionality.
To use the custom element just place a tag named "unblu-embedded-app" somewhere into the webpage
s
body`.The size and positioning fully depends on the styles applied to the element by the website it is embedded into. The styling within the unblu embedded app can't be influenced by the website's styles however as a shadow root is used for its content. Unblu provides a large list of configuration properties to nicely integrate the unblu embedded app's visual appearance with the website it is embedded into.
The example above will simply add the unblu embedded app into the
DOM
but it won't initialize anything. To initialize the element with Unblu content at least the attribute ATTR_API_KEY or property UnbluEmbeddedAppElement.apiKey need to be defined. If UnbluEmbeddedAppElement.autoInit is set to true (default), it will automatically start the initialization, as soon as the API key is defined either via its attribute ATTR_API_KEY or property UnbluEmbeddedAppElement.apiKey. If not a call to UnbluEmbeddedAppElement.initialize has to be done to trigger the initialization.Initializing:
Initialization can either be done manually or automatically. If the element is configured to do automatic initialization ATTR_AUTO_INIT / UnbluEmbeddedAppElement.autoInit the initialization will be automatically started as soon as at least the API key ATTR_API_KEY / UnbluEmbeddedAppElement.apiKey is defined. If you intent to define other attributes/properties relevant for the initialization these must all be set in the same JavaScript execution cycle. If automatic initialization is disabled the initialization must be done manually by calling the UnbluEmbeddedAppElement.initialize method.
There are additional attributes/properties which can be defined to define from where and how the Unblu JavaScript code is loaded from the collaboration server.
The Unblu UI inside the custom element will always fill the whole content of the unblu-embedded-app independent of what size it is given.
Note: if an Unblu Floating UI is already integrated on the website via the Floating JS API, the embedded app will automatically deinitialize it as there can always only one active instance of Unblu on the page.
See
MDN Custom Element
No Inherit Doc