+ Start a Discussion
hylim12hylim12 

how to extract email to case email source in case

Hi, I have configured 2 email address for email-to-case says emailA@co.my & emailB@co.my.

 

I have a scenario whereby customer will send an email to emailA@co.my & emailB@co.my so my Salesforce will have 2 case says Case1 & Case2 created.

 

My question is how can i extract the 'email source' of the case? For example, Case1 is from emailA@co.my and Case2 is from emailB@co.my.

 

The reason is if I extract the field 'ToAddress' then I will get 'emailA@co.my;emailB@co.my'.

 

Thanks.

Best Answer chosen by Admin (Salesforce Developers) 
Sonam_SFDCSonam_SFDC

Hi Hylim12,

 

If you send an email to customer using the Email related list 'Send an Email' button' - the outgoing email is appended with a  Case thread ID .

 

This thread ID helps the email to get back to the same case from where the email was first sent to the customer.

https://help.salesforce.com/HTViewSolution?id=000171301&language=en_US

https://help.salesforce.com/HTViewSolution?id=000003777&language=en_US

 

So the incoming emails get routed to the same case and do not update the case settings - 

 

Hope this info helps!

 

All Answers

Arunkumar.RArunkumar.R

I think when email came to salesforce you need to extract source field?

 

For example : if the email contain web you will map those field in case before insert a record..

 

If this correct you can write a trigger with use of contains method... If mail contains word WEB means map to Case field and insert into case...

Sonam_SFDCSonam_SFDC

What you can do in this case is:

 

> If you are using two Email addresses to create cases - then create two email to case routing address:

1_)emailA@co.my

2_)emailB@co.my

 

>Have 2 different record types for each of these routing addresses such that when cases are created  -  you can separate the two using record type.

hylim12hylim12

Understand that when first email coming to my routing email address, case will be created with Case Priority & Case Settings being configured.

 

How about subsequence email? When subsequence emailcoming for the same case, will it update the case origin configure in 'Case Settings' again?

 

 

Sonam_SFDCSonam_SFDC

Hi Hylim12,

 

If you send an email to customer using the Email related list 'Send an Email' button' - the outgoing email is appended with a  Case thread ID .

 

This thread ID helps the email to get back to the same case from where the email was first sent to the customer.

https://help.salesforce.com/HTViewSolution?id=000171301&language=en_US

https://help.salesforce.com/HTViewSolution?id=000003777&language=en_US

 

So the incoming emails get routed to the same case and do not update the case settings - 

 

Hope this info helps!

 

This was selected as the best answer
hylim12hylim12
Thanks Sonam! :)