Last post Oct 19, 2014 12:25 AM by Ruchira
Oct 17, 2014 04:39 AM|jed0228|LINK
I have created an mvc 4 chat page in VS2010 by following
this tutorial. I plan to turn my page to a live support chat. My requirement is like this:
1. Visitors can view support agents who are online with their current status (available to chat, currently approving request to chat, attending to a request) and "request" buttons beside every name. The request button will only be enabled if the agent is
available to chat.
2. If the visitor clicks request button for a particular agent, a request to chat with the agent would be sent for his/her confirmation.
3. If the agent accepts the request to chat, the visitor will be redirected to the chat page of the agent.
For support agents:
1. They have a login page wherein after logging in, they would be flagged as "online" to chat with visitors. They will then be redirected to their own chatroom.
2. If a visitor requests to chat with the agent, the agent would be flagged as "currently approving request" and other visitors would be prevented to chat with the agent.
3. If the agent approves the request to chat by the visitor, the visitor will be redirected to the agent's chatroom and a timer would start for monitoring the duration of the chat.
4. After the chat has finished, the agent can end the chat session. The timer wll stop and a chat log would be saved into database. The agent's status will be "available" again.
Any help would be greatly appreciated. Thanks in advance.
Oct 17, 2014 09:11 AM|Perkinsville|LINK
You might also want to look at the WebSocket API.
Oct 19, 2014 12:25 AM|Ruchira|LINK
I've implemented one to one chatting with SignalR in my below blog post
You can also see how I've shown the online users list and how I'm updating that online list.
You can have a look and implement your requirements on top of it. When you select an agent to chat, you can set the status of the agent by firing another extra method on select event of the drop down list.
Please 'Mark as Answer' if this post helps you