
Workflow Rules in Salesforce - A Salesforce Help Guide
Introduction
Workflow rule is the automation tool in Salesforce that helps to automate simple processes like Send an Email, Field Update, Create a Task and Send an outbound message.
How to Create a Workflow Rule?
Step 1: Go to the setup and search ‘Workflow Rules’ in the quick find box. Click on ‘Workflow rules’. Now click on the ‘Continue’ button. You will see your workflow rules window as follows.
Step 2: For creating a new workflow rule you have to click on the “New Rule” button.
Step 3: Firstly you have to select “Object” on which you want to create a workflow action. Here I select the account object. And click on the “Next” button.
Don't forget to check out: How Salesforce Lead Management and Opportunity Management Help with Seamless Sales Workflow?
Step 4:
- Edit Rule - Here you have to write “Rule Name” and “Description” of the workflow rule.
- Evaluation Criteria - you have to choose any of the following according to your record created and edited.
-
Created
If you only want your workflow action on when a record is created then choose the “created” option.
-
Created and every time it’s edited
If you only want your workflow action on when a record is created and edited then choose the “Created and every time it’s edited“ option.
NOTE - Time-Dependent Workflow Action cannot be added with this evaluation criteria.
-
Created and any time it’s edited to subsequently meet the criteria
If you only want your workflow action on when a record is created, edited and to meet certain criteria then choose the “Created and any time it’s edited to subsequently meet the criteria“ option.
Here I will choose “Created and any time it’s edited to subsequently meet the criteria”. But you can choose any of the above according to your requirement.
-
Rule Criteria
-
Criteria are met
Here you have to choose some criteria on which your workflow action will fire.
Example - I want my workflow action to fire when my “Website” field is not null.
-
Formula evaluate to true
Here you can give any formula on which you want to fire your workflow action.
If you don’t have any formula and criteria then you can just write “true” in the blank box. After writing a formula in the box then you have to check the syntax by clicking on the “Check Syntax” button. And if your formula doesn’t have any error then you can proceed further.
Step 5: Now Click on the “Save and Next” button \.
Step 6:
A) Immediate Workflow action
If you want to see all workflow actions, you have to click on “Add Workflow Action”.Here you can create any of the four workflow actions.
- New Task
- New Field Update
- New Email Alert
- New Outbound Message
You can create all four actions on the same object with respect to this criteria as you mention above but you have to create actions one by one.
- Here I will create a “Field Update” action in workflow.
- For this, I will Click on the “New Field Update” option from the drop-down menu.
- For creating Field Update option then I have to fill following details -
- Name - Here you can give any name for your action. I will give “Update Industry Field” as name.
- Unique Name - It will automatically catch the name with an underscore.
- Description - You can give a description of your action.
- Object - It is already present in front of it which were we selected at the start.
- Field to be Updated - Here you have to select the field which you want to be updated while workflow action fires. Here I selected “Industry” as my field to be updated.
- Field data type - Here data type of field comes up as you select the field you're gonna update.
- Re-evaluate Workflow Rules after Field Change - You can check this checkbox as true only if you want to re-evaluate your workflow rules action after fire of workflow rule.
- Picklist Option - You can choose any one of the following for updating the field.
- The value above the current one
- The value below the current one
- A specific value - Here you can choose any value for your field to be updated with this value. Here I choose the “Agriculture” value for updating the Industry field with this value.
- Now Click on the “Save” button.
- Hence your one action is created successfully
- You can create other actions also like “Email Alert”, “Create Task” and “Outbound Message” for the same workflow rule just by clicking on “Add Workflow action”.
Check out another amazing blog by Rajat here: Master-Detail Relationship in Salesforce
B) Time-Dependent Workflow Actions
This action is the same as the “Immediate Workflow Action” but the only difference is that this workflow action we can schedule according to our requirement. This means If I want to send an email to any user after 24 hours or after 2 days of the creation of user record using his Email Id. So I can schedule this action in “Time-Dependent workflow action”.
Step 7: Hence your workflow rule is created successfully.
Step 8: After creating your workflow rule you have to activate that rule by just clicking on the “Activation” button. If your workflow rule is not active then it will not work but if it is active then it will work according to your conditions.
I hope this information will be helpful for you.
Thank you.
Responses