Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

[NEW] Multiple trigger conditions for Livechat

Open icosamuel opened this issue 8 years ago • 14 comments

@RocketChat/core Addresses part of #1824

New ability to combine different conditions for the triggers already available in the Livechat settings. screenshot from 2017-11-07 13-16-23

New condition type where a trigger works according to the Livechat plugin's language. Here is the new condition attribute once saved to mongodb

"conditions" : [ 
    {
        "id" : 1,
        "name" : "page-url",
        "value" : "http://url.of.your.choice"
    }, 
    {
        "id" : 2,
        "name" : "language",
        "value" : "fr"
    }
    ...
],

icosamuel avatar Oct 26 '17 21:10 icosamuel

@sampaiodiego I made an update on my develop branch to make the language condition work with the client language selection that's introduced in PR #8196. Since the translation PR would be required for this feature to be integrated, should I merge both features in the same PR?

What do you suggest?

icosamuel avatar Nov 17 '17 16:11 icosamuel

This is awesome. Been waiting for this feature for a long time.

JSzaszvari avatar Nov 18 '17 07:11 JSzaszvari

hi @icosamuel I would suggest to still keep them as separate PRs, but I see how difficult it can be.

let me take a closer look into both so I can give you a proper answer

sampaiodiego avatar Nov 20 '17 19:11 sampaiodiego

hi @sampaiodiego We love livechat, and we would like to suggest a feature: In the email sent with the form (name, email, message) when agents are offline, It would be interesting to include the url of the website from which it was generated. In our company we work with two sites (two hotels) and in this way we know for which hotel information is requested.

Vacoi avatar Nov 28 '17 09:11 Vacoi

thanks @valentincollado .. that is a good feature.. can you please open a new issue for it? so we all can track it :wink:

sampaiodiego avatar Nov 28 '17 10:11 sampaiodiego

New issue created #8961

Vacoi avatar Nov 28 '17 14:11 Vacoi

@icosamuel is there anything missing on this PR? I give it a quick try and seems to be working

sampaiodiego avatar Dec 11 '17 11:12 sampaiodiego

@sampaiodiego indeed, it currently works with the server's language.

In #8196, I changed that behaviour to be the language of the plugin's host page (with the API call). There is an additional bit of code to make both features work together. This bit of code is only available on my dev branch where I merged both features.

What do you think would be best in this situation?

icosamuel avatar Dec 12 '17 17:12 icosamuel

I did rebase it, with the latest dev version. livechat-8669-2.txt

edurenye avatar Sep 18 '18 09:09 edurenye

@edurenye feel free to push in my repo if it helps with the completion of this feature ;)

icosamuel avatar Sep 18 '18 16:09 icosamuel

Now it passes the tests and eslint

edurenye avatar Oct 08 '18 17:10 edurenye

Hi @edurenye!

I'll review your PR, sorry for the late reply. Can you please fix the conflicts?

Thanks.

renatobecker-zz avatar Sep 25 '19 20:09 renatobecker-zz

Sorry, but I'm not working with RocketChat anymore, but if somebody wants to continue with it can ask icosamuel for permission to push to that branch.

edurenye avatar Sep 25 '19 20:09 edurenye

@renatobecker does this still makes sense?

rodrigok avatar Apr 20 '20 19:04 rodrigok