Workflow & Approvals Overview

What is a workflow rule?

A workflow rule will automatically take action when a record meets specified criteria.

Open Example

You could create a workflow rule to email the strategic accounts team public group when an opportunity is greater than 100,000 USD.

What is an approval process?

An approval process takes action on a record based on user feedback.  Whereas a workflow rule automatically takes action based on record criteria, an approval process is manually initiated by the user.

The administrator configures the approval process, determining conditions that the record must meet in order to be submitted for approval, who must approve the record, and what actions take place as a result of approval, recall, or rejection.

Open Example

All opportunities with a discount greater than 10% must be approved by the account executive’s manager prior to shipping. All opportunities with a discount greater than 15% must be approved by the VP of Sales prior to quote approval.

What actions can workflow rules and approval processes perform?

Workflow rules and approval processes reference the same bank of actions, and can perform the following:

  • Create a task record
  • Send an email
  • Update a field
  • Send an outbound message (used for integrations)

Workflow Execution

Workflow rules execute when the evaluation and rule criteria are both met.

Evaluation Criteria

One of 3 evaluation criteria can be selected:

10-8-2013 9-07-41 PM

1. created

The workflow rule will only fire if it meets the rule criteria when the record is created.

2. created, and every time it’s edited

The workflow rule will fire any time a record is saved and meets the rule criteria.

* Cannot be used in conjunction with time-based workflow actions.

3. created, and any time it’s edited to subsequently meet criteria

When this option is selected, the workflow rule will only fire the first time that the record meets the specified criteria. On subsequent edits, if the record continues to meet the criteria, it will not trigger the rule again.

However, if the record is modified to no longer meet the rule criteria, then edited once again and does meet the rule criteria, it will fire again.

Open Example

A workflow rule has been created that emails the VP of Sales when an opportunity is Closed/Lost; the rule is set to execute every time a record is “created, and any time it’s edited to subsequently meet criteria”.

Bill is a sales rep working a deal. After a long negotiation with a prospect, Bill ultimately loses the deal. He marks the deal as Closed/Lost, and the workflow rule sends an email to the VP of sales. The VP requests that Bill add additional information to the opportunity about why they lost the deal.

Bill updates the opportunity (which is already closed/lost); this subsequent update does not trigger another email to the VP of sales.  However, if the workflow rule were set to “created, and every time it’s edited”, this update would trigger another email alert.

The prospect calls Bill and asks him to resubmit his proposal as their other vendor fell through. Bill updates the opportunity stage to “Contract Negotiation”. Ultimately, Bill once again loses the deal.

He once again updates the stage to “Closed/Lost” – this update does trigger a second workflow notification to the VP of sales.

The reason that this update triggers an email notification is that it did not meet the workflow criteria prior to the update (as the stage was “Contract Negotiation”).  Thus “any time it’s edited to subsequently meet criteria” effectively means “any time it’s edited and did not previously meet workflow criteria”.

Rule Criteria

The rule criteria can either be determined by specified field values or via formula evaluation:

10-8-2013 9-22-37 PM

Time-Dependent Workflow Actions

Time-dependent workflow actions are scheduled to execute at a specified time after the workflow rule itself has triggered.

Open Example

I want to send a notification to the opportunity owner to follow up with the client 30 days after an opportunity is marked Closed/Won. The criteria for workflow execution is the condition “Won = TRUE” – however – the execution of the action (sending the email) must take place 30 days after that condition is met.

Time-based workflow actions are structured as follows:

Workflow rule –> Time Trigger –> Workflow Action

When the workflow rule executes, the workflow actions within the specified time trigger will fire accordingly.

10-8-2013 9-42-38 PM

If the record is edited and no longer meets the workflow criteria, pending workflow actions are unscheduled.

Limitations and considerations:

  • Modifying an active time-based workflow rule can be tricky. Deactivating the workflow rule does not remove pending time-based actions that the workflow rule previously scheduled for future execution.
  • Likewise, adding workflow actions to an active time-based workflow rule will not retroactively schedule the new actions on records where existing actions are pending.
  • Time triggers cannot be added to an active time-based workflow rule.

Approval Process Structure

Each approval process is comprised of the following:

  1. Entry Criteria – the record must meet this criteria in order to be submitted for approval.
  2. Initial Submissions Actions – these actions are taken once any record is submitted for approval.
  3. Approval Steps – each approval step has its own entry criteria, approval actions, and rejection actions.
  4. Final Approval Actions – these actions are taken once all users (within all approval steps) have granted approval.
  5. Final Rejection Actions – these actions are taken once any user rejects the approval.
  6. Recall Actions – these actions are taken when the approval is recalled (assuming that approval process allows approval recall).

10-9-2013 7-43-11 PM

Enhancing Approval Reporting

Note that there is no out of the box way to report on approval status or age.  Therefore I often add one or both of the following to approval processes:

1. Approval Status field

Picklist field with values:

  • Submitted
  • Recalled
  • Rejected
  • Approved

You’ll need to add the custom field, and field updates to each corresponding section of the approval process:

10-10-2013 8-46-07 AM

10-10-2013 8-38-25 AM

2. Approval Submission Date

Date/time field, updated to “NOW()” via approval action within initial submission actions:

10-10-2013 9-09-42 AM

Approval age can be added via formula once you have the date captured, as shown above.

45 Responses to “Workflow & Approvals Overview”

  1. ravi9923 October 23, 2017 at 6:41 pm #

    Just a heads up for everyone. The SF docs are wrong when it comes to the limitations on using time-based actions with certain eval criteria settings. https://help.salesforce.com/articleView?id=workflow_time_dependent.htm&type=5

    What John has listed above is correct.

    Cheers!

  2. ag3991 June 17, 2017 at 6:32 pm #

    Hi

    Is there a way to “undo” a workflow without using the AppExchange? E.g. A workflow may automatically create Opps when a Lead is created. But say you are doing a data import and you insert 1000 records and forget to turn off the workflow, is there a way to undo the damage? Because if you delete all the Leads, surely the Opps would remain…?

    KR

    ag3991

    • JohnCoppedge June 19, 2017 at 1:55 pm #

      Workflow can’t create a record (except tasks/events), but the short answer is no there is no undo

  3. markdenford August 28, 2016 at 2:42 pm #

    Hi John,

    With the Approval Process example image on this article, Step 1 has an entry criteria of Discount >= 0.1 and step 2 has Discount >= 0.15. I’m wondering though if the discount is, say 0.2, it will still trigger step 1 won’t it? And then will it process the approval for the “> 10%” discount, without triggering then the “> 15%” approval step? Should the order of these be reversed? That is, step 1 = “> 15%” and if not step 2 is “> 10%”?

    I’m sure I’m missing something in the concepts here, just not sure what.

    Thanks,

    Mark

    • JohnCoppedge September 5, 2016 at 8:01 pm #

      Hey Mark,

      Step 1: If > 10% discount, require approval from manager
      Step 2: If > 15% discount, require approval from james smith

      If you wanted to reverse the order you could. The approval is sequential – so James won’t get the approval until the manager has approved the discount.

      A 20% discount would enter both steps- if you wanted to exclude step 1, then you would have two conditions: a) > 10% discount, b) < 15% discount. Hope that helps!

  4. vijay24805 April 6, 2016 at 8:53 pm #

    Thanks John and Tejalr! – I guess this link explains the limitations of time trigger – https://help.salesforce.com/apex/HTViewHelpDoc?id=workflow_time_action_considerations.htm&language=en

  5. vijay24805 April 6, 2016 at 6:13 pm #

    In my scenario I have created a time based workflow action which would send an email to owner of an opportunity based on a criteria. The workflow action send email after 15 days. Many of my records were created or update which met the criteria in workflow rule and whose owner are scheduled to receive an email after 15 days. Since this workflow was created very recently, I would like to change 15 days to 10 days in my workflow action. If I change that would the existing record which are untouched, will there owner get the email after 10 days or 15 days?

    The workflow rule will trigger when record is created or edited only. I guess logically the record which were edited or created when 15 days rule was active , will get email after 15 days only. If I change the rule to 10 days and hit edit/save on the record which meets the criteria, will the owner now get an email with in 10 days?

    • tejalr8@gmail.com April 6, 2016 at 6:20 pm #

      For that chk out ur workflow log (monitor time trigger)you can see which workflow r already in queue . On that you can see what are the workflow results will exist or not.if it’s already in queue and you change your workflow or deactivate I think , but if it’s not in queue you can make changes and it will work accordingly. Hope I m not wrong still I would love to hear from John .

      Thanks .

      • JohnCoppedge April 6, 2016 at 8:48 pm #

        I believe when you deactivate the workflow rule (which is required to make this change), it will remove any pending actions associated with the rule (you can check workflow queue – good suggestion tejalr).

        [edit: the actions are only deactivated if the record is modified again]

        • sanfranmovers August 15, 2016 at 7:51 pm #

          John,

          In the details above.. its mentioned “Modifying an active time-based workflow rule can be tricky. Deactivating the workflow rule does not remove pending time-based actions that the workflow rule previously scheduled for future execution.”
          Here in the comments you are saying otherwise..

          Can you please clarify ?

          • shstevens November 6, 2016 at 12:12 am #

            I have this question too? It was an exam question and wasn’t sure what to put b/c of this comment.

          • JohnCoppedge November 17, 2016 at 12:40 am #

            Yep- OK…

            When the workflow rule is deactivated, the pending actions will remain as scheduled prior to workflow being deactivated. If a record with a pending action is modified (and the workflow is still inactive), then the pending action will be removed (as it no longer meets the entry criteria for the workflow… b/c the rule isnt active).

            So if you are looking to change the time trigger, you will need to deactivate update all of the records again to trigger the workflow timer.

            Also this is why it is often a good idea to use a custom field to set the execution time rather than a timer (easier to update a field than to change the workflow itself).

  6. vijay24805 April 6, 2016 at 5:37 pm #

    Can you let me know what does this line means – Time triggers cannot be added to an active time-based workflow rule.?

    Thanks

    • tejalr8@gmail.com April 6, 2016 at 6:03 pm #

      That does mean , to add time trigger on any existing workflow, you first need to deactivate it(if it’s already in active mode) otherwise you can not add any add on time trigger if the work flow or also for more then one time trigger to work with existing workflow.you can try adding time trigger on any existing workflow and you can see this same behavior.
      Thanks .
      Tejal.

  7. tejalr8@gmail.com February 16, 2016 at 9:33 pm #

    Hi john,
    Here is a beautiful example to really have visual understanding for approval and the process.
    I was bit confuse with the image for approval steps for discount example you gave …
    but found this video and got the same idea with solving my confusion.
    I hope you like to add in here.
    https://www.youtube.com/watch?v=0u3L8JIJjbE
    thank you .
    Tejal.

    • JohnCoppedge February 17, 2016 at 1:51 am #

      This video is listed in the main section content

    • Henri Black December 29, 2016 at 12:42 pm #

      Thanks for sharing that video tejair- was very helpful.

  8. Agyasi Ampah February 15, 2016 at 5:31 pm #

    Hi John,

    i made a mistake whilst do a workflow rule in my org but i made a mistake and then deleted the rule.
    But i could not create another workflow rule using the same name is this what happens, or do i have to wait for a certain number of hours.

    thanks

    • JohnCoppedge February 16, 2016 at 1:03 am #

      I have seen that happen before, where it takes a few minutes/hours for the deletion to complete.

  9. Munira Majmundar February 3, 2016 at 3:47 pm #

    I messed up on one of the quiz questions 🙁 So, have been trying to dig into understanding approval process a bit more. Found some nice info; below is the link.

    http://www.adminhero.com/creating-your-first-approval-process/

    • JohnCoppedge February 17, 2016 at 1:55 am #

      Awesome thanks for the link!

    • kmkaast April 16, 2017 at 3:21 pm #

      Thanks for sharing this , i suggest including this link in that section if possible

  10. Munira Majmundar January 29, 2016 at 4:53 pm #

    Found a very nice, and short, youtube video on Approval and Workflow process. https://www.youtube.com/watch?v=hilJXtRJcEU

  11. Hiren Patel April 3, 2015 at 11:24 am #

    Can anyone please answer this question,

    Workflow approvals can be done from: (Select all that applies)
    A. In Chatter
    B. From record
    C. From email
    D. From home page
    E. Mobile

    • JohnCoppedge April 3, 2015 at 1:51 pm #

      Pretty sure the answer is all of the above – I haven’t used approval from Chatter but I remember that feature being added. From the record, email, and home page are all definitely true. Haven’t issued an approval from mobile but fairly sure you can there as well.

      • Hiren Patel April 3, 2015 at 2:14 pm #

        Even I thought the same. But, in one of the quizlet’s flashcard it said “A,B,D,E”(Email was included), so I wanted to confirm it.
        Thanks a lot John. For replying so quickly and developing such a wonderful guide. Thank You. 🙂

        • Hiren Patel April 3, 2015 at 2:15 pm #

          — (Email was ‘not’ included) —

          • JohnCoppedge April 3, 2015 at 3:31 pm #

            I just approved a request via email yesterday. Most definitely possible, and has been for ages 🙂

    • tejalr8@gmail.com February 16, 2016 at 9:09 pm #

      chatter,email and home page.

      • tejalr8@gmail.com February 16, 2016 at 9:11 pm #

        and also mobile Salesforce1 app.

  12. Tasnim Tailor June 17, 2014 at 6:22 pm #

    If a record is submitted for approval and the approver does not have read access to the record, then the submitter would need to manually share the record to the approver, right?

    Is Read only rights enough or he needs Read / Write?

  13. Zachery Tapp May 14, 2014 at 1:40 am #

    Under “What actions can workflow rules and approval processes perform?”, should Flow Trigger be used here? It says that it is on the other document you send us to – just want to be sure.

    Also, is Visual Workflow included on the Admin 201 Exam?

    • Zachery Tapp May 14, 2014 at 1:41 am #

      Actually – it looks like it’s a pilot-only program right now, so it’s doubtful it will be on the 201 Exam.

      • JohnCoppedge May 16, 2014 at 7:12 pm #

        What’s is in pilot? Visual workflow engine (flow) has been around for a while and is covered lightly in the guide. There shouldn’t be many questions on the exam about it.

        • Maura McNulty April 15, 2015 at 3:32 am #

          Is this now called Lightening?

          • JohnCoppedge April 15, 2015 at 5:49 pm #

            No, lightning is different

          • JohnCoppedge August 17, 2015 at 3:32 pm #

            There are a few different capabilities:

            Workflow
            Approvals
            Lightning Process Builder
            Flow

            This page currently discusses the first two, but the second two are addressed in the workflow main section of the guide.

  14. Roger Grilo March 16, 2014 at 10:21 am #

    “there is no out of the box way to report on approval status or age.” —> strange, isn’t it? I hope that this becomes a standard feature in a future Salesforce release

    • JohnCoppedge March 16, 2014 at 7:45 pm #

      Me too… although a friend of mine developed an AppExchange package to do just that 🙂

  15. Robert Rollar January 17, 2014 at 7:04 pm #

    2nd paragraph

  16. Frank van Meegen January 7, 2014 at 8:51 am #

    “determining conditions that must the record must meet in order to be submitted for approval”

    2 x must in the same sentence.

Leave a Reply