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] Omnichannel queue priorities #17141

Merged
merged 44 commits into from
Apr 21, 2020

Conversation

MarcosSpessatto
Copy link
Member

No description provided.

@engelgabriel engelgabriel added this to the 3.2.0 milestone Apr 5, 2020
@MarcosSpessatto MarcosSpessatto changed the title Omnichanne priority feature [NEW][ENTERPRISE] Omnichannel room priorities Apr 7, 2020
@MarcosSpessatto MarcosSpessatto marked this pull request as ready for review April 7, 2020 03:02
app/livechat/server/methods/saveInfo.js Outdated Show resolved Hide resolved
ee/app/livechat-enterprise/server/api/priorities.js Outdated Show resolved Hide resolved
ee/app/livechat-enterprise/server/api/lib/priorities.js Outdated Show resolved Hide resolved
ee/app/models/server/raw/LivechatRooms.js Outdated Show resolved Hide resolved
server/routes/avatar/room.js Outdated Show resolved Hide resolved
server/routes/avatar/utils.js Outdated Show resolved Hide resolved
@renatobecker
Copy link
Contributor

renatobecker commented Apr 13, 2020

@MarcosSpessatto can you please fix the conflicts?
Thanks.

@renatobecker renatobecker changed the title [NEW][ENTERPRISE] Omnichannel room priorities [NEW][ENTERPRISE] Omnichannel queue priorities Apr 16, 2020
@lgtm-com
Copy link

lgtm-com bot commented Apr 16, 2020

This pull request introduces 1 alert when merging b258168 into b644572 - view on LGTM.com

new alerts:

  • 1 for Superfluous trailing arguments

@renatobecker
Copy link
Contributor

renatobecker commented Apr 16, 2020

I took over this PR and finished the implementation according to the following description:

This PR adds the ability to create priorities which will be used to sort the Omnichannel queues.
The Omnichannel menu provides a new form to manage the priorities, as shown below:

Priorities list:
Screen Shot 2020-04-16 at 17 11 59

Priority Form:
Screen Shot 2020-04-16 at 17 11 54

Each priority has its own(unique) Estimated due time field(time in minutes), so once a priority is associated with an Inquiry/room, this field will be used to set the queue inquiry order. As the priority is not mandatory, the Omnichannel queues will have inquiries with and without priorities. To support both possibilities, I refactored the structure of the fields that are used to sort the queues as displayed below:

New fields:

queueOrder:
1 - default, is set when there is no priority associated with the room;
0 - Is set when a priority is associated with a room, so inquiries with the queueOrder = 0 will be attended before inquiries without associated priority.

estimatedWaitingTimeQueue:
This value is updated when a priority is defined in a room. This value comes from the 'Estimated due time' field of the priority defined in the room.

estimatedServiceTimeAt:
This value represents the estimated time that the inquiry should be attended by an agent. The default value is the ts field. When a priority is associated with an inquiry, this field will be updated and the new value will be the date/time(ts field) of the inquiry creation plus the estimated due time defined in the priority (Time in Minutes). So, let say the inquiry was created at 2020-04-16 20:12:23 and the estimated due time of the priority is 15 minutes, the estimatedServiceTimeAt value will set to 2020-04-16 20:27:23.

Also, the agents and managers can change the inquiry priority through the room info panel:

Screen Shot 2020-04-16 at 17 13 23

When the room priority is changed, the fields described above are updated. The same happends when a priority’s estimated due time field is updated. Then, all inquiries associated with the priority will also be updated and this change will reflect in the queue.

It's also possible to change room priority through the REST API. A new endpoint is available, as well as the endpoint that creates omnichannel rooms will support the priority when running the enterprise version, so it's possibility to create a new omnichannel conversation with a priority associated.

@rodrigok I had to request your review of this PR because I took over this implementation and it makes no sense for me to review it anymore.

@rodrigok rodrigok changed the title [NEW][ENTERPRISE] Omnichannel queue priorities [NEW] [ENTERPRISE] Omnichannel queue priorities Apr 20, 2020
@lgtm-com
Copy link

lgtm-com bot commented Apr 20, 2020

This pull request introduces 1 alert when merging 5e24ffa into 83240bc - view on LGTM.com

new alerts:

  • 1 for Superfluous trailing arguments

app/livechat/server/methods/saveInfo.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/Helper.js Outdated Show resolved Hide resolved
ee/app/livechat-enterprise/server/lib/Helper.js Outdated Show resolved Hide resolved
ee/app/models/server/models/LivechatPriority.js Outdated Show resolved Hide resolved
server/startup/migrations/v185.js Outdated Show resolved Hide resolved
@lgtm-com
Copy link

lgtm-com bot commented Apr 20, 2020

This pull request introduces 1 alert when merging 47edcc9 into da41b61 - view on LGTM.com

new alerts:

  • 1 for Superfluous trailing arguments

@lgtm-com
Copy link

lgtm-com bot commented Apr 20, 2020

This pull request introduces 1 alert when merging ccb338d into da41b61 - view on LGTM.com

new alerts:

  • 1 for Superfluous trailing arguments

@rodrigok rodrigok merged commit 65638b5 into develop Apr 21, 2020
@rodrigok rodrigok deleted the omnichannel/add-omnichannel-priority-feature branch April 21, 2020 02:21
gabriellsh added a commit that referenced this pull request Apr 22, 2020
…users_and_rooms

* 'develop' of github.com:RocketChat/Rocket.Chat: (29 commits)
  [FIX] 2FA not showing codes for Spanish translation (#17378)
  [NEW] [ENTERPRISE] Restrict the permissions configuration for guest users  (#17333)
  [NEW] Federation event for when users left rooms (#17091)
  [FIX] CSV Importer fails when there are no users to import (#16790)
  Import slack's mpims as direct rooms instead of private groups (#17206)
  [FIX] SAML Idp Initiated Logout Error (#17324)
  [NEW] Better Push and Email Notification logic (#17357)
  [NEW] Error page when browser is not supported (#17372)
  [NEW] [ENTERPRISE] Omnichannel queue priorities (#17141)
  [IMPROVE] Change the SAML metadata order to conform to XSD specification (#15488)
  [IMPROVE] Filter markdown in notifications (#9995)
  [IMPROVE] User gets UI feedback when message is pinned or unpinned (#16056)
  Remove set as alias setting (#16343)
  [IMPROVE] Add `file-title` and `file-desc` as new filter tag options on message search (#16858)
  [NEW]  Add ability to set tags in the Omnichannel room closing dialog (#17254)
  [FIX] Show active admin and user account menu item (#17047)
  [NEW] [ENTERPRISE] Allows to set a group of departments accepted for forwarding chats (#17335)
  [FIX] Prevent user from getting stuck on login, if there is some bad fname (#17331)
  [FIX] Remove properties from users.info response (#17238)
  Bump version to 3.1.1
  ...
@sampaiodiego sampaiodiego mentioned this pull request Apr 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants