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.
Create a new field at user module let it called " currently logged in".default value to Zero.
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.
remove auto assign from cases.
Create an assignment workflow
Create a rule for all new cases to assign only “Currently Logged In” set to One.
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…
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:
Will need to create a field in the InboundEmail detail and edit view pages to add the new distribution method.
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:
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.
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.