1

Goal: Send Email Notification whenever the owner is changed. (with conditions)

Existing logic is that whenever a Case is created, it will be assigned to a Queue. From a Queue, a user can assign the case to themselves or someone. Or anyone can assign the case to anyone.

The email needs to go out as per the below logic:

User1: Tom | User2: Harry

Tom creates a case

  • "Case created" email is sent to the team (queue).
  • Case owner will be the queue now.

Scenario 1: -- Tom assigns the case to Harry

  • Case assignment notification is sent to Harry

Scenario 2: -- Tom assigns the case to Tom (himself)

  • SHOULD NOT send an email or do anything.

Scenario 3: -- Harry assigns the case to Tom

  • Case assignment notification is sent
  • This is different than Scenario 1 because the case is created by Tom and not Harry.

I tried this logic below: This is bad because I am using CreatedById. When someone else assigns the case that I created, email is not sent.

OR(
    AND(
        ISCHANGED([Case].OwnerId),
        $User.Id  <> [Case].CreatedById,
        ISPICKVAL([Case].Status, 'New')
    ),
    AND(
        ISCHANGED([Case].OwnerId),
        NOT(ISPICKVAL([Case].Status, 'New'))
    )
)

The reason for this custom functionality is because of this known issue: https://trailblazer.salesforce.com/issues_view?id=a1p300000008YvIAAU

0

You must log in to answer this question.

Browse other questions tagged .