0

I have implemented live chat on Android using com.salesforce.service:chat-ui:4.1.0 SDK. The provided UI seems to show the Pre-Chat form, even when only providing hidden ChatUserData to the ChatConfiguration.Builder.

Example:

    val chatConfigurationBuilder = ChatConfiguration.Builder(
      ORG_ID,
      BUTTON_ID,
      DEPLOYMENT_ID,
      LIVE_AGENT_POD
    )

    var prechatFieldsList = mutableListOf<ChatUserData>()

    val chatUserData = ChatUserData("Meta", "Data", true)
    prechatFieldsList.add(chatUserData)

    chatConfigurationBuilder.chatUserData(prechatFieldsList)

    val chatConfiguration = chatConfigurationBuilder.build()

    ChatUI.configure(ChatUIConfiguration.create(chatConfiguration))
      .createClient(context)
      .onResult { _, 
        chatUIClient -> chatUIClient.startChatSession(getCurrentActivity()) 
    }

I followed the example provided here

Providing pre-chat fields with both a label and value in the iOS SDK works as expected, where this is considered hidden data and the Pre-Chat form does not appear before initiating the chat.

Another important note, the Pre-Chat form is empty, i.e. there are no fields for the user to input data into. It seems as though the SDK knows these are hidden fields but a bug exists that causes it to show regardless. If no ChatUserData is provided, then the form doesn't show.

Has anyone seen this? Is it a known issue? Is there a fix? Env: - Android 9 API 28 (same behaviour on other versions) - Nexus 5 Emulator - chat-ui:4.1.0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.