Workflows Rules in Salesforce
Businesses nowadays struggle to keep ahead of the curve in the fiercely competitive and ever-changing commercial climate. To succeed, they must not only increase profitability and competitiveness but also strengthen resilience and agility.
One of the main tactics for overcoming these obstacles is process automation. It is applied to software or technology to streamline and automate business processes.
Workflows in Salesforce let you automate these processes to save time across your org. For this, some rules are established as instructions. Here, we will discuss the Workflow Rules in Salesforce and how to use them.
Note: Starting in the Winter of ’23, Salesforce recommends that we not create Workflows. You can still activate, deactivate, and edit any existing workflow rules. To test and create Workflow Rules in Salesforce for use in managed packages, developer orgs still allow you to do so. For new automation, consider using flows.
What are Salesforce Workflow Rules?
Workflow is a Salesforce platform business logic engine that allows you to define rules to automate actions when specific criteria are met. Workflows can be triggered by various events, such as the creation of a new record, the update of a specific field, or a record reaching a specific stage in a process.
Salesforce Automation Workflow are processes that streamline actions within your Salesforce org based on pre-defined criteria. Imagine them as automated “if/then” statements that trigger specific actions when certain conditions are met.
Salesforce Workflow Rules Components
There are two components of workfloThere are two components of workflow rules in Salesforce that are included in the container that workflow is:
- Criteria: It consists of the conditions under which the actions should take place if found true.
- Actions: The actions to be performed when the workflow rule’s criteria are met.
Every Salesforce Workflow rule must be based on a single object because, when a rule is defined, that object determines which fields are available to set the criteria.
Evaluation Criteria For Workflows
Criteria for rules can be represented as a condition or a formula. There are three types of evaluation criteria for workflows in Salesforce:
| Evaluate the rule when a record is | Description |
|---|---|
| Created | Runs the rule if the rule criteria are met, only when a record is created. Using this option, the rule runs only once. |
| Created & Every time it is edited | Runs always when a record is created and meets the criteria. And every time it is edited, even when it already meets the criteria. (As Explained in Class/Video) |
| Created and edited every time to subsequently meet the criteria | Runs when a record is created and meets the criteria. OR when a record is edited and changes from when it is not meeting the criteria to now meeting the criteria. (As Explained in Class/Video). |
Note: A default evaluation criterion is created when a workflow rule is created.
Actions in Salesforce Workflow Rules
Actions are simply a part of the then statement in the if/then condition. Workflow actions Salesforce are of 2 types based on when they are executed:
- Immediate Actions: These actions are executed immediately when the rule’s criteria are met.
- Time-Triggered Actions: These actions execute at a specific time specified when creating this type of action. In these types of actions, when the date or time arrives for the action to be executed, it again verifies whether the record still meets the criteria. If yes, it executes the respective action; otherwise, it does not.
Types of Actions Available in Workflow Rules
There are four actions specified in a Workflow Rule:
1. Email Alert
It sends automated emails using an email template. Salesforce provides functionality to create email templates for sending emails. There are four types of Classic Email templates:
- Text: All users can create or change text email templates.
- HTML with Classic letterhead: Administrators and Users with “Edit HTML Templates” permission can create HTML email templates based on a letterhead
- Custom HTML: Administrators and users with “Edit HTML Templates” permission can create HTML email templates without using a letterhead.
- Visualforce: Administrators & Developers can create templates using Visualforce. Visualforce email templates support advanced merging with a recipient’s data, allowing the template’s content to include information from multiple records.
Email templates are stored in folders. There are two folders already present in every Salesforce org.
The first one is a Unified public Email Template, which makes emails available to every user in the organization.
The second one is the My Email Templates folder, which stores the email templates used by a particular user.
2. Field Update
Field updates allow the user to automatically change a field value on the record that initially triggered the workflow rule. If “Re-evaluate Workflow Rules after Field Change” is enabled for a field update action then Salesforce re-evaluates all workflow rules on the object if the field update results in a change to the value of the field.
Only workflow rules that didn’t fire before are retriggered. Cross-Object field updates are also available for changing field values on a related master record. Still, it is not available when re-evaluation is checked.
3. Tasks
It simply assigns a task to a single user, owner, or role. We can also make sure that a notification email is sent to the assignee when a task is automatically assigned.
Tasks should be assigned to roles only if there is only one user assigned to that role. If more than one user is assigned to that role, the task is automatically assigned to the workflow rule’s owner.
4. Outbound Message
An outbound message sends particular information to a designated endpoint, such as an external service. These types of messages can be listened to using the SOAP API. The receiving system must acknowledge, and if no ACK is received, Salesforce will retry delivery to notify external systems. All the above actions can be used as both immediate and time-triggered actions.
Time-triggered actions that are already triggered are visible in Time-Based Workflow Queues. Administrators can also set default workflow users. Default Workflow users are the users who will be visible when the user who triggered the rule is not active.
Things to Remember
- Time-trigger actions cannot be added to active workflows. To add a time trigger action, first deactivate the workflow rule, then add an action.
- Another time trigger cannot be added if there is already a time trigger action scheduled for that object and present in the time-based workflow queue.
- The action a workflow rule takes can also trigger the execution of another workflow rule.

How to Configure Workflow Rule Criteria?
By understanding Salesforce workflows and their capabilities, you can leverage them to automate repetitive tasks, improve data accuracy, and streamline various processes within your Salesforce organization. So, let’s see how you can configure workflow rule criteria., with a step-by-step guide.
Step 1: The left side of the screen will display a Menu once you log in. To discover Process Automation, scroll below. Locate and click on Workflow Rules under this section.
Step 2: As seen in the illustration below, click New Rule on the new screen to establish a new workflow rule:

Step 3: At this point, you must choose an object. Any object can be selected from the drop-down menu. Select Lead as the object to practice.

Step 4: The Workflow Rule configuration is done in this stage. You must enter the following information in order to achieve this:
- Edit Rule: Enter Rule Name
- Evaluation Criteria: Choose the required Evaluation Criteria
- Rule Criteria: Select criteria that are met from the first drop-down menu. In the Field section, select the required field criteria. Explore the different Field Types according to your wish.

Then, hit Save & Next.
Step 5: A Workflow Action must be added. Click on Do after choosing the desired action (in this case, New Email Alert) from the drop-down menu.

Step 6: You will set up an email alert. You must complete the following details to do so:
- Description: This textbox needs to have the subject line of the email.
- Distinguished Name: This will automatically show up based on your description.
- Email Layout Example: An email template is a text template used in emails. You have two options: either make your email template or select one of the pre-made ones. To accomplish this, click the magnifying symbol next to the textbox.
- Recipients: Decide who should receive what.
After filling in all the details, click on Save.
Step 7: After that, select Done on the screen that appears to preserve your current work.

Step 8: Click Activate to activate the workflow rule.
Step 9: Go to the App launcher and search for the object for which you want to create the record

Step 10: To create a Salesforce record, click New.

Step 11: The screen that appears when you click New will show up. Enter the required information here, then select Save.

After saving, a screen showing the confirmation of the data will be displayed.

Also, a confirmation email 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

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!

That was all about the Salesforce workflow rules.
Next TopicNeed more support?
Get a head start with our FREE study notes!
Learn more and get all the answers you need at zero cost. Improve your skills using our detailed notes prepared by industry experts to help you excel.