Interface UnbluVisitorClient

    • Method Detail

      • startNewConversation

        void startNewConversation​(@NonNull
                                  com.unblu.sdk.core.internal.visitor.ConversationType conversationType,
                                  @Nullable
                                  SuccessCallback<UnbluConversation> success,
                                  @Nullable
                                  com.unblu.sdk.core.internal.InitConversationExceptionCallback failure)
        Starts a new conversation with the given conversation type. If the UI was already shown, it will open the conversation in the UI.
        If it was not, the Unblu UI should be displayed
        UnbluClient.getMainView()

        This is an asynchronous call. Use the callbacks to check for success / failure.

        Parameters:
        conversationType - The initial type of the new conversation.
        success - Optional callback that will be called with the UnbluConversation after the conversation was started and is display (if there is a UI).
        failure - Optional callback if there was problem to start the conversation.
      • startNewConversation

        default void startNewConversation​(@NonNull
                                          com.unblu.sdk.core.internal.visitor.ConversationType conversationType,
                                          @Nullable
                                          java.lang.String visitorData,
                                          @Nullable
                                          SuccessCallback<UnbluConversation> success,
                                          @Nullable
                                          com.unblu.sdk.core.internal.InitConversationExceptionCallback failure)
        Starts a new conversation with the given conversation type. If the UI was already shown, it will open the conversation in the UI.
        If it was not, the Unblu UI should be displayed
        UnbluClient.getMainView()

        This is an asynchronous call. Use the callbacks to check for success / failure.

        Parameters:
        conversationType - The initial type of the new conversation.
        visitorData - Custom data
        success - Optional callback that will be called with the UnbluConversation instance after the conversation was started and is display (if there is a UI).
        failure - Optional callback if there was problem to start the conversation.
      • startNewConversation

        void startNewConversation​(@NonNull
                                  com.unblu.sdk.core.internal.visitor.ConversationType conversationType,
                                  @Nullable
                                  java.lang.String visitorData,
                                  @Nullable
                                  ConversationRecipient conversationRecipient,
                                  @Nullable
                                  SuccessCallback<UnbluConversation> success,
                                  @Nullable
                                  com.unblu.sdk.core.internal.InitConversationExceptionCallback failure)
        Starts a new conversation with the given conversation type. If the UI was already shown, it will open the conversation in the UI.
        If it was not, the Unblu UI should be displayed
        UnbluClient.getMainView()

        This is an asynchronous call. Use the callbacks to check for success / failure.

        Parameters:
        conversationType - The initial type of the new conversation.
        visitorData - Custom data
        conversationRecipient - Custom recipient data
        success - Optional callback that will be called with the UnbluConversation instance after the conversation was started and is display (if there is a UI).
        failure - Optional callback if there was problem to start the conversation.
      • joinConversation

        void joinConversation​(@NonNull
                              java.lang.String pin,
                              @Nullable
                              SuccessCallback<UnbluConversation> success,
                              @Nullable
                              com.unblu.sdk.core.internal.InitConversationExceptionCallback failure)
        Joins an Unblu co-browsing session that was started by an agent.

        This is an asynchronous call. Use the callbacks to check for success / failure.

        Parameters:
        pin - The pin of the conversation which shall be joined. (The pin is provided by the agent desk.)
        success - Optional callback that will be called with the UnbluConversation instance once the conversation was successfully joined.
        failure - Optional callback that will be called if the conversation could not be joined.
      • isAgentAvailable

        void isAgentAvailable​(@NonNull
                              SuccessCallback<java.lang.Boolean> success,
                              @Nullable
                              NotInitializedExceptionCallback failure)
        Checks if at least one agent is available for co-browsing / chat.

        This is an asynchronous call. Use the callbacks to check for success / failure.

        Parameters:
        success - Callback that will be called with true if at least one agent is available, false otherwise.
        failure - Optional callback that will be called on failure.
      • isAgentAvailable

        io.reactivex.rxjava3.core.Observable<java.lang.Boolean> isAgentAvailable()
        Return an observable boolean that checks agent availability
        Returns:
        Observable
      • setConversationInterceptor

        default void setConversationInterceptor​(ConversationInterceptor conversationInterceptor)
        Set the given conversation interceptor which is triggered for each new conversation.

        Parameters:
        conversationInterceptor - the specified conversation interceptor
      • setNamedArea

        void setNamedArea​(java.lang.String namedArea)
        Sets or updates the named area.
        IMPORTANT: this has only an effect on the queue filtering when a new conversation request is done and will not affect the configuration. To affect the configuration, the name area has to be defined in the UnbluClientConfiguration.
        Parameters:
        namedArea - The named area meta tag id which is configured on the agent desk.