3

We utilise email-to-case, I have a process builder flow executing on new cases that, amongst other elements, closes cases received from specific emails automatically. The conditions for this are, the logic is (1 OR 2 OR 3 OR 4) AND 5 AND 6

I also have a Workflow rule, which judging by the Salesforce order of execution is executed next. This rule runs against the Email message object and reopens closed cases with logic 1 AND 2 AND (3 OR 4 OR 5 OR 6):

I expected the workflow rule NOT to fire on emails received from the same from address as the SuppliedEmail on the case.

Unfortunately when a record comes in, the process runs first and correctly executes the actions but so does the workflow, the email address are correct. You can see the case history here, the bottom three actions are the process builder flow and the next two are the workflow rule. Can you advise what is wrong with my workflow logic?

Case History

Thanks

2
  • so the process builder - closes the cases and Workflow rule - Reopens the closed cases. Right? If yes, according to your case history, the workflow seems to be executed first... If I am wrong, please share the entire case history. Commented Aug 30, 2018 at 11:09
  • Hi, logically it should (I assume email to case creates the email message record before the case record) but the case history shows the process builder running first - it closes the cases - the workflow rule is designed to re-open cases when a new email comes in. Sorry I didn't talk about actions enough above. Commented Aug 30, 2018 at 11:48

1 Answer 1

6

According to Order of Execution, workflow rule will be evaluated first and since in the criteria Case: Closed equals True, so workflow rule will not meet the criteria.

So, process builder will come next and it meets the criteria Status does not equal 'Closed' and it is executed first.

After this execution, system has updated the status and workflow rule is getting evaluated again and that time it matches with Case: Closed equals True and hence workflow works.

Hope it clarifies your doubt.

Order is like this at this scenario

  1. Workflow tries to execute and not matching the rule criteria
  2. Process builder executing as matching the criteria.
  3. Workflow is executing again since record got updated.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .