Unblu Agent Embedded JS API
    Preparing search index...

    Class UnbluInboxApi

    This class provides functionality around the agent inbox. The inbox contains the conversations that the agent is participating in.

    Index

    Constructors

    • Parameters

      • inboxModule: InboxModule
      • apiStateProvider: ApiStateProvider

      Returns UnbluInboxApi

    Methods

    • Returns the conversations in the inbox.

      It includes all conversations independent of the tabs inside the inbox.

      Returns Promise<ConversationInfo[]>

      The conversations in the inbox

      UnbluApiError with type UnbluErrorType.ILLEGAL_STATE when the API instance is deinitialized.

    • Get the metadata of the conversation. Metadata access to the conversation has to be allowed via configuration of the conversation.

      Parameters

      • conversationId: string

        The ID of the conversation for which the metadata should be retrieved

      Returns Promise<Metadata>

      The conversation metadata

      UnbluApiError with type UnbluErrorType.ILLEGAL_STATE when the API instance is deinitialized.

      UnbluApiError with type UnbluErrorType.ACTION_NOT_GRANTED when there is no permission to access the metadata.

    • Removes a previously registered listener

      Parameters

      • event: InboxEventType

        The event to unregister from.

      • listener: (data?: any) => void

        The listener to remove.

      Returns Promise<boolean>

      UnbluApiError with type UnbluErrorType.ILLEGAL_STATE when the API instance is deinitialized.

    Events

    CONVERSATION_ADDED: "conversationAdded" = ...

    Event emitted whenever a conversation is added to the inbox.

    conversationAdded

    CONVERSATION_REMOVED: "conversationRemoved" = ...

    Event emitted whenever a conversation is removed from the inbox.

    conversationRemoved

    CONVERSATIONS_CHANGED: "conversationsChanged" = ...

    Event emitted whenever a conversation is added to, removed from, or changed in the inbox.

    conversationsChanged