Auto assign cases only to logged-in users?

Hi All,

Wanted to know if there is an option to auto-assign cases from an inbound email only to users who are logged-in? The current options (round-robin etc.) seems to assign a case to the user irrespective of the fact if they are logged in or not.

What I want to do is to automatically convert an inbound email to a case and assign it only to those users who are currently logged-in and not to those who are logged off.

Is there any work around on this?

Thank You.

Interesting question , Here is my way…

  1. Create a new field at user module let it called " currently logged in".default value to Zero.
  2. Create a job to check logged users activities from tracker , let us last 10 min. , first make above field set to zero , then set it to one for all users in tracker module for last 10 min.
  3. remove auto assign from cases.
  4. Create an assignment workflow
  5. Create a rule for all new cases to assign only “Currently Logged In” set to One.

Happy Automation!!

To help with Ashish’s idea, there are logic hooks to register user activity: after_login, after_logout

You can use these to keep your custom field updated, although I am not sure how that would work for user who don’t log off, but just leave their sessions there until they time out…

1 Like

Thanks a lot. Will try this out.

Idea behind using from tracker module is to get exactly get list of active users on browsers.

Many people don’t click on “Log Out” button, they just off the browser.

Riding on the coattails of this discussion as I am trying to do something similar. I have already implemented the after_login & before_logout logic hook to set the logged-in status for every user in a User custom field.

Environment:
SuiteCRM version > 7.11.5
PHP - 7.2

Now I am trying to implement a new distribution method algorithm (other than the ones that exists).

I have looked and debugged the code to understand the following:

  1. Will need to create a field in the InboundEmail detail and edit view pages to add the new distribution method.
  2. The cronjob & scheduler fires the “Check Inbound Mailboxes” calling into function:pollMonitoredInboxesAOP. This actual distribution method & assignment to the user is done in AOPAssignManager.php.

So as per my understanding, most of my changes are going to localized to AOPAssignManager.php file.

Anyways, here are my questions:

  1. Going through the documentation available, I have not found any information about “how-to” extend the distribution methods and keep it upgrade-proof. The modifications needs to be implemented mostly in AOPAssignManager.php and _AddJobsHere.php.
    Is there an upgrade proof way of extending the distribution method? If not, your “guru-level” recommendations of “how-to” implement, deploy and manage this will help.
  2. There are 2 functions, pollMonitoredInboxes and pollMonitoredInboxesAOP. Why use pollMonitoredInboxesAOP from the scheduler job instead of pollMonitoredInboxes?

Please do let me know if you need any more information.

Thanks in advance for any help.

I have answered you in the other thread you started with this:

https://suitecrm.com/suitecrm/forum/suitecrm-7-0-discussion/26711-extending-suitecrm-to-add-another-distribution-method-algorithm