Process Builder Vs Workflow - Who Wins

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
2
down vote

favorite












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



  • SuppliedEmail = X4@X.com

  • SuppliedEmail = X3@X.com

  • SuppliedEmail = X2@X.com

  • SuppliedEmail = X1@X.com

  • Record Type = 'Blah'

  • Status does not equal 'Closed'

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):



  • Email Messainge: Is Incoming equals True

  • Case: Closed equals True

  • Email Message: From Address not equal to X4@X.com

  • Email Message: From Address not equal to X3@X.com

  • Email Message: From Address not equal to X2@X.com

  • Email Message: From Address not equal to X1@X.com

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







share|improve this question




















  • 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.
    – Saumya Gaikwad
    Aug 30 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.
    – sfdc_beginner1
    Aug 30 at 11:48

















up vote
2
down vote

favorite












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



  • SuppliedEmail = X4@X.com

  • SuppliedEmail = X3@X.com

  • SuppliedEmail = X2@X.com

  • SuppliedEmail = X1@X.com

  • Record Type = 'Blah'

  • Status does not equal 'Closed'

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):



  • Email Messainge: Is Incoming equals True

  • Case: Closed equals True

  • Email Message: From Address not equal to X4@X.com

  • Email Message: From Address not equal to X3@X.com

  • Email Message: From Address not equal to X2@X.com

  • Email Message: From Address not equal to X1@X.com

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







share|improve this question




















  • 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.
    – Saumya Gaikwad
    Aug 30 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.
    – sfdc_beginner1
    Aug 30 at 11:48













up vote
2
down vote

favorite









up vote
2
down vote

favorite











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



  • SuppliedEmail = X4@X.com

  • SuppliedEmail = X3@X.com

  • SuppliedEmail = X2@X.com

  • SuppliedEmail = X1@X.com

  • Record Type = 'Blah'

  • Status does not equal 'Closed'

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):



  • Email Messainge: Is Incoming equals True

  • Case: Closed equals True

  • Email Message: From Address not equal to X4@X.com

  • Email Message: From Address not equal to X3@X.com

  • Email Message: From Address not equal to X2@X.com

  • Email Message: From Address not equal to X1@X.com

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







share|improve this question












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



  • SuppliedEmail = X4@X.com

  • SuppliedEmail = X3@X.com

  • SuppliedEmail = X2@X.com

  • SuppliedEmail = X1@X.com

  • Record Type = 'Blah'

  • Status does not equal 'Closed'

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):



  • Email Messainge: Is Incoming equals True

  • Case: Closed equals True

  • Email Message: From Address not equal to X4@X.com

  • Email Message: From Address not equal to X3@X.com

  • Email Message: From Address not equal to X2@X.com

  • Email Message: From Address not equal to X1@X.com

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









share|improve this question











share|improve this question




share|improve this question










asked Aug 30 at 10:55









sfdc_beginner1

51113




51113











  • 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.
    – Saumya Gaikwad
    Aug 30 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.
    – sfdc_beginner1
    Aug 30 at 11:48

















  • 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.
    – Saumya Gaikwad
    Aug 30 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.
    – sfdc_beginner1
    Aug 30 at 11:48
















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.
– Saumya Gaikwad
Aug 30 at 11:09





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.
– Saumya Gaikwad
Aug 30 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.
– sfdc_beginner1
Aug 30 at 11:48





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.
– sfdc_beginner1
Aug 30 at 11:48











1 Answer
1






active

oldest

votes

















up vote
5
down vote













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.





share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "459"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f230682%2fprocess-builder-vs-workflow-who-wins%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    5
    down vote













    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.





    share|improve this answer
























      up vote
      5
      down vote













      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.





      share|improve this answer






















        up vote
        5
        down vote










        up vote
        5
        down vote









        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.





        share|improve this answer












        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.






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Aug 30 at 11:53









        Santanu Boral

        28.4k52048




        28.4k52048



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f230682%2fprocess-builder-vs-workflow-who-wins%23new-answer', 'question_page');

            );

            Post as a guest













































































            Comments

            Popular posts from this blog

            What does second last employer means? [closed]

            List of Gilmore Girls characters

            Confectionery