Interface ConversationInterceptorWithRecipient


  • public interface ConversationInterceptorWithRecipient
    Interface for intercepting new Conversation

    Make sure when defining, that only one signature is used

    • Method Detail

      • onNewConversation

        void onNewConversation​(@NonNull
                               com.unblu.sdk.core.internal.visitor.ConversationType conversationRequestType,
                               @Nullable
                               java.lang.String customVisitorData,
                               @Nullable
                               ConversationRecipient conversationRecipient,
                               @NonNull
                               ConversationInterceptCallback interceptCallback)
        Interceptor function which is called every time a new conversation is started from the UI or visitor SDK API. If visitorData was passed to the startConversation api call it will be passed on to this function. If not, visitorData will be null
        Parameters:
        conversationRequestType - The type of the conversation being started.
        customVisitorData - Optional visitorData, only present if passed to the onNewConversation method. This is referring to visitorData in the Web API
        conversationRecipient - Optional recipient, only present if passed to the startConversation method
        interceptCallback - This callback ConversationInterceptCallback can be triggered with new/updated visitorData/recipientData. But it must always be triggered! If not, no conversation will be started.