Workflow Rules in Salesforce
Workflow in Salesforce is basically a container or business logic engine which automates certain actions based on particular criteria. If the criteria are met, the actions get executed. When they are not met, records will get saved but no action will get executed.
Have a look at the topics to be discussed in this section:
Before getting into more depths, let me elaborate a little more about what exactly workflow rules in Salesforce are.
Get a detailed understanding of the Salesforce Automation System!
Below is the basic structure of a workflow rule in Salesforce:
Workflow rules in Salesforce can be broken down into two main components:
- Criteria: Criteria are conditions you are supposed to put in order to test a record. For example, if you’re from a technical background, what the if statement does in an if/then condition is what criteria mean in a workflow.
- Actions: Actions occur after a record meets the criteria. Again, what the then statement does in the if/then condition is what an action means in the workflow.
Types of actions present in a workflow in Salesforce:
- Immediate actions: Actions that get executed immediately when a record is created or edited
- Time-dependent actions: Actions that get executed after a certain duration of time, such as 10 days, before a record’s close date. After this time period, the workflow rules in salesforce will re-evaluate the record just to make sure that the rule criteria are met. If the record meets the criteria, the aligned actions will be executed.
The following steps occur whenever you create or edit a record:
- The criteria of a particular workflow rule active on that object get evaluated.
- If this stands:
- True: The actions associated with the particular workflow rule get executed.
- False: The records get saved without executing any action.
So, basically, workflow rules in Salesforce can be used to automate the actions based on some criteria. They can trigger an action when a record is created or edited.
Want to know more about Salesforce? Get an introduction to Salesforce and enhance your knowledge!
You can send a source message to the target system. This can be used to keep the target systems in sync with Salesforce. Now, you must be wondering what the evaluation criteria are for a workflow rule. Let’s discuss this further.
Types of evaluation criteria:
- Created: Whenever a record is created and the criteria match with the record, the action is executed.
- Created and edited it: Whenever a record is created or updated, the action will be executed.
- Created and every time it’s edited to subsequently meet the criteria:
- Whenever a record is created and it stands true to the criteria, the action will be performed. Now, if the record is edited and it doesn’t meet the criteria, the action will not be performed.
- Suppose, the created record doesn’t meet the criteria and then it is edited or updated to meet the criteria. It will be evaluated again and, if it meets the criteria, the action will be performed. Otherwise, it won’t be performed.
Workflow rules in Salesforce can have n number of actions at a time. The following actions can be triggered using workflow rules in Salesforce:
- Assigning a task to someone
- Doing a field update
- Sending an email
- Sending an outbound message
Go for the most professional Salesforce Training Course for a stellar career now!
How to configure Workflow Rule Criteria?
By now, you know the basics of workflow rules in Salesforce. Now, you will come to know how to configure workflow rule criteria.
Once you log in to your Salesforce account, you will see the following screen:
Step 1: You’ll see a menu on the left side of the screen. Scroll down to find Process Automation. Under this section, find Workflow Rules and click on it
Step 2: On the new screen, click on New Rule to create a new workflow rule as shown in the image below:
Step 3: You need to select an object now. You can choose any object from the drop-down menu. For practice, select Lead as the object
Step 4: In this step, you will configure the Workflow Rule. To do so, you need to enter the following details:
- Edit Rule: Enter Rule Name
- Evaluation Criteria: Choose the required Evaluation Criteria
- Rule Criteria: Select criteria are met from the first drop-down menu. In the Field section, select the required field criteria. Explore different options according to your wish
Then, hit Save & Next
Get certified from this top Salesforce Course in Singapore today!
Step 5: In this step, you will need to add a Workflow Action. Select the action from the drop-down option (here, New Email Alert), and then click on Done
Step 6: In this step, you will create an Email Alert. To do so, you need to fill the following details:
- Description: This textbox must contain what the Email subject should say
- Unique Name: This is will appear automatically similar to your description
- Email Template: An Email Template is the template of the text that will be present in the email. You can create an email template on your own or you can choose from the default options. You can do so by clicking on the magnifying icon beside the textbox
- Recipients: Select the recipients to whom the mail has to be sent
After filling all the details, click on Save
Step 7: Next, on the following screen, click on Done to save the existing progress
Step 8: Now, click on Activate to activate the workflow rule
Step 9: Click on the + button and select Lead or the object name you created from the list
Wish to crack Salesforce job interviews? Intellipaat’s Top Salesforce Interview Questions are made for you!
Step 10: Click on New to create a record
Step 11: After you click on New, the following screen will appear. Enter all the necessary details here and click on Save
After saving, a screen showing the confirmation of data will be displayed
Also, a confirmation mail will be sent to you
Now, for the time-dependent workflow actions:
Step 12: In this step, you will try to add the Time Trigger. For that, go to your Workflow Rule page and click on Edit
After that, Deactivate the workflow rule and click on Edit
Now, click on Add Time Tigger
Have you got more queries? Come to our Community and get them all clarified today!
Step 13: Select the number of days, months, or years after which you want the action to be executed and click on Save
Now, the trigger has been created. You can add the preferred workflow action. Here, select New Email Alert
Step 14: Create the email alert as created before
Step 15: Click on Activate
Your workflow rule is created successfully!
As we come to the end of this tutorial section on Workflow in Salesforce, I hope you have a complete set of information on what workflow in Salesforce is and how to use it. In the next section of this tutorial, you will learn about Triggers in Salesforce.