iOS Mobile SDK endChat() behaviour

Planned

11 Comments

  • Ronan McHugh
    Comment actions Permalink

    Hi Edurad,

    the session should terminate after you call 

    ZDCChat.end()

    I think that since you are calling

    ZDCChat.start()

    straight after that the session may not have had time to reliably disconnect and it keeps the chat session alive (and the inconsistent behaviour you see). The chat session should terminate after `ZDCChat.end()` if given a little time.

    Hope this helps,

    Ronan.

    0
  • Eduard L.
    Comment actions Permalink

    Thanks Ronan,

    We tried your suggestion and only after more than 30 seconds does the connection seem to really disconnect. That's not a viable option for us because we can't force the user to wait that long. BTW, examining the connectionStatus field, it is set to ZDCConnectionStatusUninitialized as soon as ZDCChat.end() is called. So I don't really understand why the session is not really dropped.

    Is there a developer from the iOS SDK team who can help us with this issue?

    Based on our requirements, we need to be able to start new chat sessions with different tags depending on app-specific context.

    Thanks,

    Eduard

    0
  • Daniel Sessions
    Comment actions Permalink

    Hi Eduard,

    Thanks for reaching out to us regarding this issue you're experiencing.

    As Ronan has pointed out, calling ZDCChat.end() does not have an immediate effect. Once the call has been made it can then take a period of time for the session to be disconnected by the backend.

    Calling end() and then immediately calling start() again to start a new session is not a supported behavior. 

    Let us know if we can help in any other way.

    Thanks

    Dan

     

     

     

     

     

    0
  • Eduard L.
    Comment actions Permalink

    Thanks Dan,

    I understand the limitation. Is it in the plans to later support this behaviour? Our use case is that a user can initiate a chat with our global helpdesk. Then he might change his mind and decide to start a chat with a more specific context (which we handle with tags). So when the user starts a new chat, we set the required tags in the Config object. However, since end() of the previous doesn't end the session right away, the behaviour we see is that tags that were meant for the new conversation, simply get appended to the existing conversation.

    The reverse is also happening: In the Zendesk console a new conversation shows up, but we can still see the old tags from the previous conversation. So it's a bit confusing as behaviour.

    Please let me know if you have suggestions for accomplishing our use case another way.

    Eduard

    0
  • Kevin
    Comment actions Permalink

    +1

     

    Is there plans to support a more immediate end chat feature? Seems like it should be easy considering it already exists by clicking the native "End Chat" button in the widget. Why can't I just do that via the API?

    0
  • Webmob Technologies
    Comment actions Permalink

    This issue still persists while using the Zendesk chat SDK. After calling endChat(), it shows 'XXX has left chat' in the support dashboard, but in the app, the chat appears to persist and hence new chat cannot be created.

    0
  • Andrew Dietrich
    Comment actions Permalink

    Hi Webmob team,

    For now, this is expected behavior. There is a delay before the chat is fully ended. Please see Daniel's comment earlier in this thread for more information:

    https://develop.zendesk.com/hc/en-us/community/posts/360028918273/comments/360004489233 

    0
  • Webmob Technologies
    Comment actions Permalink

    Hi Andrew,

    Thanks for the response. 
    The delay here is random, and cannot be determined. Is there any way in the SDK to detect whether the chat is fully disconnected or not? Is the time for the session to end fixed? 

    0
  • Andrew Dietrich
    Comment actions Permalink

    The delay does indeed vary, as our chat mediators need to receive and process the request to end the chat. There isn't a way to detect whether the chat has fully ended. What is the use case you are going for that would require that?

    0
  • Webmob Technologies
    Comment actions Permalink

    The use case is similar to what is described in this comment. Also, I am trying to port the native SDKs to react-native. The end chat button is causing an issue where the user cannot open the chat again after calling  ZDCChat.end(), since the session is not disconnected.

    0
  • Andrew Dietrich
    Comment actions Permalink

    For that kind of use case, I'd generally recommend keeping the chat alive and doing a live transfer from one agent to another (i.e. from the "global" context to the "specific" context). More on transferring chats here:

    https://support.zendesk.com/hc/en-us/articles/360022184574-Using-Zendesk-Chat#topic_jy1_hxn_sx

     

    We don't currently support non-native frameworks. There are pre-existing third party wrappers out there, though, like this one:
    https://github.com/taskrabbit/react-native-zendesk-chat

    0

Please sign in to leave a comment.

Powered by Zendesk