Uploaded image for project: 'Chat Solution'
  1. Chat Solution
  2. CSN-5029

Implement Web Conversation Initiation Design Improvements

    XMLWordPrintable

Details

    • Software (SOFTWARE)
    • Sprint# 56 (23 Aug - 3 Sep), Sprint# 58 (27 Sep - 8 Oct), Sprint# 59 (October 13 – 26), Sprint# 60 (Nov 1-12), Sprint# 61 (Nov 17 - Dec 1)
    • 5

    Description

      Problem:

      The web channel customer cannot join a conversation after it is created by Chat Server in response to the init-conversation API request. The init-conversation is a RESTful POST API request which is used by the customer gadget to initialize a conversation.

      Scenario:

      1. The customer opened the customer gadget and clicked the Start Chat button to start a conversation
      2. The customer gadget sent an init-conversation request to the Chat Server with the form data that the customer filled
      3. The chat server creates a conversation object and updates the necessary attributes of this object except for the socket id of the customer
      4. The chat server responds to the init-conversation request with conversation-info
      5. The customer gadget does not join the socket.io room with the conversation-id due to a race condition.
      6. At this stage, the chat server does not have any socket id associated with that conversation because of the race condition described in step number 5

      Impact:

      1. As there is no socket id associated with the conversation in the chat server. There is no way that the chat server can close this conversation after the customer disconnects (closes the browser)
      2. The conversation remains in an open state in the chat server and the real-time database for an indefinite period of time.

       

       

      Proposed Solution:

      Remove init POST API call

      1. Customer Gadget connects to Chat Server via socket.io after clicking the Start Conversation button
      2. Customer Gadget sends an init conversation message over Socket.io
      3. Chat Server creates the conversation object for that conversation and will add socket id in that conversation. Chat Server will add the socket id in the chat room of socket.io
      4. Chat Server will send conversation info to that socket via socket.io

      Impact

      • It will make sure that the customer always joins the conversation after init-conversation request.
      • In case Customer closes the browser, Chat Server will start the CUSTOMER_RECONNECT_TIME flow for that conversation

      Shortcomings:

      We will need to execute some test cases to find any possible regression after its implementation.

      Attachments

        Issue Links

          Activity

            People

              rizwan.mahmood Rizwan Mahmood
              awais.aslam Awais Aslam
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 1 day, 5 hours, 5 minutes
                  1d 5h 5m