I wanted to start a discussion about a scenario we encounter when working with administrators of Sugar Serve. I have been asked about automatically reacting to new emails that are archived to Cases. It's quite common for customers to reply to Cases via email, and it's crucial for the system to automatically respond to these new emails. This could involve changing the status of the related case or sending an alert to the assigned agent.
Now, as process designers working in SugarBPM's Process Management, our instinct is to target the Emails module and keep an eye out for inbound emails. We'd like to leverage information from the related Case, either as Start Event criteria or to make immediate changes to the associated Case. Alternatively, we might target Cases and expect the process to make use of the newly related email right away.
However, here's the catch: the above approach isn't currently possible. The relationship between the new email and the case isn't established until after the processes have run. This means that the process isn't aware of the relationship and can't immediately leverage any of the details in the related record.
Good news, though! SugarCRM has implemented a field in Cases called "Pending Processing," which is automatically set to "true" when a case is created via an inbound email or related to an inbound email.
To learn more about this field, check out SugarCRM's documentation here:
support.sugarcrm.com/.../
The most common use of the "Pending Processing" field in SugarBPM processes is to check if the field equals or changes to "true" in a Start Event or Receive Message Event. Once the desired actions are taken (usually field changes in the Case), a Change Field Action can be configured to set the field back to "false."
We've actually incorporated this field in the stock process template for Case Follow-Up Date Management. You can find more information about that here:
support.sugarcrm.com/.../
In the stock template mentioned above, the Receive Message Event named "Inbound Email Received While Pending Input" checks if the Pending Processing field changes to "true." Then, the Change Field Action named "Change Status and Uncheck Pending Processing" does exactly what it says.
Whether you're using the stock process template or creating your own processes that work with the Pending Processing field in Cases, I highly recommend adding a Wait Event of at least 1 minute before the Change Field action that resets Pending Processing to "false." This is a precautionary measure in case the timing of resetting it to "false" precedes Sugar automatically setting it back to "true" when relating inbound email(s) to that case. A 1-minute Wait Event will push the reset to the next scheduler run, giving the system enough time to fully process those inbound emails.
I hope this information is helpful to all the process designers out there. Feel free to share your experiences, tips, and any other thoughts on this topic.