Chat between User & Agent
by krishna
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?
- Creating a new session
- Matching the user to an agent.
- Exchanging messages back and forth between the customer/agent
- End of session
- Resume session (only for incomplete sessions).
- Enumerate sessions
- 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…
Recent Comments
No comments to show.
Archives
- January 2026
- November 2025
- October 2025
- September 2025
- August 2025
- July 2025
- June 2025
- May 2025
- April 2025
- March 2025
- November 2024
- October 2024
- September 2024
- August 2024
- July 2024
- June 2024
- May 2024
- April 2024
- March 2024
- February 2024
- January 2024
- December 2023
- November 2023
- February 2018
- February 2012
- January 2012
- December 2011
- October 2011
- August 2011
- July 2011
- May 2011
- January 2011
- November 2010
- October 2010
- September 2010
- July 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- August 2008
- July 2008
- June 2008
- December 2007
- April 2007
- January 2007
Categories
- Access Denied
- Agentic Design Patterns
- Artificial Intelligence
- Certification
- CKA
- CKAD
- Curious Shorts
- Data Science
- DevOps or DevSecOps
- DS-ML-AI
- Errors
- GenAI
- GitHub Actions
- Hackathon-Workshops
- Hint
- illegalArgument
- Interview
- Jenkins
- KCNA
- Machine Learning
- MCP
- MLOps
- Pattern
- Pipeline
- Product
- System Design
- Workshops