0

I looked high and low but I couldn't find a single idea on how to do this so I am asking here.

I am looking to solve the following problem:

We have status on cases, in this status list we have to "waiting for the customer" and "customer responded", I need a way to switch the status to Customer Responded as soon as we receive an email or chatter from the customer or even if there is already a chatter in the feed if the customer replies to that chatter we would switch the status to customer responded.

Any ideas?

1 Answer 1

0

You should be able to meet this requirement using automation (Apex Triggers or Record-Triggered Flows) based on the FeedItem (for Chatter Post) and EmailMessage (for emails).

The important considerations for this will be to ensure you are only running this logic for Case records (and any further filtering if this process should only apply for some Case types) and filtering which emails and posts this applieds for to ensure that you're only running this for external users. Filtering can be completed using the InsertedById for FeedItems and the Incoming field on EmailMessage.

2
  • Hi @callum MacErlinch, Thanks for your reply, are you saying that I need an Apex Trigger for each object, Email.FeedItem and Email? Commented Feb 14, 2023 at 20:11
  • @SimpleCode yes you'll need a Trigger (or record-triggered flow) for each of these. All record triggered automation in Salesforce is based at an Object level, although if there is shared logic within the classes such as the filtering of which types of Cases this should apply to, I would extract this to its own class and method for both of the Apex Triggers to use and reduce duplication of code. Commented Feb 14, 2023 at 20:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .