0

Using Email2Case with users with accounts is straightforward and simple, if you need to send an email reply, the "To" is the contact related to the case account.

We use a default "Anonymous" account in which we map the email2case created cases in case there's no account created for the sender's email, but if in this scenario we try to send an email reply, we're getting the anonymous account as the "To", and we're unable to edit it by manually typing the right mail.

How could we (If some client or potential client send us an inquiry about anything business related) reply to it within salesforce to the right email address?

Thanks in advance

  • 1
    when there's no account for the sender's email, do you create a Contact record via a trigger and then assign that Contact to Case.contactId? – cropredy Aug 8 '15 at 0:57
  • I will try that, and i do think is at least a valid approach, so kindly add it as an answer so i can approve it, i just thought the email2case implementation used a more automatic approach on that scenario. – FuuRe Aug 10 '15 at 17:05
0

A good strategy to follow here is:

  1. In your Case after insert trigger handler class ..
  2. Where there is no Contact already created by SFDC inbound email-to-case for the Case.suppliedEmail
  3. Create a Contact from the Case fields: the "anonymous accountid", suppliedEmail, SuppliedName, suppliedPhone - some cleverness is required here to split the suppliedName to firstName and lastName - That is, to deal with names like "Juan de la Cruz"
  4. Update Case.contactId with the id of the inserted Contact

Do all of the above in a bulkified manner

  • In the end i came with a solution based on this and it worked out great, thanks a lot. – FuuRe Aug 18 '15 at 19:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.