In this chapter we will take Automation in Salesforce one step further with Approvals. Approval Process in Salesforce defines each step of how records get approved in Salesforce.
Approval Process in Salesforce:
Approval process in Salesforce is an automotive process which approves records for salesforce. As the process is automotive it works on certain criteria. The approval process may include rejection, recalled or first time submission of approval.
This automated process is handled using steps defined by the developer. It may be single step approval or for more secure it can be multi-steps approval.
Common steps for approval in salesforce are:
- Setup -> Create -> Workflow and Approval -> Approval Process
- Select object for approval process to be written
- Click on Create New Approval Process
- Select Standard Setup Wizard from drop down
- Enter the Process name, Unique Name and description for your process
- Specify Entry criteria
This must be defined if you want to work with specific criteria on the field
For example if you want to apply such criteria that online bill payment can be happened only for the bill amount greater than 10,000.
Field is selected as Bill Amount; Operator is greater than values will be 10000.
- Select formula evaluate true to check the syntax of formula and as well as to allow formula to set criteria.
- You can assign approval request to different users while writing the approval steps.
- To define initial submission action follow the path below:
New Field Update/Email/Task -> Conditions -> Save
- To define approval steps
- Manager Step -> New Approval Steps -> Enter name -> Repeat for all records -> Select approver manager and save
- CEO Step -> Approval Steps -> Enter name -> Set the criteria -> Save
- For final approval process you can use any of the following way like New Field Update/ Email / Task as per the condition and click on save
- To define Rejection New Field -> Write rejection condition -> Save
Note : To create default approval process select Jump Start Wizard.
- If record matches all the auto filter criteria approve the record.
The multi-steps approval process in salesforce is necessary when any of the following scenarios is happened
- If record does not fit for any of the auto approval criteria already defined
- If record fits for partial auto approval criteria then send it for approval to the appropriate approver
- If record fits the final approval criteria then send it to approver
Differentiation between Workflow rule & Approval process
Workflow triggers automatically on any DML action like Insert, Update. Remember we cannot use workflow once the record is deleted.
It consists of single step or single action to continue the process and workflow triggers are not visible to user.
Approval process consists of multiple steps and which should be approved by different users at specific level. It may include rejection also.
Email to approve the request
We can set the approve process via Email, to enable email approval response use following steps
Setup -> select Process Automation Settings -> select the Enable Email Approval Response checkbox, and click Save.
While responding to an approval request, some words can be used in the first line with periods or exclamatory marks. The words like Approved, Approve, Yes used for approval while Reject, Rejected, No used for rejection.
Understanding the order of Execution of all these rules
Any process in salesforce follows the order mentioned below. Salesforce always execute validation rules first, which are followed by Assignment rule then auto response and then workflow rules followed by escalation rules.
- Validation rules
- Assignment rules
- Auto-response rules
- Workflow rules
- Escalation rules
Thats all for Approval Process in Salesforce. If you need to refer previous sessions, please find below the index.
- Introduction to Cloud Computing (Salesforce.com and Force.com)
- Overview of Database Concepts (Salesforce.com)
- Introduction to Force.com
- Building Salesforce Custom App and Objects
- Object Relationships and Formula Field in Salesforce
- Salesforce Security Model and Overview
- Automation in Salesforce