Static ReadonlyATTR_ID of the conversation currently open in the embedded app. If set, the conversation is opened in the embedded app.
Opens the conversation with the given conversation ID.
This can be set before Unblu is initialized. The conversation is then opened as soon as Unblu is initialized.
If the conversation doesn't exist, or the user doesn't have permission to access it, a dialog is displayed with the appropriate error message.
In such cases, the conversation ID is reset to null.
The id of the conversation to open
UnbluEmbeddedAppElement.ATTR_CONVERSATION_ID to set this as an attribute
Registers for the UnbluEmbeddedAppElement.OPEN_CONVERSATION_CHANGED event
Optionaloptions: boolean | AddEventListenerOptionsRegisters an open conversation interceptor that's triggered whenever a conversation should be opened from the embedded app's inbox view.
The interceptor, which should resolve to an OpenConversationInterceptorResult with action OPEN if the embedded app UI should open the conversation or DISCARD if the embedded app will do nothing and the integrating page must handle the request.
see #unregisterOpenConversationInterceptor to unregister the interceptor
Removes a listener registration for the UnbluEmbeddedAppElement.OPEN_CONVERSATION_CHANGED event
Unregisters an open conversation interceptor used previously
The interceptor to unregister
see #registerOpenConversationInterceptor to register a new interceptor
Static ReadonlyOPEN_Event emitted every time the currently open conversation changes in the embedded app.
This is a custom element which can be used to integrate the agent's embedded app (inbox and conversations) into a webpage at a specific location.
To use the custom element, place a tag named "unblu-embedded-app" somewhere in the web page's
body. By default, the element shows the agent's inbox. If aconversation-idattribute is set on the element, it shows that conversation instead.The size and positioning depend entirely on the styles applied to it by the website that it's embedded in. The styling within the web component, on the other hand, aren't affected by the website's styles,because it uses a shadow root for its content. Unblu provides numerous configuration properties that let you customize the web component's appearance to suit your organizations requirements.
The example above only adds the embedded app component to the
DOMwithout initializing anything. To initialize and display content, you must create the UnbluAgentEmbeddedApi.The Unblu UI inside the custom element always fills the whole content of the element irrespective of the size it's given.
Note: It is possible to display as many UnbluEmbeddedAppElement and UnbluConversationElement as one likes with the restriction that one conversation can only be displayed in one of them.
Attributes
conversation-id: ID of the conversation to open in the embedded app. See UnbluEmbeddedAppElement.conversationId.Events
openConversationChanged: fires when the open conversation changes. See UnbluEmbeddedAppElement.OPEN_CONVERSATION_CHANGED.Interceptors
You can register an interceptor to control what happens when a conversation is opened from the embedded app's inbox view. This is useful when you want to open the conversation in a separate
<unblu-conversation>component rather than within the embedded app itself.See
MDN Custom Element
No Inherit Doc