function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Email-to-Case Listener

I'm capturing emails (via email-to-case) that are triggered by an automated export outside of sForce. The export happens every three hours, 24 hours a day, 7 days a week. I'd like to fire an e-mail alert to myself and my mamanger if these emails AREN'T received. In other words, if a case isn't created every three hours by this email-to-case process I need to know immediately.


Any ideas as to how to accomplish this? Is something like this even possible?



Andy BoettcherAndy Boettcher

I would approach it by creating a Custom Setting in your org with just a date value.  Add a line in your Email handler to update that Custom Setting every time it's invoked with the current date/time.


Spin up an APEX Scheduled Job (you can make it run every hour) that looks at that Custom Setting and determines if more than 3 hours has passed, then have it sent out a SingleEmailMessage to you and your manager.


Easy peasy, lemon squeezie.




Thanks for your help Andy! I'm not too familiar with scheduled jobs. I'll do my own search for code examples/tutorials but would you be able to provide any links or examples of your own?


Thanks in advance!