Closed dennishenry closed 4 years ago
After a bit of work on this, I found that we were opening new chats without departments via the REST API. We never included a department id in the POST when hitting /api/v1/livechat/visitor
. Because the new chat had no department, RocketChat was notifying all users. By the time our agents checked the notification, the new chat was forwarded into a department leading to the confusion. In the RC source, I found the department param to avoid this, but it's missing from your documentation.
Here is the param in question : https://github.com/RocketChat/Rocket.Chat/blob/develop/app/livechat/server/api/v1/visitor.js#L18
And here is the documentation page that needs to be updated: https://docs.rocket.chat/api/rest-api/methods/livechat/visitor
Hi @dennishenry
Thanks for reporting this case but I have to say I just can't reproduce the issue.
You might be using the Manual Selection
routing system, right?
If so, here you can see how we get the list of online agents to send the sound notification:
As you can see, the method considers the department
parameter, so only agents associated with that department will be returned.
So, if you have any other information to share which can be used to reproduce the issue, it'd be very appreciated.
Thanks.
@renatobecker The problem was that we were creating the chat without a department, then assigning it in a later call. Once we realized that we were able to register the visitor with a department as @seanhostdime mentioned, the issue went away. Since this appears to be proper functionality, I'd suggest just adding the information @seanhostdime mentioned to the documentation so others know that they can create a visitor with a department defined, rather then creating it with no department (thus pinging all users in all departments), then assigning a department with a later call
@renatobecker The problem was that we were creating the chat without a department, then assigning it in a later call. Once we realized that we were able to register the visitor with a department as @seanhostdime mentioned, the issue went away. Since this appears to be proper functionality, I'd suggest just adding the information @seanhostdime mentioned to the documentation so others know that they can create a visitor with a department defined, rather then creating it with no department (thus pinging all users in all departments), then assigning a department with a later call
Cool! We gonna update the doc page, for sure! Thanks for sharing all this information.
So, I think we can close this issue, right?
Sure - closing now
Description:
We just recently added more departments to our RocketChat Omnichannel and we are getting reports that users are getting audible alerts for chats in other departments of which they are not agents. They are not getting visible alerts from the agent, but only the sound alert.
Steps to reproduce:
Expected behavior:
Users to only recieve chat pings for chats in their department
Actual behavior:
Pings for all chats for all agents
Server Setup Information:
Client Setup Information