Workflow in Salesforce

In this article, we will learn about Workflow in Salesforce. In that, we will see the following topics:

  • What is Workflow in Salesforce?
  • How to Create Workflow in Salesforce.
  • What should we do if the Workflow Rule is Not Working in Salesforce?

What is Workflow in Salesforce?

Workflow in Salesforce is a tool for automating business processes within the Salesforce platform. It is a set of actions that allows users to define rules and criteria or set a schedule to automate actions.

There are two types of workflows in Salesforce:

  • Immediate Workflow: This workflow rule executes automatically when certain criteria are met.
  • Time-Dependent Workflow: It is a type of workflow rule that executes based on time that we defined.

To create workflow rules, we need to set the following operations:

  • Evaluation Criteria.
  • Rule Criteria.
  • Actions.

1. Evaluation Criteria:

1.Created.Whenever you create a new record, then flow will execute.
2.Created and Every Time Edited.Whenever you create a new record or update any record, then flow will execute.
3.Created & Every time it’s edited to
subsequently, meet the criteria
Execute only when the updated record and its condition meet the criteria.

2. Rule Criteria:

Here, we declare actions. When the declared condition matches the record value, the flow proceeds to the next step.

3. Actions:

The action gets performed when the condition matches the rule criteria and the workflow executes.

1.Field Update.We can update field when flow get execute.
2.New Task.We can create a Task after the rule execute.
3.Email Alert.We can also email users or customers after the rule gets executed.
4.Outbound Message.To send secure and selectable API Messages to a designated listener.

Salesforce launched a new automated tool called “Flow Builder” or “Flow” in Salesforce. If you want to learn how the flow works in Salesforce, click here:

See also  Create Task List View Salesforce Lightning

How to Create Workflow in Salesforce

Let’s take an example: when the user selects the Opportunity Type = New Customer, then the Lead Source from the opportunity object should get updated automatically to ‘Phone Enquiry‘.

Using the following steps, we can create a Workflow Rule to fulfill this requirement.

Step 1. Log in to Salesforce Org. -> Got to Setup. -> Home Tab. -> Quick Find Box. -> Search for Workflow Rules and click on it.

enable workflow rules salesforce

Step 2. Click on New Rule to create a new one.

enable workflow rules salesforce

Step 3. You can create this automation in Flow Builder as well. We are going to create a Workflow Rule for that. Click on the Continue with Workflow Rule button.

how to enable workflow rules in salesforce

Step 4. Select an object on which you want to create a rule. In our example, I have selected the Opportunity Object.

salesforce workflow

Step 5. Then, enter the Rule Name and select Evaluation Criteria. I have selected Created & any time it’s edited to subsequently meet the criteria.

Now, we need to select Rule Criteria to define when the rule should be executed. Here, I have declared Opportunity Type = New Customer.

That means this flow will execute when the user selects this picklist value while creating or updating the record. You can add multiple conditions. Then click on the Save & Next button.

how to enable workflow rules in salesforce

Step 6. Now click on the Add Workflow Action dropdown menu and select the Action that you want to execute after the workflow is complete. Here, I have selected the Field Update type.

We can add Multiple Actions to the same Workflow Rule.

workflow rules in salesforce

Step 7. In the Field to Update option, select Object first and then the Field you want to update. Here, I have selected the Opportunity object and Lead Source field.

Then, you need to Specify a New Field Value that will display on the Lead Source. Here, I have selected ‘Phone Enquiry‘. Then click on the Save button.

salesforce enable workflow rules

Step 8. After that, click the Activate button to Enable Workflow Rules in Salesforce.

workflow in salesforce

Step 9. After activating the rule, try updating the Opportunity Type field. As you save the updated field record, the Lead Source value will change to ‘Phone Enquiry’.

See also  How to create Approval Process in Salesforce

This is how we can create and enable workflow rules in Salesforce.

Workflow Rule Not Working in Salesforce

What are the common reasons why Salesforce workflow rules may not be firing?

The following are the reasons for the Salesforce workflow rules not firing along.

Incorrect and Incomplete Rule Criteria:

The criteria defined for the workflow rule in Salesforce are incorrect or may be incomplete.

For example, suppose a workflow rule is triggered when the required condition is met; the rule won’t trigger when a case reaches a certain status if the status field mentioned in the criterion is incorrect.

Field-Level Security Permissions:

The Salesforce user executing the action has insufficient permissions to access the fields referenced in the workflow rule criteria.

For example, suppose the workflow rule triggers an email notification when a high-priority case is created. This rule criteria include checking the value of a “Priority” field.

However, if the user executing the action does not have permission to view this field due to field-level security settings, the workflow rule will not fire.

Record Criteria Not Met:

In Salesforce, if the evaluated record does not meet all of the specified criteria outlined in the workflow rule, the rule will not be triggered.

For example, suppose the workflow rule sends an email notification when a new opportunity is created with a stage of “Closed Won”. If an opportunity is created but its stage is not “Closed Won”, the record does not meet the specified criteria, and the workflow rule will not fire.

Time-Based Workflow Action:

In Salesforce, time-based workflow rules allow administrators to define actions that should occur at a specific time after a record meets certain criteria. Pending actions in the time-based workflow queue may delay the execution of the rule.

Suppose you have a Salesforce workflow rule to send a follow-up email to customers one week after their account status is updated to “Active.” The workflow rule specifies a time-based action to trigger the email seven days after the account status meets the criteria. If you check before seven days, it will not work.

See also  Where is Recycle Bin in Salesforce

Conflicts with Process Builder or Flow:

If there are conflicts between workflow rules and other automation tools like process builder or flow, it may prevent the rules from firing as expected in Salesforce.

For example, suppose you have a workflow rule that triggers an email notification to the sales representative when a new lead is assigned to them. Moreover, you also have a process builder process that updates a custom field on the lead record when specific criteria are met.

Due to this, conflicts may arise between the workflow rule and the Process Builder process due to the timing of their executions and the updates they make to the lead record.

What are the solutions for the common reason workflow rules are not firing?

Below are the solutions for the common problems you faced that stop workflow rules from being triggered.

Field-Level Security Permissions:

Check and modify the field-level security permissions to ensure that the user has the necessary access to the fields. Grant this specific user all the object, field, and record-related permissions.

Record Criteria Not Met:

If this is the reason, ensure that both standard and custom fields on the record meet the required conditions specified in the workflow rule.

Time-Based Workflow Action:

Monitor and manage the time-based workflow queue to ensure that pending actions are evaluated promptly.

Workflow Rule not firing & there is no error in Salesforce

If you are facing an issue that the workflow rule is not firing and there is no error, and you have checked all the common reasons defined above. Then the reason behind this is that you forgot to activate the workflow rule action.

What does activating workflow rule mean in Salesforce?

In Salesforce, activating a workflow rule means enabling it to run and trigger actions based on specified criteria.

When you activate the workflow rule, it starts monitoring records for the conditions you defined. The system automatically carries out the related activities when those requirements are met.


I hope you get an idea of Workflow in Salesforce. I have explained step-by-step how to create a workflow in Salesforce. We also have seen what to do if the Workflow Rule is Not Working in Salesforce.

You may like to read: