Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NEW][ENTERPRISE] Automatic transfer of unanswered conversations to another agent #20090

Merged
merged 27 commits into from Jan 18, 2021

Conversation

murtaza98
Copy link
Contributor

@murtaza98 murtaza98 commented Jan 7, 2021

Proposed changes (including videos or screenshots)

This PR will add a new feature to omnichannel in which the chats will be auto-transferred to another agent if the current agent hasn't responded back within a certain duration.
We will provide a setting in the Omnichannel section to configure the duration
image

Working:

When the Routing method is set to either Auto Assign, Load Balancing or External service

  • When the chat is transferred to the first agent, and if the agent doesn't reply back within the set duration, the chat will be auto transferred to another agent.
  • Note, this logic will only work for the first agent, if the subsequent agent doesn't reply back, the chat will not be transferred again

When the Routing method is set to either Manual Selection

  • When the chat is transferred to the first agent, and if the agent doesn't reply back within the set duration, the chat will be transferred back to the queue. The livechat manager or admin will now be able to assign this chat to an another agent.
  • Note, if the new agent doesn't reply back, the chat will again be transferred back to the queue, the chat will not be transferred again

Issue(s)

Steps to test or reproduce

Further comments

@murtaza98 murtaza98 marked this pull request as draft January 7, 2021 08:59
@renatobecker renatobecker added this to the 3.11.0 milestone Jan 7, 2021
@renatobecker renatobecker changed the title [Omnichannel] Auto transfer chat based on inactivity [NEW][ENTERPRISE] Auto transfer Omnichannel conversations based on agent inactivity Jan 7, 2021
…erId

- This will prevent the transfer to the same agent
- For Manual selection method, place the chat back to the queue, if the agents doesn't respond back within the set duration
@murtaza98 murtaza98 marked this pull request as ready for review January 9, 2021 09:26
@murtaza98
Copy link
Contributor Author

PFA Demo of this feature when autoAssignedAgent is turned on and off

omnichannel-auto-transfer-feature.mp4

ee/app/livechat-enterprise/server/settings.js Outdated Show resolved Hide resolved
ee/app/livechat-enterprise/server/settings.js Outdated Show resolved Hide resolved
packages/rocketchat-i18n/i18n/en.i18n.json Outdated Show resolved Hide resolved
packages/rocketchat-i18n/i18n/en.i18n.json Outdated Show resolved Hide resolved
ee/app/livechat-enterprise/server/settings.js Outdated Show resolved Hide resolved
ee/app/livechat-enterprise/server/lib/Helper.js Outdated Show resolved Hide resolved
ee/app/livechat-enterprise/server/lib/jobs.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@renatobecker renatobecker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@murtaza98 I left some comments but I need to point out that there is an improvement missing.
Let's say a new chat starts, the process is scheduled and will take place when the timeout is reached. But the current agent assigned to the chat may forward the chat to another agent before the timeout is reached, you know?
In that case, the current job needs to cancel and a new one needs to be reschedule.

@murtaza98
Copy link
Contributor Author

@murtaza98 I left some comments but I need to point out that there is an improvement missing.
Let's say a new chat starts, the process is scheduled and will take place when the timeout is reached. But the current agent assigned to the chat may forward the chat to another agent before the timeout is reached, you know?
In that case, the current job needs to cancel and a new one needs to be reschedule.

So if we cancel all the jobs before creating a new job - this should handle this case. Reason: if a agent forwards a chat, livechat.afterTakeInquiry callback will get executed. Here, we will cancel the previous job (which are currently scheduled for monitoring the previous agent's inactivity) and schedule the new one

@renatobecker
Copy link
Contributor

So if we cancel all the jobs before creating a new job

I didn't understand what you meant by "all jobs"

@murtaza98
Copy link
Contributor Author

murtaza98 commented Jan 15, 2021

So if we cancel all the jobs before creating a new job

I didn't understand what you meant by "all jobs"

Sorry, my mistake, that's not all jobs, rather the previous job (which are currently scheduled for monitoring the previous agent's inactivity).

Eg: Lets say a visitor first contacts and AGENT-1 is assigned and JOB-1 is scheduled. Now lets say, AGENT-1 forwards the chat to AGENT-2, then before scheduling a new job (JOB-2) for monitoring AGENT-2 inactivity, we will cancel the previous job i.e JOB-1.

@renatobecker renatobecker changed the title [NEW][ENTERPRISE] Auto transfer Omnichannel conversations based on agent inactivity [NEW][ENTERPRISE] Automatic transfer of unanswered conversations to another agent Jan 18, 2021
@renatobecker renatobecker merged commit f7caaf2 into develop Jan 18, 2021
@renatobecker renatobecker deleted the livechat/auto-transfer-feature branch January 18, 2021 11:41
@sampaiodiego sampaiodiego mentioned this pull request Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants