Chat between User & Agent

System requirements:
  • People can start a text conversation with an agent through the DayOne mobile app or on the web after successful authentication.
  • They wait and get connected to an agent.
  • They can have a conversation with the agent. Ask questions. They exchange messages back and forth, until they mutually agree that the questions are all answered and then then session comes to a logical end.
  • If they get disconnected, we want the ability for them to resume the session and pick up from where they left.
  • As agents wrap up a session, we want them to pick up the new waiting customer.
  • Assume that each agent is expected to handle N(=2) concurrent chat sessions at any given time.
  • For this exercise, assume that the agents are human and to keep things simple, assume that any agent can handle any request.
  • Users should be able to look at all the chat conversations they have had in the last 14 days (both completed and incomplete ones). When they click on it, they can access all the messages that were exchanged. For legal compliance, we are required to store these conversations for up to 90 days in our systems.
  • On the customer agent side, assume that there is a tool that they will use to
    • a) Accept a new chat session.
    • b) Respond to these chat conversations for the ongoing sessions that they are handling.
    • c) Access DayOne customer data like order info, profile info, transactional data etc.,
    • d) Agents work in shifts. Also, they can take short breaks during their shift to grab water etc., They can mark themselves as wanting to go on a break. Then once the ongoing sessions complete, they can take the break, and they mark themselves as active again. And then we start assigning new sessions to them.
Non-functional requirements:
We want to build fairness into the customer-agent matching process:
  • Customer who arrived first should be matched with an agent first.
  • An agent who completed their session first should be assigned a new session first.
Problem Definition:
Design the backend systems that will manage the life cycle of a chat session. What services do we need? What are their responsibilities? How do we store/track session state?
  1. Creating a new session
  2. Matching the user to an agent.
  3. Exchanging messages back and forth between the customer/agent
  4. End of session
  5. Resume session (only for incomplete sessions).
  6. Enumerate sessions
  7. View the messages from a past session.

 

System requirements: People can start a text conversation with an agent through the DayOne mobile app or on the web after successful authentication. They wait and get connected to an agent. They can have a conversation with the agent. Ask questions. They exchange messages back and forth, until they mutually agree that the questions are…

Leave a Reply

Your email address will not be published. Required fields are marked *