• Alex Zelinski
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
Hi,

I've written a custom email handler to deal with some automated emails we receive. I first worked on this in a Sandbox, and everything was working fine. After pushing this to our next environment, though, it's not functioning at all. I'm not getting any errors, just nothing is happening. What should happen is that an incoming email will create a case, unless there is already a case with that subject, in which case it will insert a comment. When I send an email to my email service address, though, nothing happens.

I have already checked that deliverability is set to all emails. I've made sure the email service is set to active. I made sure all the code came over. I'm not sure what else I should check or what else it could be. Any ideas?

Thanks!
Hi everyone,

I have made a custom email handler to deal with duplicate case creation. Previously, my company would get support tickets simply via email. What we are trying to set up is an email-to-case solution that will take emails about an already existing case and add it as a case comment, rather than creating a new case. Just using a thread ID based solution will not work because we often receive several automated emails about the same issue, and have no way to insert that in those.

Anyway, to make a long story short, I made a custom email handler to handle this. If I send an email directly to the email address for the service, everything works exactly as expected. Same thing if I send an email via the execute anonymous window (I've also included various debug statements and confirmed that I'm hitting the parts of the code I expect to hit). The issue is that it does not work for emails forwarded from our normal email inbox (we use Outlook btw). If I send two emails that meet the criteria I've set to be considered duplicates, it will create duplicate cases but ONLY if it comes via the chain of send email to inbox -> forward to Salesforce. Again to be clear, it works if I just send directly to the email address or in the execute anonymous window. Also, I know this is not just because I'm not handling the "FW:" added to the email.

Is this any type of known issue? Is there something I'm not taking into account? Any ideas or guesses are welcome as I am at my wit's end here. Thanks!