+ Start a Discussion
CRMUser23CRMUser23 

case assignment

I have a senerio where customer XYZ has an open case assigned to a rep on our system. XYA sends a new case the next day thru email(no thread ID), initially all email cases wait in a queue.
 
Is there a way to search the new email contact on open cases and if  there is an open case for this contact assign the new case to the same rep?
 
 
HardhatHardhat
Interesting.  Not in an assignment rule.  You might be able to do this from a before insert Apex trigger, although assignment rules might then override your assignment. 

An option here would be to place an Apex trigger on after insert of Activity that looks for Activities where the WhatId is a newly opened case (i.e. the date/time open on the case is within a couple of seconds of the Activity insert) and where the type is an email.  This will tell you that the email was created by Email To Case.  By this time the assignment rules will have already run on the case, and so you are now free to go find other open cases, get their owner(s), and pick one to assign this case to.