Why do I see the Answer Bot in the Chat SDK even though I don't have a subscription?

Return to top
Have more questions? Submit a request

10 Comments

  • Gokul Kattamanchi

    Setting chatConfiguration.isPreChatFormEnabled = false still pulls up Chat with an agent and answer bot message on iOS Chat SDK v2, how do I stop it? Thanks

     

     

    0
  • Arnaud Joly
    Zendesk Customer Advocate

    Hi, thank you for your feedback!

    When you set isPreChatFormEnabled to False in the configuration, did you pass it to UI builder afterward like so? (iOS example here - documentation)

    let chatConfiguration = ChatConfiguration()

    chatConfiguration.isPreChatFormEnabled = false

    let chatEngine = try ChatEngine.engine()

    let viewController = try! Messaging.instance.buildUI(engines: [chatEngine], configs: [messagingConfiguration, chatConfiguration])

    The same applies for Android. Could you tell me if that works for you?

    0
  • Gokul Kattamanchi

    Hi Arnaud, thanks for replying.

    Please find the attached code. This is how I pass the chatConfiguration to the UIbuilder . I keep getting Chat with an agent and answer bot message after signing back to the app (Both after ending the chat and signing out without ending the chat ). I also tried the same code that you have posted but I get the same behaviour.

    var chatConfiguration: ChatConfiguration {

            let chatConfiguration = ChatConfiguration()

            chatConfiguration.isPreChatFormEnabled = false

            chatConfiguration.isOfflineFormEnabled = false

            chatConfiguration.isAgentAvailabilityEnabled = false

            return chatConfiguration

        }


        var chatAPIConfig: ChatAPIConfiguration {

            let chatAPIConfig = ChatAPIConfiguration()

            chatAPIConfig.tags = ["iOS", "chat_v2"]

            return chatAPIConfig

        }    
    func buildMessagingViewController() throws -> UIViewController {

            Chat.instance?.configuration = chatAPIConfig

            return try Messaging.instance.buildUI(engines: engines,

                                                  configs: [chatConfiguration])

        }
    extension ZendeskMessaging {

        var engines: [Engine] {

            let engineTypes: [Engine.Type] = [ChatEngine.self]

            return engines(from: engineTypes)

        }

        

        func engines(from engineTypes: [Engine.Type]) -> [Engine] {

            engineTypes.compactMap { type -> Engine? in

                switch type {

                case is ChatEngine.Type:

                    return try? ChatEngine.engine()

                default:

                    fatalError("Unhandled engine of type: \(type)")

                }

            }

        }

    }





    1
  • Arnaud Joly
    Zendesk Customer Advocate

    Hi Gokul,

    Thank you for your reply and all this information! As it may require more investigation, I created a ticket so we could communicate more directly.

    0
  • Ronny Fenrich

    I'm facing the same issue. Seems like a bug in the SDK.

    The first chat session works fine but after endChat() everything is messed up. Showing the chat UI again will trigger the bot and immediately start a chat session.

    Any news on the bug fix?

    0
  • Arnaud Joly
    Zendesk Customer Advocate

    Hi Ronny,

    Thank you for your feedback, I have converted your comment into a ticket so I could have a better look at this.

    0
  • Martynas Pašilis

    I'm facing the same issue as well. Is there any estimates when this bug will be fixed?

    0
  • Arnaud Joly
    Zendesk Customer Advocate

    Hi Martynas, 

    Thank you for your feedback. On previous cases we saw that some old zchat pods could create this issue and some other specific settings can make the first chat work as expected but have the bot interact in subsequent ones.

    Could you describe the behaviour you are seeing and on which platform/version of SDK you are running your app? I can turn that into a ticket with those information.

    0
  • Martynas Pašilis

    I'm using 2.9.0 iOS chat SDK v2 and I've installed it with carthage. I'm having exact  behavior where first message is sent without bot, and after you close the chat ViewController, every other Messaging.instance.buildUI instance posts answer bot as in screenshots provided in this thread

    This is my ChatConfiguration setup:

    let chatConfiguration = ChatConfiguration()
        chatConfiguration.chatMenuActions = []
        chatConfiguration.isAgentAvailabilityEnabled = false
        chatConfiguration.isChatTranscriptPromptEnabled = false
        chatConfiguration.isPreChatFormEnabled = false
    



    0
  • Ronny Fenrich

    Martynas Pašilis

    I was able to avoid the answer bot in my project with a little workaround:
    the bug happens when the viewController returned from Messaging.instance.buildUI() is retained (by having a weak reference). I fixed it by listening to the .viewDidDisappear event and nil that reference.

    1

Please sign in to leave a comment.

Powered by Zendesk