[SalesForce] Fire an Email Only when the case ownership is changed from a user to another user

I have a requirement where an email should be fired only when the case ownership is changed in between the users. So for example i am working on a case and if want to give the case and its ownership to another person in the queue, i will change the case owner field and will save the record. At this point the new owner should get an email alert.

Most important thing is, Whenever a case owner ship gets changed from a user to the queue or from a queue to a user, this Email should not fire.

The checkbox (Notify case owners when case ownership changes )within the case settings is checked but for some reason it is not working properly. So i want to Accomplish this using a workflow.

Can anyone help me on how should i define the rule criteria.

Thank you.

Best Answer

You can probably use the ISCHANGED() and PRIORVALUE() functions to accomplish this, along with the knowledge that Queue ids start with 00G, whereas User Ids start with 005.

Something along the lines of

ISCHANGED(OwnerId)
&&
LEFT(PRIORVALUE(OwnerId), 3) = '005' 
&& 
LEFT(OwnerId, 3) = '005'

(I haven't actually tested this but hopefully this points you in the right direction)

Related Topic