Workflow, like its name workflow, helps to maintain the workflow of any procedure or processes by automating any procedure as well as processes to save time for your org and make the work fast and more efficient. To automate any task with the help of workflow there is a need for workflow rules; workflow rules mainly contain a set of workflow instructions.
Workflow Rules Contain Mainly Two Components
- Criteria: It is the most important part as it only decides whether workflow will execute or not; as in a condition ‘if’ part of an “if/then” statement. This means it should be true to perform any action related to workflow.
- Actions: After completion of the criteria stage the main task is to perform a task associated with it; as the “then” part of the “if/then” statement. This means after successful completion and meeting all the criteria what action should be performed.
For example, if we take a raining example, the initial criteria are “it’s raining”; and only if this condition is true then only the second part will execute; that is “bring an umbrella”. If the criteria aren’t met (it isn’t raining), then the action isn’t executed (you don’t bring an umbrella). If a record meets all the required criteria then only workflow rules execute and the action will be performed.
Don't forget to check out: Time Based Workflow in Salesforce | Configuration Guide
Create a Workflow Rule
Well for creating a workflow rule there is some requirements and need of permissions:
- It is available in Lightning Experience and as well as Salesforce Classic.
- It is also available in Enterprise, Performance, Unlimited, and Developer Editions.
User Permissions:- Whenever there is to create or change any workflow rules and actions; there is a requirement of user permissions. To customize the application there is a need for user permissions.
So after fulfilling all these above requirements we are ready to create Workflow rules. It can be done in the following steps:-
- Set the Criteria:- It is the first step toward creating a workflow rule; Very first you have to select the object and the rule related to it, and according to that configure the criteria for that object.
- Add Automated:- Once the criteria are set; the main important part after that is to decide if all the criteria are met and what action should be performed on the selected object. So to identify it and set the appropriate automation for it.
- Selecting a default User:- Now identify and select a default workflow user which you want Salesforce to display with the help of workflow rules.
- Rule activation:- After all these steps the most important thing is to activate the workflow which we created otherwise Salesforce does not trigger it.
To create or change any Workflow rules or actions the following steps should be followed:-
- Go to Setup, in the search bar enter Workflow Rules. Once you will see the Workflow option click on it.
- After that click on the New Rule.
- After clicking on the new rule you have to select the object on which the rule to apply by workflow.
- After this step click Next.
- The rule should be given a name and give some description also.
- Once all these fields are completed, set the evaluation criteria. Evaluation of records can be done in two ways:
- When it is Created.
- When it is created or updated.
- Enter your rule criteria, well once the criteria is decided you have to define a rule for it.
- It is very important to select a criteria which is suitable and also select the filter criteria after this only the rule should be triggered. During selecting filters there is a limit of up to 25 filter criteria, of up to 255 characters each.
- For the formula evaluation part, it should be true and it should return true or false both; but only when it is true the rule will be triggered by Salesforce.
- Click Save & Next.