+ Start a Discussion
sami amisami ami 

Email parsing



I am trying to parse an email with some string methods.

My email looks something like this.



Case # 00001234 has been updated.


Status is changed to In progress from New.









I am trying to capture above part (Status is changed to In progress from New.)

How can I do that?Any help?


Hi Ramesh,


I think you are trying to parse Subject or Body of the Email in Email to Case.


Please use this trigger to achieve your task,


trigger emailtocase on Case (before insert,before update)


for(case CaseInst:trigger.new)


if((CaseInst.Description.containsIgnoreCase('Case # 00001234') )






Where "Description" is the Field Name, when what you typed in subject of your mail it will be stored in this field.


Just Parse this Description using containsIgnoreCase technique.


Hope this may useful for you..


If you found this your desired solution mark this answer as Best solution, Don't forget to give KUDOS...


Thanks and Regards,

Arunkumar.R | Salesforce Certified Developer