Learning Objectives

After completing this unit, you will be able to:
  • Define an approval process, and list its key components.
  • Describe the types of business processes that can be automated using approval processes.
  • Set up an approval process to automatically manage when an account changes from a prospect to a new customer.

Approvals

An approval process is an automated process that your org can use to approve records in Salesforce. In an approval process, you specify:
  • The steps necessary for a record to be approved and who should approve it at each step. For example, when an employee creates a PTO request, you can automatically send an approval request to the employee’s manager.
  • The actions to take based on steps in the approval process. For example, if a PTO request is approved, a step might update fields on the employee’s record, or, if the request is rejected, send a notification to the employee.
Let’s look at an example approval process to see how a record moves through various steps of the process. In this example, we see what happens when a user submits a request for a new position in a company.
Chart that shows an example approval process

When a user first requests approval for a new position, initial submission actions occur. The default initial submission action locks the record. This action ensures that other users (except for approvers and administrators) can’t change the record while the record is pending approval. Other submission actions include sending an email alert, updating a field on a record, creating a task, and sending an outbound message.

Approval steps assign approval requests to various users and define the chain of approval for a particular approval process. In this example, the first step assigns the approval request to the user’s direct manager.

If the direct manager rejects the request, the final rejection actions occur. In this example, the final rejection actions change the position’s approval status to “Rejected”.

If the direct manager approves the request, the record moves to the next step—approval from the CEO. If the CEO rejects the position, the same final rejection actions occur.

If the CEO approves the position, final approval actions occur. These actions occur only when a record is approved and there are no further approval steps to go through. In this example, the final approval actions change the record status to “Approved”, unlock the record for future updates, and notify the employee who requested the new position.

Create an Approval Process

Now that we’ve seen the basic outline of an approval process, let’s create our own process that ensures a manager approves opportunities that are discounted more than 40%.
Tip

Tip

Draw out your business process before you try to automate it. Doing so makes it much easier to configure when using one of our tools for process automation.

Pre-Planning

Before we dive in, let’s do some quick pre-planning to make sure we’re ready to create the approval process. We need to:
  • Create an email template to notify approvers when an opportunity is discounted
  • Consider the actions to occur if the approval request is approved or rejected
Our approval process is based on opportunity records, which we already have in our org. However, we need to create some simple custom fields to use in our approval process. We create one custom field to add a discount percent. This field initiates the approval process. We create another custom field to record the status of the opportunity depending on whether the opportunity is approved or rejected.
Tip

Tip

We’re simplifying this scenario for the purposes of this challenge. In the real world, a best practice might be using the standard discount field on an opportunity product and then using a roll-up summary field to add that value to the opportunity record.

Create an Email Template

Let’s first create our email template so we can notify the record owner’s manager that an opportunity has been discounted more than 40%.
  1. From Setup, enter Email Templates in the Quick Find box, then select Email Templates.
  2. Click New Template.
  3. Choose the Text template type, and click Next.
  4. For the folder where you’ll store the template, choose Unfiled Public Email Templates.
  5. Select the Available For Use checkbox if you want to offer this template to users when sending an email.
  6. For the Email Template Name, enter Approve Opportunity Discount, and for the Template Unique Name, enter Approve_Opportunity_Discount.
  7. Select General US & Western Europe as the Encoding setting for the template.
  8. For the message Subject, enter Please approve this discounted opportunity.
  9. For the email body, enter the following text.

    {!User.Manager},

    The {!Opportunity.Name} has been discounted. Please approve this discount.

    Thank you.

    Including the merge field “{!Opportunity.Name}” helps the approver by providing a link to the opportunity record. This allows them to review the record before responding to the request.

  10. Click Save.

Customize a Record

Now let’s create two custom fields so opportunity owners can enter a percentage discount and so the status of the opportunity can be recorded.

  1. Navigate to the object management settings for Opportunity.
    • In Lightning Experience, from Setup, enter Object Manager in the Quick Find box, select Object Manager, and then select Opportunity.
    • In Salesforce Classic, from Setup, enter Opportunity in the Quick Find box, then select Fields.
  2. Scroll to the Fields & Relationships section, and click New.
  3. Choose Percent and click Next.
  4. For the Field Label, enter Discount Percent.
  5. Leave the default values for the Length field and Decimal Places field.
  6. For the Field Name, enter Discount_Percent.
  7. Click the Required checkbox to make this a required opportunity field value.
  8. Click Next.
  9. Leave the field visible for all users and click Next.
  10. On the Add to page layouts page, select Add Field and click Save & New.
  11. Add a custom picklist field that indicates whether an opportunity is approved or not approved. We’ll update this field based on the approver’s response.
    1. Choose Picklist and click Next.
    2. For the Field Label, enter Discount Percent Status, and for the Field Name, enter Discount_Percent_Status.
    3. For the picklist values, enter Approved and Not Approved on separate lines.
    4. Click Next.
    5. Don’t change any values for the field-level security. Click Next and then Save.

Great! You’ve created an email template to notify approvers and you’ve set up an object with the required fields to support your approval process.

Create an Approval Process

Now that we’ve prepped your org, the next step is creating the approval process.
  1. From Setup, enter Approvals in the Quick Find box, then select Approval Processes.
  2. In the Manage Approval Processes For field, choose Opportunity to base this process on an opportunity record.
  3. Click Create New Approval Process and choose Use Jump Start Wizard from the drop-down button. The Jump Start Wizard helps you create a simple approval process and automatically chooses some default options for you.
  4. For the name, enter “Approve Opportunity Discount” and for the unique name, enter “Approve_Opportunity_Discount”.
  5. Choose the “Approve Opportunity Discount” email template you created for this approval process.
  6. Specify Criteria for entering the approval process.
    1. Select criteria are met to set filter criteria that a record must meet to enter this approval process.
    2. Define the criteria.
      Field Operator Value
      Opportunity: Discount Percent greater than 0.4
  7. In the “Select Approver” area, choose “Let the submitter choose the approver manually.”
  8. Click Save.
  9. Click View Approval Process Detail Page to review the process.
  10. Add final approval actions.
    1. In the “Final Approval Actions” area, click Add New | Field Update.
    2. For the Name, enter “Status Approved” and for the Unique Name, enter “Status_Approved”.
    3. In the Field to Update, select “Discount Percent Status”.
    4. For the specific value, select “Approved”.
    5. Click Save.
  11. Add final rejection actions.
    1. In the “Final Rejection Actions” area, click Add New | Field Update.
    2. For the Name, enter “Status Not Approved” and for the Unique Name, enter “Status_Not_Approved”.
    3. In the Field to Update, select “Discount Percent Status”.
    4. For the specific value, select “Not Approved”.
    5. Click Save.
Great job! Now all you need to do is activate the process to start evaluating discounted opportunities.

Tell Me More...

You need to consider many things when planning and creating an approval process. Here’s a simplified list to help you get started. For a detailed checklist, see the Approvals Process Checklist.
Checkbox What email template do you want to use for approval requests?
Checkbox Who should approve requests?
Checkbox What records should be included in this process?
Checkbox What should happen when a record is first submitted for approval?
Checkbox Who can edit records that are awaiting approval?
Checkbox Should records be automatically approved, rejected, or skipped based on certain criteria?
Checkbox Should any actions happen when a request is approved or rejected?
Tip

Tip

Consider adding the Items To Approve related list to your custom home page layouts. It gives users an instant view of the approval requests they need to approve or reject. For instructions on adding this component to your home page layouts, see Designing Home Tab Page Layouts.

Share Time Estimate
Topics

Having trouble with your challenge verification?

Here are some tips:

  1. Check for typos (hey, it happens)
  2. Try using a new Developer Edition (existing customizations can interfere with the validation)