I am trying to route emails to specific queues based on Incoming Email ID example
Email coming to abc@xyz.com routes to abc queue
Email coming to def@xyz.com routes to def queue
and so on
When I send an email to the email address, it catches the TO address in the Email related list on Case correctly but assignment rules perhaps fires a bit earlier before email is added to the email related list — since my case is getting assigned to default user and not to the queue.
Is there anything I can do so that assignment rule is fired a bit later
I know other options mentioned on the forum and my own research like
1. Creating a process builder to dummy update every new case record so that assignment rule fires
(Not efficient way I believe)
2. Using a flow for the same (Not efficient)
3. Before Insert trigger for case (Best option if using customization)
4. Using Case Origin = Email Routing Address and using it in assignment rule.
(Crude option since picklist will have so many email values)
I even tried capturing "Email Message: To Address" on case custom field and it gets the value but still assignment rule ignores it when i use the field in rule criteria. Again perhaps because when rule is run, its value is blank and gets populated a bit later.
Please advise.
Best Answer
Pankaj, You are right about order of operations. I'm not sure of a an easy method without resorting to Apex.
This could also be accomplished using a custom InboundEmailHandler class (developer doc), or possibly through rules on your email server. If you have access/control at the email server, you could append the "To address" in the email's Subject, which becomes the Case's Subject, and can be used in an assignment rule.