I am working on service cloud. In our system the cases are created from email-to-case. we have other system in which we have customer data. The emails are being forwarded from other system to salesforce to create case. In the headers we are putting the account and contact information which helps us to link the case to contact and account.
Actual problem: In the auto response we want to use merge fields from account and contact. For this, I have checked case before and after trigger but this dosent work as firstly case is created then the Email message is created which is linked to case. So, I am not able to find the email message in case trigger. so I have to put the linking logic to emailmessage Trigger. but this happends after the case is inserted. so the auto response is having blank account and contact values.
Please share any work around for this.
Thank you soo much in advance!!